I'm trying to get a variable from the URL, but for some reason, I can't get it to work. This is all coming from another website's form, that's why I need to get it from the URL. This is what I have right now:
if (isset($_GET['PTS'])) {
$sPTS = htmlentities($_GET['PTS']);
if(isset($_GET['submit']))
{ mysql_query("UPDATE table1 SET $sPTS=1, ENTRY=5") or die (mysql_error()); }}
Thanks for your help...I'm still new to this and learning.
PTSvalue on the querystring? i.e.foo.php?CustomerID=abcd... and you want to build your SQL string to haveCustomerID=1?$sPTSsupposed to be the field/column instead of the value in your query? Are you receiving what you are expecting fromhtmlentities($_GET['PTS']);? When dealing with a URL, useurldecode.