Jump to content

Parse error: parse error, unexpected T_ECHO in e:\domains\m\myhabs.co.uk\user\ht


rofl90

Recommended Posts

heres whole code ftr

<?php

session_start();

$host = "mysql10.streamline.net";

$user = "x";

$pass = "x";

$db = "prowebdes1";



$ms = mysql_connect($host, $user, $pass);

if(!$ms) { echo "Error connecting to database.\n"; }

mysql_select_db($db);



if($_GET['login'] == "login") {

$user1_post = addslashes($_POST["username_post"]);

$pass1_post = addslashes($_POST["password_post"]);

$pass1_post = md5($pass1_post);

if($user1_post == "" or $pass1_post == "") { echo "<b>You Did Not Enter A Password</b>"; exit; }



list($user) = mysql_fetch_array(mysql_query("SELECT `username` FROM `staff` WHERE username='$user1_post'"));

list($pass) = mysql_fetch_array(mysql_query("SELECT `password` FROM `staff` WHERE password='$pass1_post'"));



if($user1_post == "$user" and $pass1_post == "$pass") {

$sql = mysql_query("SELECT * FROM `staff` WHERE username='$user' AND password='$pass'");

if(mysql_num_rows($sql)!= 1) { exit; }

$result = mysql_fetch_array($sql);



$_SESSION['session_username'] = $result['username'];

$_SESSION['session_level'] = $result['level'];

$_SESSION['session_ip'] = $_SERVER['REMOTE_ADDR'];



echo "<meta http-equiv=\"refresh\" content=\"0;url=main.php\">";

        exit;

} else { echo "<b>Your Username And Password Did Not Match</b>"; }

} else { ?>



<body bgcolor="#F45000" bgproperties="fixed" style="background-image: url('habboback.gif')">







<p align="center"> 

</p>



<center>

<div align="center">

<table width="329" height="3" style="border-collapse: collapse" cellpadding="0" cellspacing="0" id="table2">

<tr>

			<td width="330" height="11" align="center">

                </td>

		</tr>

<tr>

			<td align="center" width="400" background="hk_middle.gif" height="342">

			<form action="<?php echo "$PHP_SELF"; ?>?login=login" method="POST">

                  <font size="1"><br>

				 <img border="0" src="enterHH%20copy.gif" width="105" height="106"><br>

 </font><table border="0" id="table3" width="252" height="87">

<tr>

	<td>

	<p align="center"><b><font size="1" face="Verdana">Username:</font></b></td>

	<td><?

echo "<select size='1' name='username_post'>

<option selected>Choose Your Name</option>";

include('dbConfig.php');

$result = mysql_query("SELECT * FROM `staff`");

while($worked = mysql_fetch_array($result)) {

$username = $worked["username"];

echo "<option value=$username>$username</option>";

}

mysql_close(); ?>

</select></td>

	<td height="77" rowspan="4"> </td>

	</tr>

<tr>

	<td>

	<p align="center"><font size="1" face="Verdana"><b>Password:</b></font></td>

	<td>

	<p align="center"><font color="#FFFFFF" size="1" face="Verdana"> 

	<input type="password" name="password_post" size="26"></font></td>

</tr>

<tr>

	<td width="62"></td>

	<td width="172">

	 <input type='image' name='myclicker' src='hk_button.gif'></td>

	</tr>

	<tr>

	<td valign="top" colspan="2">

	<p align="center"></td>

	</tr>

</table>

<p align="center"><font face="Verdana" size="1" color="#FFFFFF">Warning Your IP Address is 
<?php
$ipa = getenv("REMOTE_ADDR")
echo "$ipa";
?>
Authorised FlyTropica staff only, we will do everything in our power to track down any 

unauthorised people. Abuse of this tool is strictly against the terms and 

conditions of service.</font></p>

</form></td>

</tr>

</table>



</div>













<p align="center"> </p>















<?php } ?>

Link to comment
Share on other sites

Thanks but now it won't show - But it doesn't give errors!

 

;D

 

But it won't show for some reason it displays like this

Warning Your IP Address is Authorised

lol

 

Also how would I log the ip address in a file/table(mysql) of which I can check for unauthorised attempts?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.