Re: Problem with updating MySQL table

From: Date: Wed, 27 Aug 2008 16:24:34 +0000
Subject: Re: Problem with updating MySQL table
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-45257@lists.php.net to get a copy of this message
Your index.php looks very strange: > <?PHP > > <form method="post" action="purlprocess.php"> > .... > </form> > > ?> I'm guessing you're echoing this? I never echo from my scripts so I don't know if this is new functionality, but in my days you echoed either by <?="...";?> or by <? echo "..."; ?>. Anyway, since you're using the $_POST variable, did you check if it contains any values? You can do this with var_dump($_POST); Let us know what the results are. Another tip: > $FName= $_POST['txtFName']; > etc is terrible practice - if anybody writes an SQL command into one of your textfields it WILL be executed; this is called SQL injection. A less terrible scenario, but still one that messes up your page, is if somebody uses quotes. So always use mysql_real_escape_string() on your post variables before using them in a query.

« previous php.db (#45257) next »