www.webdeveloper.com
Results 1 to 3 of 3

Thread: updating row in mysql database

  1. #1
    Join Date
    Jul 2008
    Posts
    91

    updating row in mysql database

    I found tutorial here: http://www.phpeasystep.com/mysql/9.html but it doesn't seems to work. How to fix it? I just want to link or button shows in every row of my table and makes me able update data from that row when I click on it

  2. #2
    Join Date
    Jan 2010
    Location
    South Africa
    Posts
    15

    Cool

    Try changing the line

    PHP Code:
    // update data in mysql database 
    $sql="UPDATE $tbl_name SET name='$name', lastname='$lastname', email='$email' WHERE id='$id'"
    to

    PHP Code:
    // update data in mysql database 
    $sql "UPDATE $tbl_name SET name='".mysql_real_escape_string($_POST['name'])."', lastname='".mysql_real_escape_string($_POST['lastname'])."', email='".mysql_real_escape_string($_POST['email'])."' WHERE id='".intval($_POST['id'])."'"
    in the update_ac.php file.

  3. #3
    Join Date
    Jul 2008
    Posts
    91

    Thumbs up

    It work's now! Thank you very much for help (again)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles