Jump to content
Larry Ullman's Book Forums


  • Posts

  • Joined

  • Last visited

wormhandler's Achievements


Newbie (1/14)



  1. Thanks yet again! Ive looked again and it seems I have included quotes on the variable. My marginal error was decimated! If I could 'get' curly braces, Id be home and dry, Im sure. but thats another story (or thread...)
  2. Yes, thanks, I went through it again, found a couple of (what I thought were) minor things and uploaded it. The problem didnt appear. In fact it all went better than I expected! Ill now try something else I dont know enough about, and see if I can make that work! I must be getting old (64) because I am actually enjoying all the frustrations and eventual problem solving. Thanks again.
  3. Thanks! Ive got it set up locally on my pc. I wonder if I upload it to the website, will it sort the problem out without further changes?
  4. Ive adapted this script and it seems to work very well, apart from the following error Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\phpfinal\edit_usersllph.php on line 54 I think I understand what the line is trying to do. Larry explains it very well in the book. So I dont get why its going wrong. Can anyone help? It doesnt stop the script and the changes are made. Here is the code again. $q = "SELECT customerID, cardholdersaddress FROM llphorders WHERE customerID = $id AND cardholdersaddress = $ln"; $r = @mysqli_query($dbc, $q); if (mysqli_num_rows($r) == 0) { // Make the query: $q = "UPDATE llphorders SET cardholdersaddress='$ln' WHERE customerID= $id LIMIT 1"; $r = @mysqli_query ($dbc, $q); if (mysqli_affected_rows($dbc) == 1) { // If it ran OK. // Print a message: echo '<p>The user has been edited.</p>'; } else { // If it did not run OK. echo '<p class="error">The user could not be edited due to a system error. We apologize for any inconvenience.</p>'; // Public message. echo '<p>' . mysqli_error($dbc) . '<br />Query: ' . $q . '</p>'; // Debugging message. } } else { // Already registered. echo '<p class="error">The email address has already been registered.</p>'; } } else { // Report the errors. I hope my changes look ok! Bill
  5. Ok, must be me!, Im not surprised. Ill carry on regardless! again, thanks, and from Japan, amazing. Im just outside London.
  6. As I said at the top, on my pc are these versions. PHP version 5.3.8 MySQL version 5.5.16 Apache version 2.2.21 however, my service provider has these PHP v 3.3.3 MySQL v5.1.2 no mention of Apache NOW, will I have problems? I think I am connecting to the server easily enough, and can SELECT and display the results in HTML, but am now having great difficulty in INSERTING data. Is it the versions please? Bill
  7. Im a beginner. On page 225 of the book it speaks about compatibility of PHP 6 and earlier versions. I dont think there is a PHP 6, is this right? (looked on Wilkipedia!) Im using PHP version 5.3.8 MySQL version 5.5.16 Apache version 2.2.21 Will I have problems with these? Bill
  • Create New...