I have a page where a code is passed in the url and then this should update my table with the info from the url.
I've been using this before, but then I had an INSERT instead of the UPDATE, which is what I need now.
But there is something wrong in my code (like always) and I just can't see it...
It's supposed to put the $number in the table and set STATUS to 1 and the registration date. It will find the id in the CODE from the url as well.
So what I will get from the URL is:
blablabla.com/page.php?number=123&code=xyz
PHP Code:<?php
error_reporting(0);
require_once('Connections/connection_stuff.php');
$number = $_REQUEST["number"];
$code = @urldecode($_REQUEST["code"]);
sqlconnect();
mysql_query("UPDATE table_user SET number='$number', status=1, reg_date=now(), WHERE code='$code'");
mysql_close();
echo "It's working.";
?>






Bookmarks