sorry to annoy u again but i have this code and i can't seem to get it to work all it says is
Parse error: parse error, unexpected $ in /home/p/ppp/public_html/register.php on line 198
but i dont have a $ on line 198
anyway here it is... Hope it nutting stupid lol
- Code: Select all
<?php
include("config.php");
// connect to the mysql server
$link = mysql_connect($server, $db_user, $db_pass)
or die ("Could not connect to mysql because ".mysql_error());
// select the database
mysql_select_db($database)
or die ("Could not select database because ".mysql_error());
// check if the username is taken
$check = "select id from $table where username = '".$_POST['username']."';";
$qry = mysql_query($check)
or die ("Could not match data because ".mysql_error());
$num_rows = mysql_num_rows($qry);
if ($num_rows != 0) {
echo "<html>
<head>
<title>:: Peer Pressure Possie ::</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
</head>
<body bgcolor=\"#000000\" text=\"#FFFFFF\" link=\"#FFFFFF\" vlink=\"#FFFFFF\" alink=\"#FFFFFF\" leftmargin=\"0\" topmargin=\"0\">
<!-- ImageReady Slices (layout.psd) -->
<!-- End ImageReady Slices -->
<div align=\"center\">
<center>
<table border=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"100%\"><div align=\"center\">
<center>
<table width=\"700\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td colspan=\"4\">
<img src=\"images/index_01.gif\" width=\"700\" height=\"14\"></td>
</tr>
<tr>
<td rowspan=\"4\">
<img src=\"images/index_02.gif\" width=\"36\" height=\"486\"></td>
<td colspan=\"2\" background=\"images/index_03.gif\" width=\"635\" height=\"333\" valign=\"top\">
</center>
</center>
<table border=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"14\">
<tr>
<td width=\"100%\" valign=\"top\">
<p align=\"center\"><font size=\"6\" face=\"Impact\">Error<br></font><font size=\"2\" face=\"Arial\">Okay...
The username you have choosen has already been taken... But dont cry just choose another. <a href=\"javascript:history.go(-1)\">Click here to go back</a></font></p>
</td>
</tr>
</table>
</td>
<center>
<center>
<td rowspan=\"4\">
<img src=\"images/index_04.gif\" width=\"29\" height=\"486\"></td>
</tr>
<tr>
<td colspan=\"2\">
<img src=\"images/index_05.gif\" width=\"635\" height=\"24\"></td>
</tr>
<tr>
<td rowspan=\"2\">
<img src=\"images/index_06.gif\" width=\"177\" height=\"129\"></td>
<td background=\"images/index_07.gif\" width=\"458\" height=\"109\">
<table border=\"0\" width=\"100%\" height=\"100\" cellspacing=\"0\" cellpadding=\"10\">
<tr>
<td width=\"92%\" valign=\"top\">
<iframe src=\"menu.html\" name=\"menu\" width=\"408\"
height=\"86\" frameBorder=\"0\" scrolling=\"no\"></iframe>
</td>
<td width=\"8%\"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img src=\"images/index_08.gif\" width=\"458\" height=\"20\"></td>
</tr>
</table>
</center>
<font face=\"Arial\" size=\"1\">Site made by Daren Wilkinson
</div>
</font></center>
</td>
</tr>
</table>
</div>
</body>
</html>";
exit;
}
else {
// insert the data
$insert = mysql_query("INSERT INTO users (
username,
password,
regdate,
email,
website,
location,
show_email,
last_login)
VALUES (
'".$_POST['username']."',
'".$_POST['password']."',
'".$today = date("j d, Y")."',
'".$_POST['email']."',
'".$_POST['website']."',
'".$_POST['location']."',
'".$_POST['show_email']."',
'Never')")
or die("Could not insert data because ".mysql_error());
// print a success message
echo "<html>
<head>
<title>User Registration</title>
</head>
<body>
<div align=\"center\">
<center>
<table border=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"100%\"><div align=\"center\">
<center>
<table width=\"700\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td colspan=\"4\">
<img src=\"images/index_01.gif\" width=\"700\" height=\"14\"></td>
</tr>
<tr>
<td rowspan=\"4\">
<img src=\"images/index_02.gif\" width=\"36\" height=\"486\"></td>
<td colspan=\"2\" background=\"images/index_03.gif\" width=\"635\" height=\"333\" valign=\"top\">
</center>
</center>
<table border=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"14\">
<tr>
<td width=\"100%\" valign=\"top\">
<p align=\"center\"><font size=\"6\" face=\"Impact\">Sucess!!!<br></font><font size=\"2\" face=\"Arial\">Done!...
You are now registered to the PPP website.<br>
Oh... btw you will notice a Public Pic's Section in the Gallery, this section is for you! Go crazy add lots ov pics, remember it is up to you to keep that part of the site exciting! Here is the link to the Upload Page <a href=\"http://mandrake.polarhome.com/~galleryp/gallery/The_Publics_Pics/addphoto.php\">Upload Pictures Now</a></font></p>
</td>
</tr>
</table>
</td>
<center>
<center>
<td rowspan=\"4\">
<img src=\"images/index_04.gif\" width=\"29\" height=\"486\"></td>
</tr>
<tr>
<td colspan=\"2\">
<img src=\"images/index_05.gif\" width=\"635\" height=\"24\"></td>
</tr>
<tr>
<td rowspan=\"2\">
<img src=\"images/index_06.gif\" width=\"177\" height=\"129\"></td>
<td background=\"images/index_07.gif\" width=\"458\" height=\"109\">
<table border=\"0\" width=\"100%\" height=\"100\" cellspacing=\"0\" cellpadding=\"10\">
<tr>
<td width=\"92%\" valign=\"top\">
<iframe src=\"menu.html\" name=\"menu\" width=\"408\"
height=\"86\" frameBorder=\"0\" scrolling=\"no\"></iframe>
</td>
<td width=\"8%\"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img src=\"images/index_08.gif\" width=\"458\" height=\"20\"></td>
</tr>
</table>
</center>
<font face=\"Arial\" size=\"1\">Site made by Daren Wilkinson -
There is
</div>
</font></center>
</td>
</tr>
</table>
</div>
</body>
</html>";
?>