tanvirtonu Posted August 18, 2011 Share Posted August 18, 2011 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) ) Quote Link to comment https://forums.phpfreaks.com/topic/245100-user-name-always-have-default-value/ Share on other sites More sharing options...
@ Posted August 18, 2011 Share Posted August 18, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/245100-user-name-always-have-default-value/#findComment-1258968 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.