Problem passing varibles

From: Date: Mon, 10 Jul 2000 01:53:17 +0000
Subject: Problem passing varibles
Groups: php.general php.windows 
Request: Send a blank email to php-windows+get-970@lists.php.net to get a copy of this message
Hi, I've got Nt4 with IIS4 and MySql and PHP4 installed, and I built up a html page, with a HTML form on it, when I hit the Submit button, it loads save_data.php which I use the $var1 $var $var3 etc. etc. as per my HTML Form. the prob. is the data doesn't get saved! I tried to print my sql statement out to the screen and it's empty, I figured not been a very good HTML coder I did something wrong, yet I was able to copy the php script tow Linux box with PHP & Mysql and it worked sweet. Why wont it pass on the varibles ?? Is there a better way ?? HTML Form code looks a little like: <FORM NAME="LayoutRegion1FORM" ACTION="save_data.php" METHOD=POST> <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=560> <TR VALIGN="top" ALIGN="left"> <TD> <TR VALIGN="top" ALIGN="left"> <TD HEIGHT =22></TD> <TD WIDTH=152 COLSPAN=6><INPUT id="FormsEditField1" TYPE="text" NAME="Contact" VALUE="" SIZE=19 MAXLENGTH=19 ></TD> <TD COLSPAN=2></TD> </TR> etc. etc. etc. --------------------------------------- save_data.php looks a bit like .... <HTML> <HEAD</HEAD> <BODY BGCOLOR="#003333"> <?php $link = mysql_connect ("atgcognos1","guest","something"); $ok = mysql_select_db('database01'); $insert_str = "insert into mtms values ('','$contact','$email','$ext','$status','$attention',NOW(),'$summary','$iss ue')"; $result = mysql_query($insert_str,$link); mysql_close($link); ?> </BODY> </HTML>

« previous php.windows (#970) next »