Jump to content

User name always have default value


tanvirtonu

Recommended Posts

Hello I m new to php. I made a simple html form with two textboxes- username and password but when I run them they always have some default values- admin and a password. Where did they get this default value. I didnt put any value in them. I use xampp as php-mysql server .

 

I have another question. What is the difference between-

 

If ( $variable )  and  If ( isSet($variable) )  and if ( empty($variable) )

Link to comment
Share on other sites

my guess (without seeing any code) is that your browser is storing the values and is auto filling the form

 

as for you second question

 

if($variable)

 

checks if the value of the variable is true (or the equivalent of true)

 

isset($variable)

 

checks if the variable has been initialised

 

empty($variable)

 

checks if the variable has been initialised and has a value

Link to comment
Share on other sites

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.