mysql insert fout (Opgelost)
Warbringer - 28/09/2007 23:01
Onbekend
<?php $query = "INSERT INTO events_accounts (name, linkshell, nation, rank, zm, cop, job1, job2, job3, job4, job5, level1, level2, level3, level4, level5, email, msn, yahoo) VALUES (
'".$_POST['name']."',
'".$_POST['linkshell']."',
'".$_POST['nation']."',
'".$_POST['rank']."',
'".$_POST['zm']."',
'".$_POST['cop']."',
'".$_POST['char1']."',
'".$_POST['char2']."',
'".$_POST['char3']."',
'".$_POST['char4']."',
'".$_POST['char5']."',
'".$_POST['level1']."',
'".$_POST['level2']."',
'".$_POST['level3']."',
'".$_POST['level4']."',
'".$_POST['level5']."',
'".$_POST['email']."',
'".$_POST['msn']."',
'".$_POST['yahoo']."'"; ?>
<?php $query = "INSERT INTO events_accounts (name, linkshell, nation, rank, zm, cop, job1, job2, job3, job4, job5, level1, level2, level3, level4, level5, email, msn, yahoo) VALUES (
'" . $_POST [ 'name' ] . "',
'" . $_POST [ 'linkshell' ] . "',
'" . $_POST [ 'nation' ] . "',
'" . $_POST [ 'rank' ] . "',
'" . $_POST [ 'zm' ] . "',
'" . $_POST [ 'cop' ] . "',
'" . $_POST [ 'char1' ] . "',
'" . $_POST [ 'char2' ] . "',
'" . $_POST [ 'char3' ] . "',
'" . $_POST [ 'char4' ] . "',
'" . $_POST [ 'char5' ] . "',
'" . $_POST [ 'level1' ] . "',
'" . $_POST [ 'level2' ] . "',
'" . $_POST [ 'level3' ] . "',
'" . $_POST [ 'level4' ] . "',
'" . $_POST [ 'level5' ] . "',
'" . $_POST [ 'email' ] . "',
'" . $_POST [ 'msn' ] . "',
'" . $_POST [ 'yahoo' ] . "'" ; ?>
Ik krijg de foutmelding:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 20
Iemand enig idee? ik zie er niks verkeerd aan namen kloppen ook allemaal gewoon.
Groetjes
1 antwoord
Gesponsorde links
lemoinet - 28/09/2007 23:03 (laatste wijziging 28/09/2007 23:04)
PHP gevorderde
<?php $query = "INSERT INTO events_accounts (name, linkshell, nation, rank, zm, cop, job1, job2, job3, job4, job5, level1, level2, level3, level4, level5, email, msn, yahoo) VALUES (
'".$_POST['name']."',
'".$_POST['linkshell']."',
'".$_POST['nation']."',
'".$_POST['rank']."',
'".$_POST['zm']."',
'".$_POST['cop']."',
'".$_POST['char1']."',
'".$_POST['char2']."',
'".$_POST['char3']."',
'".$_POST['char4']."',
'".$_POST['char5']."',
'".$_POST['level1']."',
'".$_POST['level2']."',
'".$_POST['level3']."',
'".$_POST['level4']."',
'".$_POST['level5']."',
'".$_POST['email']."',
'".$_POST['msn']."',
'".$_POST['yahoo']."')"; ?>
<?php $query = "INSERT INTO events_accounts (name, linkshell, nation, rank, zm, cop, job1, job2, job3, job4, job5, level1, level2, level3, level4, level5, email, msn, yahoo) VALUES (
'" . $_POST [ 'name' ] . "',
'" . $_POST [ 'linkshell' ] . "',
'" . $_POST [ 'nation' ] . "',
'" . $_POST [ 'rank' ] . "',
'" . $_POST [ 'zm' ] . "',
'" . $_POST [ 'cop' ] . "',
'" . $_POST [ 'char1' ] . "',
'" . $_POST [ 'char2' ] . "',
'" . $_POST [ 'char3' ] . "',
'" . $_POST [ 'char4' ] . "',
'" . $_POST [ 'char5' ] . "',
'" . $_POST [ 'level1' ] . "',
'" . $_POST [ 'level2' ] . "',
'" . $_POST [ 'level3' ] . "',
'" . $_POST [ 'level4' ] . "',
'" . $_POST [ 'level5' ] . "',
'" . $_POST [ 'email' ] . "',
'" . $_POST [ 'msn' ] . "',
'" . $_POST [ 'yahoo' ] . "')" ; ?>
haakje vergeten
Gesponsorde links
Dit onderwerp is gesloten .