update MySQL

[b][red]This message was edited by the iceklown at 2002-7-7 16:13:50[/red][/b][hr]
this is some code that i used to upload info into a MySQL table, but it just stoppped working all the sudden, no clue why.
[code]
if ($format== "PS2"){
$sql = "SELECT * FROM ps2";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
mysql_query("INSERT INTO ps2 (Format, Name, Writer, Rating, Overview, Story, Characters, Music, Gameplay, Misc) VALUES ('$format', '$name', '$writer', '$ratingpic', '$overview', '$story', '$characters', '$music', '$gameplay', '$misc')");
[/code]
There is some else if's below that, but they use the same structure the only difference is the table names.
I have a form with fields named as they are in the VALUES part, when you fill it out, this code is executed if one of the fields is PS2. It runs, but won't add the info to the database, can someone please help.


Comments

  • try this, after the mysql_query(...) command: echo mysql_error(); - Now he should give you some information on the error that probably accoured while sending the query.

    best regards,

    sebastian mohrenstecher
    executive secretary
    net::allies

    www.net-allies.de
    [email protected]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion