Update function doesnt seem to work

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sangeetha
Forum Newbie
Posts: 8
Joined: Sat Mar 11, 2006 12:00 am

Update function doesnt seem to work

Post 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.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

did you mysql_query($sql); ?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
sangeetha
Forum Newbie
Posts: 8
Joined: Sat Mar 11, 2006 12:00 am

update function

Post 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!
Post Reply