Showing results for 
Search instead for 
Did you mean: 

Form variables not posting to D/B


Form variables not posting to D/B

I have been working on a simple message board which I have working fine on my machine at home but since putting it live the only variable on my data in page that is being sent to the data base is the date which I have set as a normal variable.
Here is the code:

$db = mysql_connect("***", "***","***");

$Date=(Date("l j F Y"));

$sql = "INSERT INTO guestbook (UserName, Date, Email, Web, Message) VALUES ('$UserName', '$Date', '$Email', '$Web', '$Message')";
$result = mysql_query($sql);
I know its the way I am moving the data from the from into variables but not sure of the method I should use for F9...
Any help much appreceiated...

RE: Form variables not posting to D/B

Sorted - my fault, version mismatch I have omitted posting the variables from the form as the older version of PHP on the server remembers data from the form - no need to post it to the variables.

RE: Form variables not posting to D/B

Yep. It's a version problem.

PHP 4.0.4 on the force9 server is too old to support the $_POST functions... need to use
$HTTP_POST_VARS instead.

I did ask Force9 if they had any plans to upgrade the PHP version and they said they were working on a new cgi platform... that was months ago now though!

RE: Form variables not posting to D/B

Thanks Alan - Lets hope they can get the version upped and feel the warmth on there faces - when they come out of the dark ages!!!

But hey these things are set to try us and I guess they do make a pretty good effort all in....