Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Stx

  • Rank
  1. So even though I was able to resolve that issue, I notice that the image is not getting stored in the data base and as a result it not showing up on the site either. So the price, description show but the image is not showing up. The image is in the product folder but not outputting on the site. Can anyone help with that issue?
  2. So after doing a little further inquiries I was able to resolve the matter. I did not have a product folder in my admin sub-directory as a result the product image was not be store anywhere. Also bear in mind if you are using a sub-directory make sure your $dest = "./products/$new_name"; that is line 85 is properly positioned within your file system otherwise you will be experiencing the same problem as I did in the above.
  3. 1) Hi there, I was experiencing the exact same problem and did the changes recommended above, however I am getting the following message when I attempt to upload a product. The message is as follow: ======================================================== 2) An error occurred in script '/home/content/82/11778682/html/admin/add_other_products.php' on line 87: move_uploaded_file(../products/276edc67b6955cf76faf19df99dc856ffb2ed121. ) [function.move-uploaded-file]: failed to open stream: No such file or directory Array ========================================================
  4. I am also running into the same problem the difference however, is that am running mine on a live server. So my error is as follow: An error occurred in script '/home/content/82/11778682/html/shop/views/home.html' on line 9: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given This is what line 9 actually looks like: // If records are returned, include the view: if (mysqli_num_rows($r) > 0) { echo '<dl class="special fright"> <dt><a href="/shop/sales/">Sale Items</a></dt>'; // Fetch each item: while ($row = mysqli_fetch_
  5. For the past several days, I have been following virtually everything from the add_php.php file but for some reason nothing is being sent to the data base. I am getting the following message: A system error occurred. We apologize for the inconvenience. That is occoring on line 74, 85, 116, 117, 141 and 142. I would really appreciate it if a member can clarifiy to me why this is not working and what steps needed to make it work. here are the affected areas. I have highlighted them in red so you could see in the following: if (move_uploaded_file($file['tmp_name'], $dest)) {
  6. I am also experiencing a slightly different problem with the add_page.php file. For some reason, when I attempt to submit a page it's issusing me the following statement Please select a category! The problem is there are no categories to select other that the word select. So essencially, nothing is getting submitted to my data base and I have attempt to seach the code for any problem without any success. Here is what my code currently looks like: // This page is used by an administrator to create a specific page of HTML content. // This script is created in Chapter 5. // Require the
  7. So I was able to solve one of the problem. My Account table is working along with the dropdown menu however, the Admin is not showing up on the menu bar. So if anyone can share a solution I would greatly appreciate it. cheers.
  8. I am also encountering some problem with getting my dropdown to work. Infact, it the <li> in the the dropedown under Account is not showing up and my Admin tab is not showing up. As suggested in the above, I have downloaded the bootstrap.min.js file and place it in the js folder and I am following the book instructions as best as I can without any success. Is there anyway someone can discern where it is am going wrong. Your help would greatly be appreciated. My code in the head.html is as follow: ==================================================================================
  9. Here are how my final codes looks like: <?php // This is the registration page for the site. // This file both displays and processes the registration form. // This script is begun in Chapter 4. // Require the configuration before any PHP code as the configuration controls error reporting: require('./includes/config.inc.php'); // The config file also starts the session. // Require the database connection: require('./includes/mysql.inc.php'); // Include the header file: $page_title = 'Register'; include('./includes/header.html'); // For storing registration errors: $reg_errors = ar
  10. Thanks Larry. I followed your previous recommendation and it seem to be working now. The problem is initially, I did not add the lib folder consisting of the password.php file in the includes folder. Because I am using godaddy server, I thought they were running the latest php. However, when I checked, my version was lower so I just need to download the file and add it into my includes folder and now it's worked like a charm. So for anyone encountering a similar problem ensure that you are running the correct php version otherwise do exactly as Larry recommends in the book and it should work
  11. Thank you Larry for your quick response. I have attempted everything conceivable to resolve the issue and unfortunately, I have not been able to get it right. Am not too sure what function that is hinder my progress. Very frustrating cause it's been quite sometime I have been dealing with this issue. If you are able to provide further insight, I along with others would greatly benefit from it a clearer explanation. Thanks .
  12. I too would like to see the step by step solution to this problem because when I attempt to register, I get the following Fatal Error: Fatal error: Call to undefined function password_hash() in /home/content/82/11778682/html/html/register.php on line 86 The codes on line 86 is as follow: $q = "INSERT INTO users (username, email, pass, first_name, last_name, date_expires) VALUES ('$u', '$e', '" . password_hash($p, PASSWORD_BCRYPT) . "', '$fn', '$ln', SUBDATE(NOW(), INTERVAL 1 DAY) )"; I would really appreciate it if some can indicate to me what it is am over looking here. ch
  13. Hi there, I too fine this book to be totally awesome. I am completely new to php and the approach you took in writing this book demystify this scripting language. I am stuck on chapter 8 with the topic "USING EXTERNAL FILES". I followed everything that was suggested in creating the template however when I run index.php all I see is the php script in the browser. I am local host server. Can you please advise how to resolve this issue cause it is quite daunting. Thanks cheers.
  • Create New...