Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About mikidudle

  • Rank
  1. Thanks. That's what it was - I'd typed $_GET instead of $_POST. I really appreciate you taking the time to look at these. The second pair of eyes - much appreciated! Mike
  2. So, While I've played with this every which way I have discovered that, the id variable that shows in the url (localhost/sitename/delete_user.php?id=6) disappears from the url when I click the Submit button (localhost/sitename/delete_user.php). Please can you explain where it went, why that does that, and how to prevent that? Thanks M
  3. Hi Jonathon, The error for the 9.2 script is: The user could not be deleted due to a system error. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1 Query: DELETE FROM users WHERE user_id= LIMIT 1 What's odd is that if I run the script and echo the variable $id right after the first isset conditional, it is empty. However, it exists everywhere else. Since $id is empty, the query fails and presents that error. I can echo $id in every part of the code and it's there, except after
  4. Yes! Thank You. Same problem in the other script too. if (You can find that code error -> on your phone!!!!) { echo "Maybe you can help me find the next error"; } however { I'll try and figure it out myself first } Thanks!!! You - are a prince! Thanks
  5. Thanks Jonathon, Yes I am using the @ error suppressor - that's what's in the book. Should I remove it? Thank you so much! Here's the code: <?php # Script 9.3 - edit_user.php // This page is for editing a user record. // This page is accessed through view_users.php $page_title = 'Edit a User'; include('includes/header.htm'); echo '<h1>Edit a User</h1>'; // Check for a valid user ID, through Get or Post: if( (isset($_GET['id'])) && (is_numeric($_GET['id'])) ) { // From view_users.php $id = $_
  6. Hi, Old novice I am - confused and frustrated I'm getting. I see the following error: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\XAMPP\xampp\htdocs\websitename\edit_user.php on line 91 This happens in scripts 9.2 and 9.3 when they are called from script 9.1 I can't tell if this is because I think I'm talking to the database and I'm not, or if there's something about the setup I have of XAAMP - which I kind of doubt - or if there's something wrong with script 9.1. That's why I didn't initially post the code - cause I don't know what'd be help
  • Create New...