Save PHP Post Data to string -
I have simple PHP code; I But I can not save it in the variable. I got this error Any ideas? $ _ POST ["email"]; I can resonate correctly.
var email = $ _POST ["email"];
Parse error: syntax error, unexpected T_VAR
Please read. You need to change:
var email = $ _ POST ["email"];
to
$ email = $ _ POST ["email"];
If you want to assign the php value to the JavaScript variable, then it will:
var email = '& lt ;? Php echo $ _POST ["email"]; ? & Gt; ';
Comments
Post a Comment