Jump to content

Recommended Posts

Well I know why, if I don't then I get a variable is undefined message.

 

It just seems such a pain to me, for example I have a big long list for each submitted form field like:

 

if (!isset($E_Email)){$E_Email= null;}

 

Is there a way of just enabling this for every variable by default?

 

 

In most other languages you have to define the variable for you to use them. It is good practice and ensures that the variable will contain what you expect it to.

 

Security reasons is probably the main reason, but it also helps the server out since it will not search all variables and find out that one is not there, it sees it and returns it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

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.