Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts

    php: mysql script just not workin...

    hey!
    umm ok this script im trying is just a simple script that is an action of a html form
    the calue $buyextractors is sent from the html form and my php code is mean to addit to the "extractor" field in the "founds" table under the right "id"
    it doesnt work.. i get error on line seven..
    heres the code...
    Code:
    $dbc = mysql_connect('localhost', '', '') or die("Couldn't connect to database"); 
     mysql_select_db('GAME') or die("Couldn't select database"); 
    $query ="UPDATE founds SET extractors = extractors + '$buyextractors'  WHERE id='$id' ";
    $result = mysql_query($query) or die("error!"); 
    echo("thanks you have just bought $buyextractors more extractors");
    }	
          mysql_close($dbc);
    any ideas?
    thanks
    sir p

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    What's the } closing bracket closing?

    Also, what's the error message you're getting?


  •  

    Posting Permissions

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