vendredi 24 juin 2016

Updating data in mysql database error [on hold]

I have a problem when I try to update data in MySQL database.
There is no syntax error or something like that.
The code is totally correct.

<?php 

$id = $_REQUEST['id']; 
$newname = $_REQUEST['newname']; 
$newemail = $_REQUEST['newemail']; 
$newpassword = $_REQUEST['newpassword']; 

mysql_connect('localhost','root','root') or die('Connectuion failed'); 
mysql_select_db('test'); 
mysql_query("UPDATE users SET name='$newname', email='$newemail', password='$newpassword' WHERE id='$id'"); 
echo "<h1>Your acount have been updated succefully</h1>"; 

mysql_close(); 

?>

Aucun commentaire:

Enregistrer un commentaire