Page 1 of 1

Update function doesnt seem to work

Posted: Sun Mar 12, 2006 3:24 am
by sangeetha
Could anyone help me out here?
My update function here doesnt produce any error messages but there is no record updated.

$sql="UPDATE tutorials SET name='$name', question='$question', option1='$option1' WHERE id='$id'";

Could anyone out there look upon it and help me?

Thanks in advance.

Posted: Sun Mar 12, 2006 3:52 am
by s.dot
did you mysql_query($sql); ?

update function

Posted: Mon Mar 13, 2006 1:54 am
by sangeetha
Ok i did mysql_query($sql); and also tried something new from the online tutorials...i

tried assigning the id to

$id = $_REQUEST['id'];

rather than $id=id..

before the

$sql="UPDATE tutorials SET name='$name', question='$question', option1='$option1'

WHERE id='$id'";

it seems to be working now..thanks again!