Hello guys, Can you tell me what's wrong with this code: $pid = $row['PID']; $getthreadname = mysql_query("SELECT subject FROM vbulletin_posts WHERE pid = $pid"); while($row2 = mysql_fetch_array($getthreadname)) { $postname = $row2['subject']; echo "<a href="http://allianceforums.ws/forums/post-".$pid.".html#pid".$pid.">".$postname."</a>"; } PHP: I'm reciving Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' and I can't really figure out why. Thanks in advance.
$pid = $row['PID']; $getthreadname = mysql_query("SELECT subject FROM vbulletin_posts WHERE pid = $pid"); while($row2 = mysql_fetch_array($getthreadname)) { $postname = $row2['subject']; echo '<a href="http://allianceforums.ws/forums/post-".$pid.".html#pid".$pid.">".$postname."</a>'; } PHP: Single quotes on your echo.
$pid = $row['PID']; $getthreadname = mysql_query("SELECT subject FROM vbulletin_posts WHERE pid = $pid"); while($row2 = mysql_fetch_array($getthreadname)) { $postname = $row2['subject']; echo sprintf('<a href="http://allianceforums.ws/forums/post-%s.html#pid%s">%s</a>', $pid, $pid, $postname); } PHP:
I tried to move my domain from Godaddy to Bigcommerce and got this error- Parse error: syntax error, unexpected T_STRING in /home/leon2007/public_html/mysite.com/index.php on line 1 Is there any php professional who would be able to help me fix this?
Post the contents of index.php here, it may be your using short php tags, and you need to use full php tags.
I am sorry if I sound dumb but I have no idea where to find index.php file. Is there a problem with my bigcommerce template?
Okie I found it- <?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require('./wp-blog-header.php'); ?>