Jump to content

Isset function


Recommended Posts

Okay this is a newbie question but I know how it works but I just want to know how.

So this code for example:


    // do some stuff

} else {

    // do some else stuff


This if statement will only do its code block if submit button is clicked or in nerds language if $_POST['submit'] is set.
So thats means that value of that submit button is NULL before clicking, but when we click that submit button we are giving it a value?

For example

<input type="submit" name="submit" value="someAwesomeValue">

if I click this button its value will be 'someAwesomeValue' which means I set $_POST['submit'] value to 'someAwesomeValue'

or in other words $_POST['submit'] = 'someAwesomeValue'


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...