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
https://forums.phpfreaks.com/topic/245100-user-name-always-have-default-value/
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

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.