Jump to content

Parse error: syntax error, unexpected T_STRING in /home/monk3h/public_html/Jay/g


Monk3h

Recommended Posts

Can anyone see the error? Cause i cant see what iv done wrong for the life of me. =/

 

Error: Parse error: syntax error, unexpected T_STRING in /home/monk3h/public_html/Jay/gamefolder/register.php on line 73

 

 

 

<?php include ("head.php"); ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #D1BFAB;
}
.style1 {
font-family: "Gill Sans MT";
color: #804040;
}
-->
</style></head>
?>

<?php
Print"<form method=post action=register.php?action=register>
<body><center>
<table width='755' height='482' border='0' cellpadding='0' cellspacing='0' bgcolor='#D1BFAB'>
  <tr>
    <td height='95' colspan='3' background='images/topimg.png'> </td>
  </tr>
  <tr>
    <td width='42' height='395' rowspan='2' background='images/leftimg.png'> </td>
    <td width='676' background='images/middleimg2.png'><img src='images/banner.png' width='676' height='100' /></td>
    <td width='42' rowspan='2' background='images/rightimg.png'> </td>
  </tr>
  <tr>
    <td height='184' background='images/middleimg2.png'><table width='679' border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td height='87' colspan='2'><p align='center' class='style1'><img src='images/rmessage.png' width='500' height='150'></p>          </td>
      </tr>
      <tr>
        <td width='96' height='22'><img src='images/ruser.png' width='150' height='20' /></td>
        <td width='583'><label>
          <input type='text' name='user' />
        </label></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/remail.png' width='150' height='20' /></div></td>
        <td><input type='text' name='email' /></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/rpass.png' width='150' height='20' /></div></td>
        <td><input type='text' name='pass' /></td>
      </tr>
      <tr>
        <td><img src='images/rgender.png' width='150' height='20'></td>
        <td><label>
          <select name='gender'>
            <option>Male</option>
            <option>Female</option>
            </select>
        </label></td>
      </tr>
      <tr>
        <td height='34'><div align='left'><a href='index.php'><img src='images/back.png' width='150' height='20' border='0' /></a></div></td>
        <td><img src='images/signup.png' width='150' height='30' /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan='3'><img src='images/bottomimg.png' width='760' height='103' /></td>
  </tr>
</table>
</center></form>";

Print"<?php
if ($action == register) {
if (!$user) {
	print "You must fill out all fields.";                                                                    // Line 73
	include("foot.php");
	exit;
}
elseif (!$email) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;

elseif (!$pass) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;
}
}
$dupe1 = mysql_num_rows(mysql_query("select * from players where user='$user'"));
elseif ($dupe1 > 0) {
	print "Someone already has that username.";
	include("foot.php");
	exit;
}
$dupe2 = mysql_num_rows(mysql_query("select * from players where email='$email'"));
elseif ($dupe2 > 0) {
	print "Someone already has that email.";
	include("foot.php");
	exit;
}


mysql_query("insert into players (user, email, pass) values('$user','$email','$pass')") or die("Could not register.");

print "You are now registered to play, $user.";
print "<br><a href=index.php>login</a>";
exit;
}
?>


?>
</body>
</html>

<?php include ("head.php"); ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #D1BFAB;
}
.style1 {
font-family: "Gill Sans MT";
color: #804040;
}
-->
</style></head>
?>

<?php
Print"<form method=post action=register.php?action=register>
<body><center>
<table width='755' height='482' border='0' cellpadding='0' cellspacing='0' bgcolor='#D1BFAB'>
  <tr>
    <td height='95' colspan='3' background='images/topimg.png'> </td>
  </tr>
  <tr>
    <td width='42' height='395' rowspan='2' background='images/leftimg.png'> </td>
    <td width='676' background='images/middleimg2.png'><img src='images/banner.png' width='676' height='100' /></td>
    <td width='42' rowspan='2' background='images/rightimg.png'> </td>
  </tr>
  <tr>
    <td height='184' background='images/middleimg2.png'><table width='679' border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td height='87' colspan='2'><p align='center' class='style1'><img src='images/rmessage.png' width='500' height='150'></p>          </td>
      </tr>
      <tr>
        <td width='96' height='22'><img src='images/ruser.png' width='150' height='20' /></td>
        <td width='583'><label>
          <input type='text' name='user' />
        </label></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/remail.png' width='150' height='20' /></div></td>
        <td><input type='text' name='email' /></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/rpass.png' width='150' height='20' /></div></td>
        <td><input type='text' name='pass' /></td>
      </tr>
      <tr>
        <td><img src='images/rgender.png' width='150' height='20'></td>
        <td><label>
          <select name='gender'>
            <option>Male</option>
            <option>Female</option>
            </select>
        </label></td>
      </tr>
      <tr>
        <td height='34'><div align='left'><a href='index.php'><img src='images/back.png' width='150' height='20' border='0' /></a></div></td>
        <td><img src='images/signup.png' width='150' height='30' /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan='3'><img src='images/bottomimg.png' width='760' height='103' /></td>
  </tr>
</table>
</center></form>";

<?php
if ($action == register) {
if (!$user) {
	print "You must fill out all fields.";                                                                    // Line 73
	include("foot.php");
	exit;
}
elseif (!$email) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;

elseif (!$pass) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;
}
}
$dupe1 = mysql_num_rows(mysql_query("select * from players where user='$user'"));
elseif ($dupe1 > 0) {
	print "Someone already has that username.";
	include("foot.php");
	exit;
}
$dupe2 = mysql_num_rows(mysql_query("select * from players where email='$email'"));
elseif ($dupe2 > 0) {
	print "Someone already has that email.";
	include("foot.php");
	exit;
}


mysql_query("insert into players (user, email, pass) values('$user','$email','$pass')") or die("Could not register.");

print "You are now registered to play, $user.";
print "<br><a href=index.php>login</a>";
exit;
}
?>


?>
</body>
</html>

Okay now when i click Signup it wont go thru to the register action..? :S

 

 

<?php include ("head.php"); ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #D1BFAB;
}
.style1 {
font-family: "Gill Sans MT";
color: #804040;
}
-->
</style></head>
?>

<?php
Print"<form method=post action=register.php?action=register>
<body><center>
<table width='755' height='482' border='0' cellpadding='0' cellspacing='0' bgcolor='#D1BFAB'>
  <tr>
    <td height='95' colspan='3' background='images/topimg.png'> </td>
  </tr>
  <tr>
    <td width='42' height='395' rowspan='2' background='images/leftimg.png'> </td>
    <td width='676' background='images/middleimg2.png'><img src='images/banner.png' width='676' height='100' /></td>
    <td width='42' rowspan='2' background='images/rightimg.png'> </td>
  </tr>
  <tr>
    <td height='184' background='images/middleimg2.png'><table width='679' border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td height='87' colspan='2'><p align='center' class='style1'><img src='images/rmessage.png' width='500' height='150'></p>          </td>
      </tr>
      <tr>
        <td width='96' height='22'><img src='images/ruser.png' width='150' height='20' /></td>
        <td width='583'><label>
          <input type='text' name='user' />
        </label></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/remail.png' width='150' height='20' /></div></td>
        <td><input type='text' name='email' /></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/rpass.png' width='150' height='20' /></div></td>
        <td><input type='text' name='pass' /></td>
      </tr>
      <tr>
        <td><img src='images/rgender.png' width='150' height='20'></td>
        <td><label>
          <select name='gender'>
            <option>Male</option>
            <option>Female</option>
            </select>
        </label></td>
      </tr>
      <tr>
        <td height='34'><div align='left'><a href='index.php'><img src='images/back.png' width='150' height='20' border='0' /></a></div></td>
        <td><a href='register.php?action=register'><img src='images/signup.png' width='150' height='30' border='0' /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan='3'><img src='images/bottomimg.png' width='760' height='103' /></td>
  </tr>
</table>
</center></form>";

if ($action == register) {
if (!$user) {
	print "You must fill out all fields.";                                                                    // Line 73
	include("foot.php");
	exit;
}
if (!$email) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;

if (!$pass) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;
}
}
$dupe1 = mysql_num_rows(mysql_query("select * from players where user='$user'"));
if ($dupe1 > 0) {
	print "Someone already has that username.";
	include("foot.php");
	exit;
}
$dupe2 = mysql_num_rows(mysql_query("select * from players where email='$email'"));
if ($dupe2 > 0) {
	print "Someone already has that email.";
	include("foot.php");
	exit;
}


mysql_query("insert into players (user, email, pass) values('$user','$email','$pass')") or die("Could not register.");

print "You are now registered to play, $user.";
print "<br><a href=index.php>login</a>";
exit;
}
?>
</body>
</html>

<?php include ("head.php"); ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #D1BFAB;
}
.style1 {
font-family: "Gill Sans MT";
color: #804040;
}
-->
</style></head>
?>

<?php
Print"<form method=post action='register.php?action=register'>
<body><center>
<table width='755' height='482' border='0' cellpadding='0' cellspacing='0' bgcolor='#D1BFAB'>
  <tr>
    <td height='95' colspan='3' background='images/topimg.png'> </td>
  </tr>
  <tr>
    <td width='42' height='395' rowspan='2' background='images/leftimg.png'> </td>
    <td width='676' background='images/middleimg2.png'><img src='images/banner.png' width='676' height='100' /></td>
    <td width='42' rowspan='2' background='images/rightimg.png'> </td>
  </tr>
  <tr>
    <td height='184' background='images/middleimg2.png'><table width='679' border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td height='87' colspan='2'><p align='center' class='style1'><img src='images/rmessage.png' width='500' height='150'></p>          </td>
      </tr>
      <tr>
        <td width='96' height='22'><img src='images/ruser.png' width='150' height='20' /></td>
        <td width='583'><label>
          <input type='text' name='user' />
        </label></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/remail.png' width='150' height='20' /></div></td>
        <td><input type='text' name='email' /></td>
      </tr>
      <tr>
        <td><div align='left'><img src='images/rpass.png' width='150' height='20' /></div></td>
        <td><input type='text' name='pass' /></td>
      </tr>
      <tr>
        <td><img src='images/rgender.png' width='150' height='20'></td>
        <td><label>
          <select name='gender'>
            <option>Male</option>
            <option>Female</option>
            </select>
        </label></td>
      </tr>
      <tr>
        <td height='34'><div align='left'><a href='index.php'><img src='images/back.png' width='150' height='20' border='0' /></a></div></td>
        <td><a href='register.php?action=register'><img src='images/signup.png' width='150' height='30' border='0' /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan='3'><img src='images/bottomimg.png' width='760' height='103' /></td>
  </tr>
</table>
</center></form>";

if ($action == register) {
if (!$user) {
	print "You must fill out all fields.";                                                                    // Line 73
	include("foot.php");
	exit;
}
if (!$email) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;

if (!$pass) {
	print "You must fill out all fields.";
	include("foot.php");
	exit;
}
}
$dupe1 = mysql_num_rows(mysql_query("select * from players where user='$user'"));
if ($dupe1 > 0) {
	print "Someone already has that username.";
	include("foot.php");
	exit;
}
$dupe2 = mysql_num_rows(mysql_query("select * from players where email='$email'"));
if ($dupe2 > 0) {
	print "Someone already has that email.";
	include("foot.php");
	exit;
}


mysql_query("insert into players (user, email, pass) values('$user','$email','$pass')") or die("Could not register.");

print "You are now registered to play, $user.";
print "<br><a href=index.php>login</a>";
exit;
}
?>
</body>
</html>

But when i click the register Image it goes to register.php?action=register.. But the Action, register dosnt happen. :S

 

Hardly surprising.

 

<a href='register.php?action=register'><img src='images/signup.png' width='150' height='30' border='0' />

 

In the first place that will NOT submit any data.

 

In the second place, 'action' probably needs to be retrieved from the $_GET array instead of assuming that register_globals is ON (not likely in any recent php installation).  Of course, that isn't going to help as nothing else is passed from that link.  You need to review the html construction you're using in the form.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.