Reputation: 69
I want to make a form that submits data from user input into a database. However, when making the form, it does not appear in the browser.
Here is the code.
echo '<form name="submit" method="post" action="reservation_confirm.php">';
echo '<Confirm: <input type="submit" name="confirm" value="confirm">';
echo '</form>';
Upvotes: 1
Views: 1211
Reputation: 1
It's because of less sign on your second line. It is considered HTML opening tag. Try this:
echo '<form name="submit" method="post" action="reservation_confirm.php">';
echo '<Confirm: <input type="submit" name="confirm" value="confirm">';
echo '</form>';
Or simply remove it.
Upvotes: 0
Reputation: 1540
You have a less-than sign <
to many.
Change:
echo '<Confirm: <input type="submit" name="confirm" value="confirm">';
//----^ remove
To:
echo 'Confirm: <input type="submit" name="confirm" value="confirm">';
Upvotes: 3