Page 2 of 2

Posted: Wed Jan 28, 2004 7:02 pm
by Straterra
Those tutorials are crap? 8O I beg to differ, sir. I think Dreamweaver is the one that is crap. As I will always say, write your own HTML. Better custimization, and gives you much much more satisfaction!

Posted: Wed Jan 28, 2004 7:11 pm
by John Cartwright
Notepad is the best way to go...

I look at dreamweaver coded html sites and you can spot it a mile a way :d

Posted: Wed Jan 28, 2004 7:24 pm
by Vicious
the template was made in notepad. But i was having so much trouble from the one person saying i cant make tables so i made it in dreamweaver.

Posted: Wed Jan 28, 2004 7:29 pm
by Vicious
id like to apologize for my rude attitude and you guys are doing your best to help me. I ve had very lil sleep these last couple days. All im looking for is someone to tell me how i can bring in the table i have and display the info. Thanks

Posted: Wed Jan 28, 2004 8:50 pm
by DuFF
Ok, took a look at that example table and you're code. All you have to do is combine them to output a table:

Code: Select all

<?php
$db = mysql_connect("localhost","","") or die ("cant connect");
mysql_select_db("team101",$db) or die ("cant change");
$news = mysql_query("select * from team101_news ORDER BY date DESC LIMIT 8") or die ("cant get em");
while($rows = mysql_fetch_array($news))
{
$date    = $rows["date"];
$author  = $rows["author"];
$title   = $rows["title"];
$content = $rows["content"];
$number  = "100%";

echo "<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#333333" width="50%" id="AutoNumber1" height="64">\n";
echo "<tr>\n";
echo "<td width="100%" bordercolor="#000000" bgcolor="#FF9900" height="19">\n";
echo "<font face="Verdana" style="font-size: 12px" color="#FFFFFF">\n";
echo $title . "<br />" . $date;
echo "</tr>\n";
echo "<tr>\n";
echo "<td width="100%" bgcolor="#525252" height="24">\n";
echo "<font color="#FFFFFF" face="Verdana" style="font-size: 12px">\n";
echo $content;
echo "</font></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width="100%" bgcolor="#808080" height="19">\n";
echo $author;
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
}
?>
BTW, you are mixing old and new HTML. The <font> tag has been deprecated and CSS is now gaining mass popularity. You should look into it:
http://www.w3schools.com/css/default.asp

Posted: Wed Jan 28, 2004 8:52 pm
by John Cartwright
Godamnit you beat me to it :D

Instead of continuously using echo function you can do this

Code: Select all

<?php

echo "sdlkfjlskdjflksdjflkj"
        ."dkfjflksdjfkldjfklj"
        ."fkjdklfjlksdj";


?>

Posted: Thu Jan 29, 2004 1:44 pm
by Derfel Cadarn
Phenom wrote:Instead of continuously using echo function you can do this

Code: Select all

<?php

echo "sdlkfjlskdjflksdjflkj"
        ."dkfjflksdjfkldjfklj"
        ."fkjdklfjlksdj";


?>
Nay not here? He'd say: HEREDOC-it:

Code: Select all

echo <<<HEREDOC and then you can type all the text
you want, but i do not feel like typing a lot at the moment
so you'll have to believe me or just ask Nay!
HEREDOC;

?>