sBosma
11-03-2007, 05:14 AM
Hello,
On the DJ says tutorial in the 'tutorials' section I followed instructions excactly but i'm still having some problems.
Parse error: syntax error, unexpected T_STRING in /home/habb0/public_html/HeadHabbo/dbconnect.php on line 3
Is what it says when I open edit.php
These are the php files:
EDIT.PHP
<?php
include('dbconnect.php'); $_POST = array_map('strip_tags',$_POST);
$_POST = array_map('htmlspecialchars',$_POST);
if (!get_magic_quotes_gpc()) { $_POST = array_map('addslashes',$_POST); }
if ($_POST[submit]) {
$message = $_POST[message];
$ip = $_POST[ip];
if($message==NULL) {
echo("You cannot leave your message blank.");
} else{
$message = htmlspecialchars($message);
$ip = htmlspecialchars($ip);
$query = mysql_query("INSERT INTO message (message, ip) VALUES('$message', '$ip')");
}
echo("Your DJ Message was successfully added and should now appear on the homepage.");
}
else {
echo"
<font size=\"4\">DJ Message/Says</font><br>To create your DJ Message, fill in the TEXT you would like below. HTML, BB Code and PHP have all been protected so you can not use any of those coding characters.<br><br><b>Your IP will be recorded for security reasons.</b><br><br>
<center>
<form method=\"POST\">
<input name=\"ip\" type=\"hidden\" value=\"$_SERVER[REMOTE_ADDR]\">
<textarea name=\"message\" cols=\"55\" rows=\"10\"></textarea><br>
<input type=\"submit\" value=\"Submit\" name=\"submit\">
</form>
</center>
";
}
echo" HTML here "; ?>
dbconnect.php
<?php
$connect = mysql_connect("localhost","User","Pass");
mysql_select_db(DATABASE NAME) or die(mysql_error());
?>
On the DJ says tutorial in the 'tutorials' section I followed instructions excactly but i'm still having some problems.
Parse error: syntax error, unexpected T_STRING in /home/habb0/public_html/HeadHabbo/dbconnect.php on line 3
Is what it says when I open edit.php
These are the php files:
EDIT.PHP
<?php
include('dbconnect.php'); $_POST = array_map('strip_tags',$_POST);
$_POST = array_map('htmlspecialchars',$_POST);
if (!get_magic_quotes_gpc()) { $_POST = array_map('addslashes',$_POST); }
if ($_POST[submit]) {
$message = $_POST[message];
$ip = $_POST[ip];
if($message==NULL) {
echo("You cannot leave your message blank.");
} else{
$message = htmlspecialchars($message);
$ip = htmlspecialchars($ip);
$query = mysql_query("INSERT INTO message (message, ip) VALUES('$message', '$ip')");
}
echo("Your DJ Message was successfully added and should now appear on the homepage.");
}
else {
echo"
<font size=\"4\">DJ Message/Says</font><br>To create your DJ Message, fill in the TEXT you would like below. HTML, BB Code and PHP have all been protected so you can not use any of those coding characters.<br><br><b>Your IP will be recorded for security reasons.</b><br><br>
<center>
<form method=\"POST\">
<input name=\"ip\" type=\"hidden\" value=\"$_SERVER[REMOTE_ADDR]\">
<textarea name=\"message\" cols=\"55\" rows=\"10\"></textarea><br>
<input type=\"submit\" value=\"Submit\" name=\"submit\">
</form>
</center>
";
}
echo" HTML here "; ?>
dbconnect.php
<?php
$connect = mysql_connect("localhost","User","Pass");
mysql_select_db(DATABASE NAME) or die(mysql_error());
?>