sql update example php code

Go down

sql update example php code Empty sql update example php code

Post by jamied_uk on 3rd September 2012, 20:37




//include 'dbc.php';
//session_start();
$user_ip = $_SERVER['REMOTE_ADDR'];

$id = $_SESSION['user_id'];


$sql_insert1 = "UPDATE `users`
SET `last_online` = now(),
`users_ip` = '$user_ip'
WHERE (users.id = $id)
";
mysql_query($sql_insert1) or die("Insertion Failed:" . mysql_error());

?>

jamied_uk
jamied_uk
Admin

Posts : 2471
Join date : 2010-05-09
Age : 36
Location : UK

http://address-shortner.co.uk

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum