I have made a small PHP scripts over 2 pages, and this is what they look like.
Page 1:
<! DOCTYPE html>
<head>
<body>
<form method='post' action='handle.php'>
<p>To:<input type='text' name='To'></p>
<p>From:<input type='text' name='From' value='From:'></p>
<p>Subject:<input type='Subject' name='Subject'></p>
<p>Body:<textarea ROWS=60 COLS=40></textarea></p>
<input type='submit'>
</form>
</body>
</head>
Page 2:
<?php
$to = $_POST['To'];
$subject = $_POST['Subject'];
$body = $_POST['Body'];
$from = $_POST['From']
mail($to, $subject, $body, $from);
echo $from;
?>
And it gives me this error (and the ‘From:’ starting in the From box wasn’t deleted!):
Parse error: syntax error, unexpected T_STRING in /home/a8923462/public_html/handle.php on line 8
You’re missing your
;at the end of your$fromdeclaration.