0

I'm trying to convert HTML to PHP and I got this error. This is my code. Error in the first line

echo "<h2>Welcome to INTI Shopping Website</h2>n";

echo " <form method="POST" action="#">
echo "<div class="imgcontainer">n";
echo "<img src="avatar.png" alt="Avatar" class="avatar">n";
echo "</div>n";

echo "<div class="container">n";
echo "<label for="uname"><b>Username</b></label>n";
echo "<input type="text" placeholder="Enter Username" name="username" required>n";

echo "<label for="psw"><b>Password</b></label>n";
echo "<input type="password" placeholder="Enter Password" name="password" required>n";
    
echo "<button type="submit">Login</button>n";
echo "<label>n";
echo "  <input type="checkbox" checked="checked" name="remember"> Remember me </label>n";
echo "</div>n";


echo "</form> n";
j08691
  • 204,283
  • 31
  • 260
  • 272
  • 2
    You're messing up the quotes. Just close the interpreter `?>`. Writing echoes like this is not good. There is no reason to wrap HTML in PHP. Better embed PHP in HTML. – Daniel W. Oct 28 '21 at 15:40
  • 1
    If you use `"` as the PHP string delimiter, use `'` as the HTML attribute delimiter, or vice versa. – Barmar Oct 28 '21 at 15:44

0 Answers0