Author |
Message |
selpaw
WebHelper
Joined: 10 Jan 2002
Posts: 55
Location: Perth, Western Australia
|
Posted:
Sat Jan 12, 2002 12:28 pm (22 years, 2 months ago) |
|
im using a php mailing list script, and I want to make it look like the rest of my site, which makes use of tables. below is a sample of code i have added:
echo "<table border=1 bgcolor="#FEDEB8" cellpadding=5 cellspacing=3 width=80% align=center valign=top height="240">";
echo "<tr>";
however it generates an error on the echo "<tr>";
and its not because of the <tr>, as i had two other lines above the code i pasted here and it coughed on <center>
what am I doing wrong? I know very little about php
thanks for any help
oh.. the error message i get is:
Parse error: parse error, expecting `','' or `';'' in /webdir/username/worldwide/phpscript/themailer/path/rgnmailer.php on line 80
in this case, echo "<tr>"; being the the 80th line... |
________________________________ Luke
Selpaw Web Directory |
|
|
|
JdS
Junior WebHelper
Joined: 08 Jan 2002
Posts: 24
Location: KUL, Malaysia
|
Posted:
Sat Jan 12, 2002 12:51 pm (22 years, 2 months ago) |
|
Warp wrote: | echo "<table border=1 bgcolor="#FEDEB8" cellpadding=5 cellspacing=3 width=80% align=center valign=top height="240">";
echo "<tr>";
|
Code: | echo "<table border=1 bgcolor=\"#FEDEB8\" cellpadding=5 cellspacing=3 width=80% align=center valign=top height=\"240\">";
echo "<tr>"; |
aren't u supposed to use the backslash in your code?? |
________________________________ JdS from
The Learning Journal
'New script on the Block' - GIDtopsites |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sat Jan 12, 2002 12:55 pm (22 years, 2 months ago) |
|
Yes, you are, however, shouldn't produce an error. |
________________________________
|
|
|
|
selpaw
WebHelper
Joined: 10 Jan 2002
Posts: 55
Location: Perth, Western Australia
|
Posted:
Sat Jan 12, 2002 1:15 pm (22 years, 2 months ago) |
|
ok... thanks.. got that bit worked out.. however now... it just generates a blank screen
any ideas? would i better off using the "print" command/function? or single quotes? |
________________________________ Luke
Selpaw Web Directory |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sat Jan 12, 2002 1:24 pm (22 years, 2 months ago) |
|
Could you please give us a URL? And did you look @ the source of the "blank page"? |
________________________________
|
|
|
|
selpaw
WebHelper
Joined: 10 Jan 2002
Posts: 55
Location: Perth, Western Australia
|
Posted:
Sat Jan 12, 2002 1:57 pm (22 years, 2 months ago) |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sat Jan 12, 2002 2:06 pm (22 years, 2 months ago) |
|
What have you modified since it last worked? |
________________________________
|
|
|
|
selpaw
WebHelper
Joined: 10 Jan 2002
Posts: 55
Location: Perth, Western Australia
|
Posted:
Sat Jan 12, 2002 2:18 pm (22 years, 2 months ago) |
|
since adding:
echo "<table border=1 bgcolor=\"#FEDEB8\" cellpadding=5 cellspacing=3 width=80% align=center valign=top height=\"240\">";
echo "<tr>";
echo "<td colspan=2 bgcolor=\"#FFFE7\"> <FONT FACE=\"MS Sans Serif, arial,helvetica\" size=1 COLOR=\"navy\">";
echo " <b>Kaye\'s Recipe\'s: Welcome</b></font></td>";
echo "</tr>";
echo "<tr>";
echo "<td height=\"278\">";
echo "<p>";
echo "<center>";
echo "</center>";
echo "<br>";
echo "<p> </p>";
echo "<p><font face=\"verdana,arial,helvetica\" size=\"1\"><b> </b></font>";
echo " </td>";
echo "</tr>";
echo "</table>";
echo "</center>"; |
________________________________ Luke
Selpaw Web Directory |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sat Jan 12, 2002 2:20 pm (22 years, 2 months ago) |
|
This is what's wrong:
You shouldn't escape the ' when you're using " for your variables.
Also, your HTML isn't really valid, but that doesn't matter. |
________________________________
|
|
|
|
selpaw
WebHelper
Joined: 10 Jan 2002
Posts: 55
Location: Perth, Western Australia
|
Posted:
Sat Jan 12, 2002 2:36 pm (22 years, 2 months ago) |
|
the html code is pretty much straight copy from Gossamer-Threads DBMan.....
ill make the mentioned changes and see what happens.....
---------
still a blank page......
edit:
looking for another mailing list... one that maybe a bit more secure as well.... |
________________________________ Luke
Selpaw Web Directory |
|
|
|
TerKuhlsw
Junior WebHelper
Joined: 24 Jan 2002
Posts: 2
|
Posted:
Thu Jan 24, 2002 2:45 am (22 years, 2 months ago) |
|
here is an example from my site at f2s
------------------------------------------------
<?
//Initialize database settings.
$link = mysql_connect("db.terkuhl.f2s.com:3306", "terkuhl", "*******");
$dbname = "terkuhl";
$tablename = "members";
//Initialize each table cloumn.
$query = "SELECT * from $tablename ORDER BY Sort";
$result = mysql_db_query ($dbname, $query, $link);
//create a table
print ("<table border=0 width=\"100%\" cellspacing=1 cellpadding=1 align=center>\n");
print ("<tr align=center>\n");
print ("<td align=center><b><u><h2>Rank</b></u></h2></td>\n");
print ("<td align=center><b><u><h2>Name</b></u></h2></td>\n");
print ("<td align=center><b><u><h2>Account</b></u></h2></td>\n");
print ("<td align=center><b><u><h2>Class</b></u></h2></td>\n");
print ("<td align=center><b><u><h2>Level</u>*</b></h2></td>\n");
print ("<td align=center><b><u><h2>XP</b></u></h2></td>\n");
print ("<td align=center><b><u><h2>E-Mail</b></u></h2></td>\n");
print ("</tr>\n");
while ($row = mysql_fetch_array ($result)) {
print ("<tr align=center valign=top>\n");
print ("<td align center valign=top>$row[Rank]</td>\n");
print ("<td align center valign=top>$row[Char_Name]</td>\n");
print ("<td align center valign=top>$row[Accnt_Name]</td>\n");
print ("<td align center valign=top>$row[Char_Type]</td>\n");
print ("<td align center valign=top>$row[Level]</td>\n");
print ("<td align center valign=top>$row[xp]</td>\n");
print ("<td align center valign=top><a href=mailto:$row[Email]>$row[Email]</a></td>\n");
print ("</tr>\n");
}
mysql_close ($link);
print ("</table>\n"); |
|
|
|
|
selpaw
WebHelper
Joined: 10 Jan 2002
Posts: 55
Location: Perth, Western Australia
|
Posted:
Thu Jan 24, 2002 12:48 pm (22 years, 2 months ago) |
|
Andrew wrote: |
Try this
Code: | echo "1st line of what you want to print to browser" .
"2nd line" .
"3rd Line" .
"lastline";
|
|
thanks for your help... i have given that script a miss a now... found one that works.. and has more features etc... thanks tho! |
________________________________ Luke
Selpaw Web Directory |
|
|
|
|