Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-11-2009, 03:51 PM   PM User | #1
b3ck
New to the CF scene

 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
b3ck is an unknown quantity at this point
Question PHP + mySQL Syntax error "Trying to link info from DB using PHP" getting Parse error.

I get a Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in D:\xampp1\htdocs\header.php on line 181

line 181 is line 6 on pastebin;
http://pastebin.com/d1eeabdb0

PHP Code:
    <?php
    mysql_select_db
($db_name);
    
$linkovi  mysql_query("SELECT title,link,tooltip FROM pages WHERE position = '1' ORDER BY orderby ASC") or die (mysql_error());
    while (
$linkovi2=mysql_fetch_assoc($linkovi))
    {
        print 
'<a href="'.$linkovi2['link'].'" title="" onmouseover="$WowheadPower.showTooltip(event, '.$linkovi2['tooltip'].')" onmousemove="$WowheadPower.moveTooltip(event)" onmouseout="$WowheadPower.hideTooltip();">'.$linkovi2['title'].'</a>';
    }
    
?>
// example tooltip link for regular html
<a href="./quest.php?name=shoutbox" onmouseover="$WowheadPower.showTooltip(event, 'Chat with other b3ckswow users Live!')" onmousemove="$WowheadPower.moveTooltip(event)" onmouseout="$WowheadPower.hideTooltip();">Shoutbox</a>

I can tell you the way I have been using to pull info from the DB using PHP is
'.$linkovi2['tooltip'].'
but
onmouseover="$WowheadPower.showTooltip(event, 'Chat with other b3ckswow users Live!')"
the event uses '' already to enclapse the tooltip info, I am pretty lost right about now, any help would be greatly appriciated.

thanks in advance,
-b3ck

Last edited by b3ck; 04-11-2009 at 05:05 PM..
b3ck is offline   Reply With Quote
Reply

Bookmarks

Tags
mysql, php, syntax

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:47 AM.


Advertisement
Log in to turn off these ads.