Jump to content

[SOLVED] stil dont get how to do the "" and '' (quick fix)


blueman378

Recommended Posts

hi there, can someone please fix this:

mysql_query("INSERT INTO `games`.`games` (gName, gDescription, gSwfFile, gThumb) 
VALUES ('$_POST["name"]', '$_POST["desc"]', '$_POST["gamefiles"]', '$_POST["thumbfiles"]')");

 

its the order of the "" and '' thats causing probs, so could u please fixit and tell me why each one is like that,

 

:Note the fact i actually wanna learn why/how not just get it fixed, cheers

It will be easy to find and fix this way ;

<?php

mysql_query("INSERT INTO `games` 
(
`gName`, 
`gDescription`, 
`gSwfFile`, 
`gThumb`
) 
VALUES 
(
'$_POST["name"]', 
'$_POST["desc"]', 
'$_POST["gamefiles"]', 
'$_POST["thumbfiles"]'
)
") or die("Your have an error because:<br />" . mysql_error());

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.