Isset function

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Sunny
New php-forum User
New php-forum User
Posts: 23
Joined: Wed Nov 30, 2011 6:51 am

Isset function

Postby Sunny » Mon Oct 28, 2013 3:15 am

Hi

Kindly help me what does this statement actually checks

if(isset($_POST['add']))

I have Input field with Type = "Submit" & ID = "add"

Thanks

MarioParty
New php-forum User
New php-forum User
Posts: 42
Joined: Tue Aug 02, 2011 2:52 am

Re: Isset function

Postby MarioParty » Sat Dec 28, 2013 3:31 pm

http://www.php.net/isset

http://techtalk.virendrachandak.com/php ... z2oobovYAy

This will do exactly as it says. If the variable $_POST['add'] is set then TRUE will be returned (unless the value is NULL).

$_POST['add'] will only be set if you have posted a form containing an input with the name "add" or if you have set a value for it yourself in the code.


Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest