Update row in mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • apking
    New Member
    • Feb 2007
    • 32

    #1

    Update row in mysql

    Hi,

    Iam trying to update row in table.its not working.iam write this code.what is wrong in it.




    [PHP]<?PHP session_start() ;
    if (isset($_SESSIO N['loggedin']))
    {
    if($_SESSION['username'] == "admin" || $_SESSION['username'] == "noise")
    {
    $user = $_GET["userid"];
    $file = $_GET["fileid"];
    include('db.php ');
    $sql="update upload_files SET process = 'Done' where userid='$user' and fileid='$file'" ;
    $result=mysql_q uery($sql) or die('Error: query failed');
    header("locatio n:uploads.php") ;
    }
    }
    ?>[/PHP]


    thanks
    apking
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Do you get any error messages?
    Does the code inside the if statement get executed at all?

    Comment

    Working...