Hi, i am new here. I am having an issue with PHP. Its giving me a really annoying error and i can't figure out why. The error: [b]Parse error: parse error, unexpected $ in /home/stud/1/c0261087/public_html/blog/process2.php on line 99[/b] Can someone see something i can't? [code]<?php include "./db_lib.inc"; $link_id = db_connect(); $postId = $_Post['id']; $sqlquery = "SELECT date FROM $locking_tablename where [id] = $postId "; $result = mysql_query($sqlquery); while($row = @mysql_fetch_array($result)) { $starttime = $row['date']; $endtime = date("d-m-y G.i"); } if ($diff = @get_time_difference($starttime,$endtime)) { echo "Minutes" . sprintf( '%02d',$diff['minutes'] ); } if ($_POST['text'] == '' || $_POST['author'] == '' ) { echo "Please fill out all elements."; echo "<a href=\"comment.php?Name=$DisplayName\">Back</a>"; die(); { $text = $_POST['text']; $author = $_POST['author']; $title = $_POST['title']; $date = date("d-m-y G.i"); $query = "INSERT INTO $locking_tablename (`title` , `author` , `date` , `entry`) VALUES ('$title', '$author', '$date', '$text')"; $result = mysql_query($query); if (!$result) { error_message(sql_error()); } else { echo "Post successful!<br />"; echo "Your Comment ". $text . ". <br />"; echo "Author:" . $author . ".<br />"; echo "To log out <a href='logout.php'>click here</a><br />"; echo "To Post a new comment <a href='comment.php'>click here</a>"; } } function get_time_difference( $start, $end ) { $uts['start'] = strtotime( $start ); $uts['end'] = strtotime( $end ); if( $uts['start']!==-1 && $uts['end']!==-1 ) { if( $uts['end'] >= $uts['start'] ) { $diff = $uts['end'] - $uts['start']; if( $days=intval((floor($diff/86400))) ) $diff = $diff % 86400; if( $hours=intval((floor($diff/3600))) ) $diff = $diff % 3600; if( $minutes=intval((floor($diff/60))) ) $diff = $diff % 60; $diff = intval( $diff ); return( array('days'=>$days, 'hours'=>$hours, 'minutes'=>$minutes, 'seconds'=>$diff) ); } else { trigger_error( "Ending date/time is earlier than the start date/time", E_USER_WARNING ); } } else { trigger_error( "Invalid date/time data detected", E_USER_WARNING ); } return( false ); ?>[/code]