Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Johnamc328 last won the day on March 31 2015

Johnamc328 had the most liked content!

Community Reputation

1 Neutral

About Johnamc328

  • Rank
  1. If it was just me I would say it is some weird fluke. But another user stated the same issue. Must be something on the back end somewhere if you took my code and it worked fine in your envrioment. I am doing this at work - I will try it at home and see what happens.
  2. I have tried it with IIS and Bitnami WAMP with the same result
  3. I tried to with my GoDaddy account but they have too many issues. Here is the source code of the page after it has ran <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <title>Add a Site Content Page</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- Bootstrap core CSS --> <link href
  4. I put the code just below the category section and this displayed Array ( [status] => draft [title] => Text [category] => Array ( [0] => 5 ) [description] => Text [content] => Text [submit_button] => Add This Page ) Have tried with IE - Firefox and Chrome - all latest versions
  5. The main problem is I am not able to select one of them - I try but always get this message - I changed it to 1 instead of 5 but i still can not select one
  6. Here is the code that pertains to the dropdown echo '"><label for="category" class="control-label">Category</label> <select name="category[]" class="form-control" multiple size="5">'; // Retrieve all the categories and add to the pull-down menu: $q = "SELECT id, category FROM categories ORDER BY category ASC"; $r = mysqli_query($dbc, $q); while ($row = mysqli_fetch_array($r, MYSQLI_NUM)) { echo "<option value=\"$row[0]\""; // Check for stickyness: if (isset($_POST['category']) && ($_POST['category'] == $row[0]) ) echo ' selected="selected"';
  7. Here is a screen shot - I am using the code from the book. I can't figure out why the Category will not do a drop down - the database connection is fine.
  8. True and I tried that but it did not make the drop down display so I though I was missing something with a relationship between two tables. I get just a textbox where it is supposed to be a drop down
  9. The first edition book file populates the table - not the ones with the second edition sql file - thanks for pointing me in that direction Even with the table filled the Categories is not a dropbox but a textbox - this line is different from the example select name="category[]"
  10. Yes local setup and using IIS and WAMP - here is all that the sql file has - just the tables creation CREATE TABLE `categories` ( `id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, `category` VARCHAR(45) NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `category_UNIQUE` (`category` ASC) ) ENGINE = InnoDB DEFAULT CHARSET=utf8; I will try another DL and see what I get
  11. I apologise if I have missed something but the SQL statement that came with the download created the tables but did not populate the categories table. I try the add_page.php and it errors out because there is no data in the table. I have read through the chapter for the last 2 hours and can't find anything that populates the table but does refer to it such as this Each HTML page is in a single category. That association is made by attaching to each page record a foreign key to the proper value in the categories table. Where does the data for the categories table come from? Thanks,
  12. I have found that when you use IIS and try the exercise with WAMP, LAMP etc is that you have default port settings for mysqli commands. If you are running IIS then those default ports are taken. If you are running a WAMP you have to go into the PHP inside the WAMP (IIS php is the regular php install) and change the port settings to the ones you selected when you installed WAMP. For example default ports are 80, 3306 and 443 - With a WAMP install most people choose 8080, 3307 and 4443 - in the php.ini you have to set the mysqli to 3307 instead of 3306 or the mysqli command to connect to t
  13. I have been going through each chapter - the db is fine - the registration process works. Trying to figure out the IIS - includes problem since it is always with an included file where the trouble starts.
  14. So are the source files that are downloaded complete or do they still need modifying? I added the function to login.inc.php and it does not throw an error. It takes me to the home page. Then I put in a bogus email and it took me to the home page with no errors displayed. I entered a bogus PW and it took me to the home page with no errors displayed. It does not seem to be catching the errors - the register.php works fine with error checking, registering etc. Not sure why these include files are not catching errors.
  15. Hello, I have given up on Godaddy and WAMP. I am back to windows and IIS. I seem to be having a problem with the session since I always have the display showing Admin selections when I am classified as a user. I click on logout and they do go away. I click on the Home tab and they come back. I try the login and I get this error Fatal error: Call to undefined function escape_data() in C:\inetpub\wwwroot\ecommerce2\includes\login.inc.php on line 12 Any ideas are appreciated
  • Create New...