SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: query problem

  1. #1
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    query problem

    PHP Code:
      $userid=$_GET["username"];
     
     
    $rsmysql_query("UPDATE regis set status=1 where $username='".$userid."'");?> 
    this query is not updating the value in the database
    what is the problem?

  2. #2
    SitePoint Addict kivison's Avatar
    Join Date
    Dec 2004
    Location
    Whitley Bay, Tyne & Wear, UK
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi You have $username instead of username.

    You are using a variable when you should be using a field name.

    Ive been there. You cant see the wood for th etrees.

    Keith

  3. #3
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh yes
    thanks a lot


Bookmarks

Posting Permissions

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