Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About olaoyesunday

  • Rank
  1. Dear all, Please can anyone help, I am writing a code for updating one or all the 3 images in my product page but the query was not running, The below is the code I am trying to work on and I think is the line one that is causing the issue but I don't know what to do. if(is_uploaded_file($_FILES['file']['tmp_name'])){ // work for upload / update image $product_img1 = $_FILES['product_img1']['name']; $product_img2 = $_FILES['product_img2']['name']; $product_img3 = $_FILES['product_img3']['name']; $
  2. okay thanks but I am trying to use foreach loop where I want to enter the $_Post['size'] into database but don't know how to assign the $i variable below back to the $size variable if(isset($_POST[‘submit’])){ $size = $_POST[‘size’]; foreach ($size as $i) { echo ("$i<br>"); } $insert_product = "insert into products (size) values (’$size’)
  3. Thanks very much sir, I still need your help. How do I allow size_id column in product table to store more than one size_id on a single record? I tried it directly in phpmyadmin to insert more than one size_id on the size_id column but it was given error
  4. Please, I want to convert this single select option to multiple choice select options. i,e to select more than one option in the select dropdown <?php $get_sizes = "select * from sizes"; $run_sizes = mysqli_query($con,$get_sizes); while ($row_sizes=mysqli_fetch_array($run_sizes)){ $size_id = $row_sizes['size_id']; $size_name = $row_sizes['size'];
  5. Thanks ,you have answered my question by executing the INSERT AND SELECT QUERY differently.
  6. Please can anybody help, I am trying to convert one Insert query and one select query to prepared statement but I was stuck on the way. No.1 below is the original code that I want to convert to prepared statement, No.2 is the one that I am working but get stucked No.1 $insert_customer = "insert into customers (customer_name,customer_email,customer_pass, customer_country,customer_city,customer_contact, customer_address,customer_image,customer_ip)
  7. I have gotten the solution from stack overflow, the solution is below <form action="sizeresults.php" method="POST"><!-- use post method not must but safe --> <select name="size" onchange="this.form.submit()"> <option selected disabled>Select Your size:</option> <?php $get_sizes = "select * from sizes"; $run_sizes = mysqli_query($dbc,$get_sizes); while ($row_sizes=mysqli_fetch_array($run_sizes)){ $size_id = $row_sizes['size_id']; $size_name = $row_sizes['size'];
  8. I want my site to search for any product that belonged to particular size when clicked any size option in the select input menu on mobile version like shop by size menu in www.brastop.com on mobile version. My problem is on how to extract size variable from option tag and put it in the select query in sizeresult.php. below are my codes: 1) for select menu <select class="" name="searchsizemobile" onchange="location = this.value;" id=""> <option selected disabled>Select Your size:</option> &l
  9. Thanks sir, I wrote the code like below and it works <select class="form-control" name="prodoccat" onchange="location = this.value;" id="prodcat"> <option selected disabled>Product Categories</option> <?php $get_p_cats = "select * from product_categories"; $run_p_cats = mysqli_query($dbc,$get_p_cats); while($row_p_cats=mysqli_fetch_array($run_p_cats)){
  10. Thanks very much, What I actually wanted to do with #1 questions is to display the product categories that when customer select on categories it will show them all the products under that categories, I know how to do it using list link but because I want the select input to be in header section like the screenshot below. My problem now is I don't know how to use Javascript to manipulate it, here is the full code I want each option to take people to specific page when clicked <select class="form-control" name="" id="prodcat"> <
  11. Dear All, Please, help me to resolve these two issues: 1) How can I change this list link to select link : echo " <li> <a href='shop.php?cat=$cat_id'> $cat_title </a> </li> "; I tried this echo " <option><a href='shop.php?p_cat=$p_cat_id'> $p_cat_title </a></option> "; but the link is not working 2) please, how can I perform FULLTEXT SEARCH WITH JOINS? I consulted php and Mysql for dynamic website 5th edition and use this select *
  12. Thanks Necuima, but I can't find Jai's post I searched all through the six pages of this forum.
  13. Please, how can we add image file or attachment to the mail function. I checked your php advance OOP 2012, I couldn't find it,
  14. Dear Larry, thanks for the answers but can you just give me a sample code snippets for that number 1 above where you said " " I love your way of writing codes than using frameworks
  15. 1) Our header file is in the includes file. if a client want to enter keywords to each products created in goodies categories for example, Please, how can he includes the keywords for Google to rank his site high? or how can we make our product entry in admin panel to handle it similar to the screenshot I attached with this messages, it was done using Laravel. 2) how can we also add recently viewed items say 5 to our site too?
  • Create New...