PDA

View Full Version : Need DJ Panel Help.



ScottDiamond
27-01-2007, 11:43 AM
Yo. I've edited Housekeeping (FIXED) under dentafrice/belcame's permission. However, I always get an error saying unexpected $end in *ADDRESS* on line 157. Line 157 has nothing there and it's the very bottom of the code. Do I put in ?> or something? :S

Thanks.

Blob
27-01-2007, 11:59 AM
If it ends with a html code, or even a ?> you will need a } above the ending, or if it ends with a html code put <? } ?> at the bottom.

ScottDiamond
27-01-2007, 01:27 PM
It's OK - trav fixed it over MSN. +Rep to you snail aswel for telling me the same thing trav said. xD

Edit: Need to spread. "/

I've got one more problem:

http://consolefm.co.uk/staff/request.php

When you send in the request, text fields come up which I don't want. This is the code:


<? session_start();
include 'dbConfig.php';
$ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user
?>
<?
if($_GET["action"] == "send") {
if($dj_name == "Select a DJ") { echo "<b><font face=Verdana color=darkred size=2>You Must Select a Dj!<br>"; exit; }
$dj_name = $_POST["dj_name"];
$request = stripslashes($_POST["request"]);
$type = $_POST["type"];
$ip = getenv("REMOTE_ADDR");
$username = $_POST['username'];
$query = mysql_query("INSERT INTO `requests` (`habboname`, `type`, `dj_name`, `message`, `ip`, `date`) VALUES('$username', '$type', '$dj_name', '$request', '$ip', NOW() )");
echo "<font face='Verdana' size='1' color='#000000'>Thanks for your $type, <b>$username!</b> ConsoleFM's DJ $dj_name has received your $type. Your IP: <b>$ip</b> has been logged and sent to the DJ. Innapropriate messages will be dealt with.</font>";} else {
echo "
<form method='post' action='$PHP_SELF?action=send'>

<table border='0'>
<tr>

<font face='Verdana' size='1' color='#000000'><strong>Habbo Name:</strong></font><input name=\"username\" type=\"text\" id=\"username\">

<td valign='top' align='left'><font face='Verdana' size='1' color='#000000'><b>Type:</b><br>
<font size='1' face='Verdana'><select name='type' size='1'>
<option value='DJ Request'>Request</option>
<option value='DJ Shoutout'>Shoutout</option>
<option value='DJ Joke'>Joke</option>
<option value='DJ Other'>Other</option>";}
echo "</select></font></td>
</tr><tr>
<td valign='top' align='left'><font face='Verdana' size='1' color='#183139'><b>Dj Name:</b><br>
<select size='1' name='dj_name'>
<option selected>Select a DJ</option>
";
$result = mysql_query("SELECT * FROM `staff`");
while($worked = mysql_fetch_array($result)) {
$rusername = $worked["username"];
echo "<option value=$rusername>DJ $rusername</option>
";
mysql_close();
}
echo "</select></td>
</tr><tr>
<td valign='top' align='left'><font face='Verdana' size='1' color='#000000'><b>Message:</b><br>
<textarea rows='5' cols='23' type='text' name='request' class='button'></textarea></font></td>
</tr>
<tr>
<td valign='top' align='left'><font face='Verdana' size='1' color='#000000'><input type='submit' name='submit' value='Send'></font></td>
</tr>
</table>
</form>";
?>
<br>


<body text="#000000" bgcolor="#B22222" style="background-color: #FFFFFF">

Anyone know what it should be? ;D

Want to hide these adverts? Register an account for free!