RE: [PHP] updates not working

From: Date: Fri, 21 Jul 2000 15:26:53 +0000
Subject: RE: [PHP] updates not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7582@lists.php.net to get a copy of this message
My favorite thing to do in a situation like this is to echo the query to your browser so you can see exactly what SQL statement will be passed to your database. If you still can't see where the problem lies, copy and paste the query shown in your browser to your database directly (via a command line). Then you will be able to see exactly what error your database is passing, and thus the reason that the update isn't working. HTH Sam Masiello System Analyst Chek.Com (716) 853-1362 x289 smasiello@chekinc.com -----Original Message----- From: Beth Clark [mailto:beth@corybantic.com] Sent: Friday, July 21, 2000 11:24 AM To: php-general@lists.php.net Subject: [PHP] updates not working Hi, list - I'm new to this and I can't get any of my update code to work. I have a form page with <FORM ACTION="updatereply.phtml" METHOD="POST"> <table border='0' cellspacing='5' cellpadding='0'> <tr> <td> <font face='Arial' color='Blue'>Event:</font><br> <input type='text' size='30' name='Event' value=" <? echo "$Ev"; ?> "> </td> <td> <br><br> <font face='Arial' color='Blue'>Location:</font><br> <input type='text' size='30' name='Location' value=" <? echo "$Lo"; ?> "></td> </tr> etc. and this works fine, and I have a reply page with mysql_connect("$DBHost","$DBUser","$DBPass"); mysql_select_db("db") or die( "Unable to select database"); mysql("cal", "UPDATE Calendar set Event='$Event', Information='$Information', Submitter='$Submitter', Contact='$Contact', Email='$Email', Phone='$Phone', Location='$Location', Start_Time1='$Start_Time1', Start_Time2 ='$Start_Time2', Start_Period='$Start_Period', End_Time1='$End_Time1', End_Time2='$End_Time2', End_Period='$End_Period', where Event_ID='$Event_ID' "); and then a query to echo back the info, which also works, except that no data is updated. nada. I'm not sure what I'm doing wrong, but I'm really hoping that it's obvious to one of you ;^) thanks for all your help, Beth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#7582) next »