Error??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jackal
Forum Newbie
Posts: 10
Joined: Sat Apr 19, 2003 3:21 pm

Error??

Post by jackal »

Can someone help with this

I have tried putting ; after the last > still does not work though.

Parse error: parse error, unexpected '\"', expecting ',' or ';' in /home/usr/public_html/category.php on line 26

echo "<link href=""\"/base.css\" rel=\"stylesheet\" type=\"text/css\">
User avatar
skylavelle
Forum Newbie
Posts: 18
Joined: Sun May 04, 2003 11:33 pm
Location: Brisbane, Australia

Post by skylavelle »

What are you tring to do, it looks something like a name anchor? 8O

Try:
echo "<link href=\"/base.css\" rel=\"stylesheet\" type=\"text/css\">";

Cheers
Sky
jackal
Forum Newbie
Posts: 10
Joined: Sat Apr 19, 2003 3:21 pm

Post by jackal »

ok that got some of it go here and click a link http://realwebhost.net/category.php
and look at bottom


here is file

Code: Select all

<?php
$dbi= mysql_connect('localhost','usr','pass');
mysql_select_db('dbname');
$sql_get_faq_categories1_txt = "select cid,cname from faq_categories1 where cid IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)";
$sql_get_faq_categories1 = mysql_query($sql_get_faq_categories1_txt);
if (!$sql_get_faq_categories1)
die ("Error displaying information. Please report this information to the administrator -- ".$sql_get_faq_categories1_txt . " - " . mysql_error());
while(list($cid,$cname)=mysql_fetch_row($sql_get_faq_categories1))
{
echo "<a href="".$_SERVER['$PHP_SELF']."?cid=$cid">$cname</a><br>";
}

// done topics so now display question if appropriate

if((int)$_REQUEST['cid']>0)
{

$sql_get_faq_questions1_txt = "select fid,cid,question,answer,timestamp from faq_questions1 where cid=$cid";

$sql_get_faq_questions1 = mysql_query($sql_get_faq_questions1_txt);
if (!$sql_get_faq_questions1)
die ("Error displaying information. Please report this information to the administrator -- ".$sql_get_faq_questions1_txt . " - " . mysql_error());
echo "<table cellpadding=0 cellspacing=0 border=0 align=center width=100%>";
while(list($fid,$cid,$question,$answer,$timestamp)=mysql_fetch_row($sql_get_faq_questions1))
{
echo "<link href="/base.css" rel="stylesheet" type="text/css" />

<tr>
<td valign=top>
<table>
<tr>
<td>
Q: $question
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 align=center width=100%>
<tr>
<td valign=top>
<table>
<tr>
<td>
A:$answer
</td>
</tr>
</table>
</td>
</tr>";
}
echo "</table>";
} // end questions
?>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

note: this thread is related to viewtopic.php?t=8469
It's hard to keep tracks on every post(er) here on this board, jackal ;)
if((int)$_REQUEST['cid']>0)
{
$sql_get_faq_questions1_txt = "select fid,cid,question,answer,timestamp from faq_questions1 where cid=$cid";
you're checking $_REQUEST['cid'] which seems to be working but then you use $cid in your querystring. why?
Post Reply