Biske94 Posted January 22, 2018 Report Share Posted January 22, 2018 Okay this is a newbie question but I know how it works but I just want to know how. So this code for example: if(isset($_POST['submit'])){ // 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' Thanks! Quote Link to comment Share on other sites More sharing options...
administrator Posted January 25, 2018 Report Share Posted January 25, 2018 Hi, It has been a while, but why use isset on the post variable? Stef Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.