Jump to content

if(isset($_POST["price"] && .........?


eduard
 Share

Recommended Posts

And can someone explain this line please? if(isset($_POST['price']) && isset($_POST['description']) && isset($_POST['quantity'])){

Edited by eduardchile
Link to comment
Share on other sites

isset($var) checks to see if a variable has been set to some value. It is commonly used to check whether form values have been set. You might want to do this because your system requires a user name or password. If these are not set, your system can return the user to the login form. It is also a good idea to test whether a variable is set before you try to read the variable's contents. Trying to read an unset variable generates a warning.EDIT: the && operator makes sure that ALL those variables are set. Read it like the word "and".

Edited by Deirdre's Dad
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...