SQL PHP HTML ASP JavaScript articles and free scripts to download

PHP isset function statement script and example

Some time we have to check the existence of a variable before using it for our further processing. The variable can be checked by using PHP isset function and the return value will be either true or false. Here is an example
<?Php
$x="some value"; // we have assigned a string to the variable $x here
if(isset($x)){        // checking the existence of the variable by using isset function
echo "The variable exists";} 
else{ echo " Variable does not exists ";}
?>
The code above will test the existence of the variable $x and since we have declared it at first line so the PHP IF condition will return true and the statement inside if condition will be evaluated. 
This function is used in PHP LOGIN SCRIPT   and PHP LOGIN LOGOUT script to check the existence of  session variables.
Google+
Chris Kavanagh10-02-2012
Very Nice Explanation. This really cleared it up for me. Thank You.
masroor javed30-04-2013
thnks for help,,,,,
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer