Jump to content

help me. mysql update problem!


flashmonkey

Recommended Posts

Hi Fellows!

mysql update via form is not working. Here is the code:

 

$id=$_GET['id'];

if(isset($_POST['now']) && !empty($_POST['update'])){

$update=$_POST['update'];

$query="UPDATE achv_tbl SET achv_desc='$update' WHERE achv_id='$id';";

$result=mysql_query($query)or die(mysql_error());

 

I have granted all priviledges to the username. I am using mysql version 5.0.45. I have also tried copying the update sql code from phpmyadmin but still it is not working. Any help/suggestions will be highly appreciated. Thankz in advance! :)

 

EDIT:

Changed subject to conform to forum policy.

 

Link to comment
Share on other sites

No error appears on the mysql_error();. I have debugged the entire page multiple times and everything outputs correctly when i use echo "";. Entry/delete forms are working smoothly. I have also tried removing the extra ; but it still doesn't work. :'(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.