sir pannels
10-26-2002, 02:02 AM
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...
$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:)
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...
$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:)