Jump to content

[SOLVED] Isset


phrozenflame

Recommended Posts

What is the purpose and reasoning behind the isset() function.  If you set a variable to something you should already know 100% that it is already set, why would you need isset() to tell you what you already know, what are the purposes and reasons behind this, I already read over www.php.net manuals a few times, under that section, but I still don't grasp this concept, I know unset() takes a variable off I guess you use that when you have a variable, and want to cut that variable off so you can use the same variable name later in the script, but isset() makes absolutely nosense to me, I know for debugging you could check your variables to make sure they are set, but I thought if you set them they were set, no if's ands or buts, the more help I get on this the better, and thank you in advance.
Link to comment
https://forums.phpfreaks.com/topic/32210-solved-isset/
Share on other sites

After I dig deeper into php I am learning sql, and it's variations including mysql, but I was also told by numerous people, including people on this board, that you shoudl validate forms with javascript, and process them with php, if this is true then I would have no need for the isset() function in the forms right
Link to comment
https://forums.phpfreaks.com/topic/32210-solved-isset/#findComment-149506
Share on other sites

Never depend on Javascript for validating forms.

What happens if someone who has Javascript turned off fills out the form? What happens if a spammer screenscrapes your form and sends data directly to the processing script?

You still would need the isset() function, if your script does one thing if the form was submitted and something else if it hasn't be submitted.

Ken
Link to comment
https://forums.phpfreaks.com/topic/32210-solved-isset/#findComment-149509
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.