Im totaly new in PHP, and a friend let me use he's scripts, now here is a problem, i did all i had to and i only get:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/www/stisan.hostingrapid.com/register.php:4) in /home/www/stisan.hostingrapid.com/header2.php on line 1
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/stisan.hostingrapid.com/register.php:4) in /home/www/stisan.hostingrapid.com/header2.php on line 1
Sesion has expired.[GO BACK]
Can i get help?
here is register.php:
Quote:
<html>
<head>
<?php include("header2.php"); ?>
<?php
$gamename = "Evolution";
echo "<title>$gamename</title>";
?>
</head>
<body bgcolor="#FFFFFF" text="black" link="black" alink="grey" vlink="black">
<div align="center">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#CCCCCC">
<td width="25&" height="30"> </td>
<td width="50%" height="30">
<div align="center"><font color="#FFFFFF">
<?php
echo "<b><font size='5' color='#000099'>$gamename
</font></b></font></div></td>";
?>
<td width="25%" height="30"> </td></tr>
<tr bgcolor="#666666">
<td width="25%" height="30">
<div align="center">
<font color="#CCCCCC"><b><font color="#FFFFFF">MENU</font></b></font>
</div></td>
<td width="50%" height="30"> </td>
<td width="25%" height="30">
<div align="center"><b><font color="#FFFFFF">LINKS</font></b></div></td></tr>
<tr bgcolor="#666666">
<td width="25%" height="30" bgcolor="#CCCCCC" valign="top">
<p> <p>
<ul>
<font size="4"><b><a href="index.php">Home</a></b></font><p>
<font size="4"><b>Register</b></font><p>
<font size="4"><b><a href="lostpass.php">Lost password</a></b></font><p>
<font size="4"><b><a href="rules.php">Rules</a></b></font><p>
<font size="4"><b><a href="contact">Contact, us!</a></b></font>
</ul>
</td>
<td width="50%" height="30" bgcolor="#CCCCCC" valign="top">
<div align="center"> <p> <p align="center">
<font color="#0000CC">
<font color="#000099">
<b>Updates:</b>
</font></font>
<p> <p>
<font face="Georgia, Times New Roman, Times, serif" size="3">
<center>
Register to get your Evolution account now, and begin the game.<br>Password will be sent to E-mail.
<?php
$nump = mysql_num_rows(mysql_query("select * from playerdata"));
echo " <b>$nump</b> people already have signed up!";
?>
</center>
</font>
<p><font face="Georgia, Times New Roman, Times, serif" size="3">
Username:<input type=text name=user><br>
Email:<input type=text name=email><br>
Verify Email:<input type=text name=vemail><br>
<?php
echo "Referral ID:<input type=text name=referal readonly value=$referal><br><i>If you don't know what this is, leave it blank.</i>";
?><br>
<input type=submit value=Register>
</form>
<?php
if ($action == register) {
if (!$user || !$email || !$vemail ) {
echo "You must fill out all fields.";
include("foot.php");
exit;
}
$dupe1 = mysql_num_rows(mysql_query("select * from playerdata where user='$user'"));
if ($dupe1 > 0) {
echo "Someone already has that username.";
include("foot.php");
exit;
}
$dupe2 = mysql_num_rows(mysql_query("select * from playerdata where email='$email'"));
if ($dupe2 > 0) {
echo "Someone already has that email.";
include("foot.php");
exit;
}
if ($email != $email) {
echo "The emails do not match.";
include("foot.php");
exit;
}
$referal = strip_tags($referal);
$user = strip_tags($user);
$password = strip_tags($password);
if ($referal) {
mysql_query("update playerdata set referal=referal+1 where id=$referal");
}
$password = rand(10000 , 90000);
$message = "welcome to $gamename your pass is $pass login now and change it. have fun playing at $gamename. Webmaster";
mysql_query("insert into playerdata (user, email, password) values('$user','$email','$password')") or die("Could not register.");
mail("$email", "$gamename", $message,
"From: webmaster@{$_SERVER['SERVER_NAME']}\r\n"
."Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n"
."X-Mailer: PHP/" . phpversion()) or die("could not send mail");
echo "You are now registered to play, $user. Please check your e-mail for your pass and login now.";
echo "<br><a herf=index.php>login</a>";
}
?>
</font>
<td width="25%" height="30" bgcolor="#CCCCCC" valign="top" align="center">
<p> <p><b><font size="4">
Services
</font></b>
<p><font size="4"><b>
Prices
</b></font>
<p><font size="4"><b>
Order Form
</b></font>
<p><font size="4"><b>
Credit Cards
</b></font></td></tr>
<tr bgcolor="#666666"> <td width="25%" height="30" valign="top"></td>
<td width="50%" height="30" valign="top"> </td>
<td width="25%" height="30" valign="top" align="center"> </td></tr>
<tr bgcolor="#CCCCCC">
<td width="25%" height="30" valign="top"> </td>
<td width="50%" height="30" valign="top"> </td>
<td width="25%" height="30" valign="top" align="center">
© 2006 All rights reserved. Stisan.hostingrapid.com.
</td></tr></table>
<?php include("foot.php"); ?>
|
And here's the other, index.php:
Quote:
<?php include("header2.php"); ?>
<html>
<head>
<?php
$gamename = "Evolution";
echo "<title>$gamename</title>";
?>
</head>
<body bgcolor="#FFFFFF" text="black" link="black" alink="grey" vlink="black">
<div align="center">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#CCCCCC">
<td width="25&" height="30"> </td>
<td width="50%" height="30">
<div align="center"><font color="#FFFFFF">
<?php
echo "<b><font size='5' color='#000099'>$gamename
</font></b></font></div></td>";
?>
<td width="25%" height="30"> </td></tr>
<tr bgcolor="#666666">
<td width="25%" height="30">
<div align="center">
<font color="#CCCCCC"><b><font color="#FFFFFF">MENU</font></b></font>
</div></td>
<td width="50%" height="30"> </td>
<td width="25%" height="30">
<div align="center"><b><font color="#FFFFFF">AD'S</font></b></div></td></tr>
<tr bgcolor="#666666">
<td width="25%" height="30" bgcolor="#CCCCCC" valign="top">
<p> <p>
<ul>
<font size="4"><b>Home</b></font><p>
<font size="4"><b><a href="register.php">Register</a></b></font><p>
<font size="4"><b><a href="lostpass.php">Lost password</a></b></font><p>
<font size="4"><b><a href="rules.php">Rules</a></b></font><p>
<font size="4"><b><a href="contact">Contact, us!</a></b></font>
</ul>
</td>
<td width="50%" height="30" bgcolor="#CCCCCC" valign="top">
<div align="center"> <p> <p align="center">
<font color="#0000CC">
<font color="#000099">
<b>Updates:</b>
</font></font>
<p> <p>
<font face="Georgia, Times New Roman, Times, serif" size="3">
<center>
Username: <input type="text" name="user"><br>
Password: <input type="text" name="password"><br>
<input type="submit" value="Log in!"><br>
<?php
if (!$user || !$password) {
include("head.php");
echo "Please fill out all fields.";
include("foot.php");
exit;
}
include("head.php");
$logres = mysql_num_rows(mysql_query("select * from playerdata where user='$user' and password='$password'"));
if ($logres <= 0) {
echo "Login failed. If you have not already, please signup. Otherwise, check your spelling and login again.";
include("foot.php");
exit;
} else {
session_register("user");
session_register("pass");
echo " <br>Welcome back.<br>Please click below to continue..<br><br><center>[<a href=updates.php><b>Log In</b></a>]</center><br>";
}
include("config.php");
mysql_query("UPDATE playerdata SET logins=logins+1");
include("foot.php");
?>
</font>
<td width="25%" height="30" bgcolor="#CCCCCC" valign="top" align="center">
<p> <p><b><font size="4">
Services
</font></b>
<p><font size="4"><b>
Prices
</b></font>
<p><font size="4"><b>
Order Form
</b></font>
<p><font size="4"><b>
Credit Cards
</b></font></td></tr>
<tr bgcolor="#666666"> <td width="25%" height="30" valign="top"></td>
<td width="50%" height="30" valign="top"> </td>
<td width="25%" height="30" valign="top" align="center"> </td></tr>
<tr bgcolor="#CCCCCC">
<td width="25%" height="30" valign="top"> </td>
<td width="50%" height="30" valign="top"> </td>
<td width="25%" height="30" valign="top" align="center">
© 2006 All rights reserved. Stisan.hostingrapid.com.
</td></tr></table>
<?php include("foot.php"); ?>
|
Please help! im short on time