A few weeks ago the server i host my website from upgraded some of its information including its PHP. Because of this i had to change all the <? tags to <?php . Everything is back up and going fine but i am still seeing an issue when i try and pass variables to another page and then put them in my database.
the code in post.php is
And then those values are called in postw.phpCode:<input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $bestsort; ?>"> <input name="hiddenField2" type="hidden" id="hiddenField2" value="<?php echo $prev; ?>"> <input name="hiddenField3" type="hidden" id="hiddenField3" value="<?php echo $sort; ?>">
When i navigate to these pages, the page labeled postw.php throws me this error.Code:<?php mysql_connect(""); mysql_select_db(""); $time =$HTTP_POST_VARS["hiddenField"]; $preTime =$HTTP_POST_VARS["hiddenField2"]; $sort =$HTTP_POST_VARS["hiddenField3"]; $query ="INSERT INTO ws (time,preTime, sort)"; $query.="VALUES ('$time','$preTime','$sort')"; $result=mysql_query($query); if ($result) echo "<b>Successfully Posted!</b>"; else echo "<b>ERROR: unable to post.</b>"; ?> <p><a href="index.php">Click Here to View</a></p>
Is this due to the recent php upgrade on my server? if so, what do i need to change? Any help is appreciated, thanks!Notice: Undefined variable: HTTP_POST_VARS in /u21/scsu/c/chaputs1/www/final2/w/postW.php on line 8
Notice: Undefined variable: HTTP_POST_VARS in /u21/scsu/c/chaputs1/www/final2/w/postW.php on line 9
Notice: Undefined variable: HTTP_POST_VARS in /u21/scsu/c/chaputs1/www/final2/w/postW.php on line 10
Successfully Posted!
Click Here to View



Reply With Quote

Bookmarks