Problem with php and MySQL: inserting strings into database
| From: | Alexander Schunk | Date: | Fri, 23 Apr 2010 05:34:17 +0000 |
| Subject: | Problem with php and MySQL: inserting strings into database | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-30043@lists.php.net to get a copy of this message | ||
Hello,
i have a problem with php and mysql when inserting strings into a database.
I have the following syntax:
$sqlinsert = "INSERT INTO werte ('benutzername', 'passwort',
'name',
'vorname', 'Geburtsdatum', 'strasse', 'plz',
'ort', 'email')
VALUES('$_POST['benutzername']', '$_POST['passwort']',
'$_POST['name']', '$_POST['vorname']',
'$_POST['Geburtsdatum']',
'$_POST['straße']', '$_POST['plz']',
'$_POST['ort']',
'$_POST['email']')";
I want to read entries from an HTML form into a database.
When to use backticks in MySQL and what is this syntax: " '
I am getting an unexpected T_STRING .... error.
I am using php, mysql with xampp on windows xp.
In php.ini i have turned register_globals = on.
thank you.
yours sincerly
Alexander