Code Examples | 1) string gettype ( mixed $var ); // return variable type
2) /* associative array */
$row = $result->fetch_array(MYSQLI_ASSOC);
printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]);
3) if(!isset($_SESSION['username'])){
// go to login page code here.
// in login page, store data into session, use following:
$_SESSION['username']="username";
}
else{
$username=$_SESSION['username'];// get previous session and go your project page
}
session_register() function has been deprecated since PHP5.3
|