[SOLVED]a problem with me and echoing html and variables

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
Andrus
Forum Newbie
Posts: 7
Joined: Sun Jul 06, 2003 1:00 am

[SOLVED]a problem with me and echoing html and variables

Post by Andrus »

parse error, parse error parse error,
i get a parse error, on line 13,
what the heck is wrong with this line?

Code: Select all

echo "<td class='text1' height='75'><img src='images/bullet4.gif' width='16' height='15' align='center'><font color='#003366'><b>$title</b></font><br>$text</td></tr></tbody></table><br>";
thanks
Last edited by Andrus on Wed Jun 16, 2004 7:21 pm, edited 1 time in total.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

nothing wrong with that line.

Show your whole code, sometimes errors on previous lines can cuase errors on subsequent lines.

Mark
Andrus
Forum Newbie
Posts: 7
Joined: Sun Jul 06, 2003 1:00 am

Post by Andrus »

k thanks, here it is

Code: Select all

<?
include 'header.htm';
include 'config.php";
function index(){
$db = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db ($db_name) or die ("Cannot connect to database");
$query = "SELECT title, text FROM blog ORDER BY id DESC LIMIT 10";
$result = mysql_query($query);
while($r=mysql_fetch_array($result))
 {
$title=$r["title"];
$text=$r["text"]; 
echo "<td class='text1' height='75'><img src='images/bullet4.gif' width='16' height='15' align='center'><font color='#003366'><b>$title</b></font><br>$text</td></tr></tbody></table><br>";
 }
mysql_close($db); 
}



function news(){
    echo "<td class='text1' height='75'><img src='images/bullet4.gif' width='16' height='15' align='middle'><b><font color='#003366'>News</font></b><br>";
	echo "Blog still being worked on, hopefully up soon";
} 


function submit(){
echo "<form name='post' action='post_news_process.php' method='post'>Title<input name='title' type='text' size='25'><br>Text<br><textarea name='text' cols='40' rows='6'></textarea><input type='submit' name='Submit' value='POST'></form>";

}

switch($_REQUEST['do']){;

    default:
    index();
    break; 
    
    case "news":
    news();
    break;

    case "submit":
    submit();
    break;
}  

include 'footer.htm'; 
?>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

include 'config.php";

that's the problem
Post Reply