<?
include("../dataincludes/connect.inc");
session_start();
if(!isset($uid))
{ ?>
<head><title>Distributor Login</title></head>
<body bgcolor=white link=blue vlink=blue alink=blue>
<center>
<form ACTION="<?=$PHP_SELF?>" METHOD="POST" NAME="login">
<table BORDER="1" WIDTH="400" CELLSPACING="0" CELLPADDING="2" bordercolordark="#003366"
bordercolorlight="#003366" height="203">
<tr>
<th COLSPAN="2" height="83"><img border="0" src="onecardyellow.jpg" width="343"
height="61"></th>
</tr>
<tr>
<th ALIGN="RIGHT" BGCOLOR="#C0C0C0" height="23"><font face="Arial, Helvetica, sans-serif">Username:</font></th>
<td BGCOLOR="#C0C0C0" height="23"><input TYPE="TEXT" SIZE="20" NAME="Loginusername" VALUE> </td>
</tr>
<tr>
<th ALIGN="RIGHT" BGCOLOR="#C0C0C0"><font face="Arial, Helvetica, sans-serif">Password:</font></th>
<td BGCOLOR="#C0C0C0"><input TYPE="Password" SIZE="20" NAME="Loginpassword"> </td>
</tr>
<tr>
<th COLSPAN="2" height="50"><input TYPE="SUBMIT" VALUE="Login">
<font face="Arial, Helvetica, sans-serif"><a href="signup.html"
target="_self">Distributor Sign Up</a></font> <input TYPE="RESET"
VALUE="Reset" NAME="btnReset"> </th>
</tr>
</table>
</form>
</center>
</div>
</body>
<?php exit;}
session_register("Loginusername");
session_register("Loginpassword");
mysql_select_db("Marketplace_International",$db);
if (! @mysql_select_db("Marketplace_International") ) { echo( "<P>Unable to locate the database " . "database at this time.</P>" ); exit();}
$sql = "SELECT * FROM Distributor WHERE Username = '$Loginusername' AND Password = PASSWORD('$Loginpassword')";
$result = mysql_query($sql);
if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit();}
if (mysql_num_rows($result) == 0) {
session_unregister("Loginusername");
session_unregister("Loginpassword"); ?>
<head><title> Access Denied </title></head>
<body> <h1> Access Denied </h1>
<p>Your user ID or password is incorrect, or you are not a registered user on this site. To try logging in again, click <a href="<?=$PHP_SELF?>">here</a>. To register for instant access, click <a href="../distributor/signup.html">here</a>.</p>
</body>
<?php exit;}
$username = mysql_result($result,0,"Username");
?>
I have an error where it says session_start() saying :
Fatal error: Call to unsupported or undefined function session_start() in ../dataincludes/template.inc on line 5
why can't it start?
Thanks,
Steve