I'm pretty new to working with MySQL, so anyway I downloaded a login/register system which I am working on for learning purposes.
Anyway I've been told that the MySql is old and was wondering if anyone could give me a hand and tell me more about this, I believe it is to do with the word WHERE being used in the query and it is outdated or something?
Code:
<?php
ob_start();
session_start();
require_once 'dbconnect.php';
// if session is not set this will redirect to login page
if( !isset($_SESSION['user']) ) {
header("Location: index.php");
exit;
}
// select loggedin users detail
$res=mysql_query("SELECT * FROM users WHERE userId=".$_SESSION['user']);
$userRow=mysql_fetch_array($res);
?>
Also I plan to work on a members page showing all the members registered if anyone has any tips for this I would appreciate it.