-
PHP; Error insert
hello!
i have over 2 hours trying to figure out what's wrong here and yet nothing so if you can see where my mistake is please tell me:
PHP Code:
$query = 'INSERT INTO BiblioPartidas (ID, Tourn, Ronda, Resultado, WhiteName, WhiteElo, BlackName, BlackElo , Partida) VALUES (\'\', \'$_Tourn\', \'$_Ronda\', \'$_Resultado\', \'$_WhiteName\', \'$_WhiteElo\', \'$_BlackName\', \'$_BlackElo\', \'$_Partida\')';
mysql_query($query) or die('Error, insert query failed -1');
That is the line generated by phpMyAdmin, I also tried without the \ before the ' but nothing...im in blank here
-
$_xxxxx is this variables?
php do not parse '-quoted strings. use "-string instead
PHP Code:
$query = "INSERT INTO BiblioPartidas (ID, Tourn, Ronda, Resultado, WhiteName, WhiteElo, BlackName, BlackElo , Partida) VALUES ('', '$_Tourn', '$_Ronda', '$_Resultado', '$_WhiteName', '$_WhiteElo', '$_BlackName', '$_BlackElo', '$_Partida')";
-
happens
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|