[url]http://your-space.awardspace.com/
I am making a small version of myspace because i want to… ik… im just really bored, BUT when ever i go to add a comment to see if it works, it gets this error and its the first time i’ve ever seen it :/ so i dont know what to fix:
[CODE]
Parse error: parse error, unexpected T_LNUMBER in /home/www/your-space.awardspace.com/tristian/process.php on line 9
Also, how do i make it so a line break in the textarea translates into a <br> when i assign the value to a variable?
::EDIT::
Here is the code:
Acually form:
[CODE] <?php
// If error Stop
if(isset($HTTP_GET_VARS[‘meserror’])){
echo “<font color=”#ff0000″>* You must enter a comment!</font>”;
}
// If logged in show comment box
if($session->logged_in){
echo “<textarea name=”message” cols=”30″ rows=”5″ wrap=”on” style=”overflow:auto;”></textarea><br><br>”
.”<input type=”submit” value=”Submit”><input type=”hidden” value=”1″ name=”subcomment”><input type=”hidden” value=”$session->username” name=”sender”><input type=”reset” value=”Reset”>”;
}else{ // If not logged in show error
echo “<center><b>You must be logged in to do that!</b><br><br>”
.”<a href=”http://your-space.awardspace.com/index.php”>Log In</a> | <a href=”http://your-space.awardspace.com/register.php”>Register</a></center>”;
}
?>
the backbone (process.php):
[CODE]$file = fopen(“$name/process.php”, “a+”);
chmod(“$name/process.php”, 0755);
$info = “<?php if(isset($_POST[‘subcomment’])){
if(!empty($_POST[‘message’])){
$message = $_POST[‘message’];
$sender = $_POST[‘sender’];
$fixdate = time() + (1 * 1 * 60 * 60);
$date = date(‘n/j/y g:i a’, $fixdate);
$file = fopen(“comments.php”, “a+”);
chmod(“comments.php”, 0755);
$info = “<table width=”540″ class=comments1 border=”0″ cellpadding=”2″ cellspacing=”2″><tr><td class=sender>$sender</td><td class=date align=right>$date</td></tr><tr><td colspan=2 class=message>$message</td></tr></table>”;
fwrite($file, $info);
fclose($file);
header(“Location: index.php”);
}else{
recall(1);
}
} ?>”;
fwrite($file, $info);
fclose($file);