Code: Select all
<?php session_start(); ?>Code: Select all
$sql="SELECT * FROM `accounts` WHERE name = '$username' AND passworddb = '$password'";
$result=mysql_query($sql) or die(mysql_error());
$number = mysql_num_rows($result);
if ($number == "1") {
session_register("password");
session_register("username");But.... once I load up my next page, the user isnt logged in anymore. The next page has this code at the top:
Code: Select all
<?php session_start(); ?>Code: Select all
<?php
$sql="SELECT * FROM `accounts` WHERE name = '$username' AND passworddb = '$password'";
$result=mysql_query($sql);
$number = mysql_num_rows($result);
if ($number == "1") {