| 
	
 | 
 Posted by Jerry Stuckle on 08/13/07 12:12 
chrisv wrote: 
> Hello everyone. 
>  
> I have a simple form that is designed to update a single database 
> record at a time.  It works fine until my pageaction variable is set 
> to "update".  The update conditional code doesn't execute.  It is 
> supposed to trigger an mysql record update using a predefined query. 
> The username used to query the database has all privileges, so that 
> isn't the problem.  An suggestions?  Here is the code: 
>  
 
<code snipped> 
 
When you say the code "doesn't execute", what do you mean?  Do you  
actually get there and the mysql_query fails, or don't you even get to  
the code? 
 
As others have noted, your $fullname should be $consumer_fullname, but  
this should just put an empty (not null) value in the field.  It should  
also give you an E_NOTICE about using an undefined variable if you have  
those on (highly recommended for a development system). 
 
What is the return from mysql_query()?  If it is false, what is the  
message returned by mysql_error()? 
 
Or, if you're not sure you get this far, try an echo statement right  
before your query to ensure you got there. 
 
 
--  
================== 
Remove the "x" from my email address 
Jerry Stuckle 
JDS Computer Training Corp. 
jstucklex@attglobal.net 
==================
 
[Back to original message] 
 |