Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to print the a statement using $_POST using the if statement

$
0
0
The instruction is like this:

There is a form, a text field in which the user will input his/her name.
if the name is input and the submit button is press then the value is pass to another document but when the user just clicks the submit button without filling up the text field with the name then it should say Error!

Example:
<td>Your name: </td>
<td><?php echo $_POST['FirstName'] ?></td>

that only processes to print the value of the user input but the instruction said that to print error if the user doesnt input something and has click the submit button..
i already used an if else statement but still it wont print the error!!

Any help will be appreciated..thank you.. :)
I am a beginner in php so hope you all consider my situation...

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>