-2

I have trying to create a login form and come across the following error

Parse error: syntax error, unexpected ''; ' (T_CONSTANT_ENCAPSED_STRING)

$mypassword='.$_POST['mypassword']';

how can i solve it

many thanks

Rizier123
  • 57,440
  • 16
  • 89
  • 140

1 Answers1

0

Problem is that you are using ' under '. You have to use " under ' or ' under " or you can escape it by /

Convert this

$mypassword='.$_POST['mypassword']';

to this

$mypassword=$_POST["mypassword"];
Anik Islam Abhi
  • 24,762
  • 8
  • 55
  • 78