[RESOLVED] Parse error: syntax error, unexpected T_IF in /home/wante111/public_html/MyDB/pages/d
Parse error: syntax error, unexpected T_IF in /home/wante111/public_html/MyDB/pages/display.php on line 60
PHP Code:
<? php
if ( (mysql_result($results, 0, 'private') == '1') || userActive() )
echo '<div align="center"><a href="'<?php echo '?nav=download&file='.$fid; ?>"><img src="theme/download.png" align="middle" border=0></a>'
?>
Re: Parse error: syntax error, unexpected T_IF in /home/wante111/public_html/MyDB/pag
1. you need to tell the parser to open PHP with '<?php', not '<? php'. the space you have tells the parser that you're using short tags (which is deprecated), and then the "php" string begins a new statement. change to: <?php
2. you need to terminate your echo by using a semicolon. example: echo 'hello';
Re: Parse error: syntax error, unexpected T_IF in /home/wante111/public_html/MyDB/pag
thnx for the help m8, m just editing a code this is 1st time i am working with php
Code:
<?php
if ( (mysql_result($results, 0, 'private') == '1') || userActive() )
echo '<div align="center"><a href="'<?php echo '?nav=download&file='.$fid; ?>'"><img src="theme/download.png" align="middle" border=0></a>';
?>
other error
Parse error: syntax error, unexpected '?' in /home/wante111/public_html/MyDB/pages/display.php on line 61
Re: Parse error: syntax error, unexpected T_IF in /home/wante111/public_html/MyDB/pag