Unexpected character in input: ''' (ASCII=39)
i have following code:
<?php
header( 'Content-type: text/xml' );
mysql_connect( 'domain', 'user', 'password' );
mysql_select_db( 'database' );
mysql_query(" INSERT INTO user(userName,password,email)
VALUES(
'".$_POST['username']."',
'".md5($pass)."',
'".$_POST['email']."',
)" );
?>
When i try to load this in url:
http://xcode.domain.de/add.php?userName=test&password=test
I got this error on my server:
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /kunden//webseiten/xcode/add.php on line 15
Parse error: syntax error, unexpected '"' in /kunden/webseiten/xcode/add.php on line 15
can Somebody help on this?
thank you
ASCII 39 (decimal) is a single apostrophe.
The error that I see is an extra comma after the "email" line. Try this:
'".$_POST['username']."',
'".md5($pass)."',
'".$_POST['email']."'
链接地址: http://www.djcxy.com/p/69476.html
上一篇: 输入错误中意外的字符