-
Apr 8th, 2009, 10:37 PM
#1
Thread Starter
Lively Member
[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>'
?>
-
Apr 8th, 2009, 10:45 PM
#2
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';
-
Apr 8th, 2009, 10:53 PM
#3
Thread Starter
Lively Member
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
-
Apr 8th, 2009, 11:22 PM
#4
Thread Starter
Lively Member
Re: Parse error: syntax error, unexpected T_IF in /home/wante111/public_html/MyDB/pag
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|