Skip to content

Instantly share code, notes, and snippets.

<?php
session_start();
include("Connect.php");
if(isset($_SESSION['logged_in'])){
$User = $_SESSION['Username'];
$UserQuery = mysql_query("SELECT * FROM user WHERE username='$User'");
$UserRow = mysql_fetch_assoc($UserQuery);
// These varibels is the only thing you must edit!
// Please enter your username for MySQL
var $MySQL_Username = "root";
// Please enter your password for MySQL
var $MySQL_Password = "";
// Please enter your database in MySQL
var $MySQL_Database = "SONI";
<?php
// Part of the Login template for the SONI projekt
//
// Check.php
// Page for checking for errors
// Copyright Niclas Mølby 2010
// Include the needed files
// Including the Database.php file for database requests