Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

session variable

session_start();
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
$name = $_GET["username"];
$sql = "SELECT 'id' FROM Users WHERE username='$name' limit 1";
$result = mysqli_query($link, $sql);
if ($result !== false) {
    $value = mysqli_fetch_field($result);
    $_SESSION['myid'] = $value;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #session #variable
ADD COMMENT
Topic
Name
2+4 =