1

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>';
2
  • 1
    Remove < from Confirm, you're trying to parse it as HTML. Commented Jul 15, 2015 at 20:02
  • 1
    or if you really want the < to show before Confirm then echo '&gt;Confirm: ... Commented Jul 15, 2015 at 20:03

2 Answers 2

3

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">';
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. I've realised that I've made some silly mistakes. I relatively new to coding so thank you for you your help.
@Blackman123 If this or any answer has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this.
0

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 '&#60;Confirm: <input type="submit" name="confirm" value="confirm">';
echo '</form>';

Or simply remove it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.