| 
 Posted by FrobinRobin on 08/13/07 11:31 
yeah agree with petersprc - seems you have the input name on the form 
as 'fullname' but you are using $_REQUEST['consumer_fullname']?? 
 
The best way to solve ur own problem (and I make these silly mistakes 
ALL the time) is to 
a) echo your query to the page and try it directly in your database 
b) use print_r($any_var); (with <pre></pre> tags for formatting) to 
see the contents of arrays (i.e. use print_r($_POST);) 
 
Also I dont see how you are using the "$result_of_updated_file" 
variable as the script doesnt show any conditional for it. Personally 
I use the "mysql_affected_rows" function and a conditional: 
 
if(mysql_affected_rows($result) > 0) 
 { 
 echo "success"; 
 } 
 else 
     { 
     echo mysql_error(); 
     } 
 
Also I've just started using foreach($_POST) loop to validate the 
whole post, as well as unset($_POST['input_name']) to remove unwanted 
posts.. it's a really sweet way of running functions on all form 
variables.
 
  
Navigation:
[Reply to this message] 
 |