If isset POST

0 votes

I have a form on one page that submits to another page. What it does is it checks if the mail is filled but when I send an empty mail it just says it's set. 

step2.php:

<form name="new user" method="post" action="step2_check.php"> 
    <input type="text" name="mail"/> <br />
    <input type="password" name="password"/><br />
    <input type="submit"  value="continue"/>
</form>

step2_check.php:

if (isset($_POST["mail"])) {
    echo "Yes, mail is set";    
} else {    
    echo "N0, mail is not set";
}

What am I doing wrong here?

May 28, 2022 in PHP by Kichu
• 19,040 points
2,509 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

How to check if php session is already started or not?

Hello kartik, Use session_id(), it returns an empty string ...READ MORE

answered Apr 1, 2020 in PHP by Niroj
• 82,840 points
5,755 views
0 votes
1 answer

How to put an 'if clause' in an SQL string?

Hello @kartik, For your specific query, you can ...READ MORE

answered Jun 1, 2020 in PHP by Niroj
• 82,840 points
972 views
0 votes
1 answer

Error:Jquery .ajax method=“post” but $_POST empty

Hello @kartik, Instead of method: "post" you need to use type: ...READ MORE

answered Jun 16, 2020 in PHP by Niroj
• 82,840 points
3,677 views
0 votes
1 answer

How to drop a table if it exists?

Hello @kartik, No. That will drop the table only ...READ MORE

answered Jul 21, 2020 in PHP by anonymous
• 82,840 points
799 views
0 votes
1 answer

How to check if a string is JSON or not?

Hello @kartik, Use JSON.parse function isJson(str) { ...READ MORE

answered Aug 19, 2020 in PHP by Niroj
• 82,840 points
9,166 views
0 votes
1 answer

How I can make a query with MySQL that checks if the valuein a certain column contains certain data?

Hello @kartik, Try this query: mysql_query(" SELECT * FROM `table` WHERE `column` ...READ MORE

answered Sep 14, 2020 in PHP by Niroj
• 82,840 points
3,374 views
0 votes
0 answers

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

I'm running into a small issue with ...READ MORE

Aug 1, 2022 in PHP by Kithuzzz
• 38,000 points
2,665 views
+1 vote
2 answers

Scp Php files into server using gradle

Tru something like this: plugins { id ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points
1,593 views
0 votes
1 answer

How do I create folder under an Amazon S3 bucket through PHP API?

Of Course, it is possible to create ...READ MORE

answered Apr 24, 2018 in AWS by anonymous
11,447 views
0 votes
1 answer

Failure uploading Image on AmazonS3 with PHP SDK

Try this, I took it out from ...READ MORE

answered May 4, 2018 in AWS by Cloud gunner
• 4,670 points
4,495 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP