sql update example php code

View previous topic View next topic Go down

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());

?>

avatar
jamied_uk
Admin

Posts : 2268
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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