Shoutbox

My site - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: My site (/showthread.php?tid=30956)

My site by k776 on 09-04-2004 at 09:12 AM

Thanks to a friend of mine, I have started turning some of my site into sql quiries. One of the lines is:

code:
echo "<table border=1 class=double summary=Downloads><tr><td><font color=#ffff00><b>" . $row["name"] . "</b></font> " . $row["mplink"] . "<br>" . $row["desc"] . "<br><hr><font color=#ffff00><b>Download page</b></font> " . $row["dllink"] . "<br><b>Type:</b> " . $row["type"] . "</td></tr></table><br>" ;
What I want to do is to link Download page with . $row["dllink"] .. I tired this but it doesn't work :( I get T_STRING errors or something like it.
code:
echo "<table border=1 class=double summary=Downloads><tr><td><font color=#ffff00><b>" . $row["name"] . "</b></font> " . $row["mplink"] . "<br>" . $row["desc"] . "<br><hr>" <a href=. $row["dllink"] .> "<font color=#ffff00><b>Download page</b></font>" </a> "<br><b>Type:</b> " . $row["type"] . "</td></tr></table><br>" ;
Any help would be nice.
RE: My site by Mnjul on 09-04-2004 at 10:34 AM

You don't need to crowd everything onto one line ;)

Well your quotes look like a mess to me :p

This should work

code:
echo "<table border=1 class=double summary=Downloads><tr><td><font color=#ffff00><b>" . $row["name"] . "</b></font> " . $row["mplink"] . "<br>" . $row["desc"] . "<br><hr><a href=\"" . $row["dllink"] . "\"><font color=#ffff00><b>Download page</b></font></a><br><b>Type:</b> " . $row["type"] . "</td></tr></table><br>";



And if you want a good-looking one (not only neat in PHP but also in HTML)...
More lines but I suppose easy to maintain...
code:
echo "<table border=1 class=double summary=Downloads>\n";
echo "<tr><td>\n";
echo "<font color=#ffff00><b>" . $row["name"] . "</b></font> " . $row["mplink"] . "<br>\n";
echo $row["desc"];
echo "<br><hr>\n";
echo "<a href=\"" . $row["dllink"] . "\"><font color=#ffff00><b>Download page</b></font></a><br>\n";
echo "<b>Type:</b> " . $row["type"];
echo "</td></tr>\n";
echo "</table><br>";


RE: My site by k776 on 09-06-2004 at 09:19 AM

Thanks for the help. New question:

How do you write files to a database??

Im using my own form, set with method="post" action="scripts/add.php". What do I add in scripts/add.php??

Edit: I want to add the following feilds:

catid,
mplink,
name,
dllink,
desc,
rate,
type,
pic

to a table called download_items.


RE: My site by WDZ on 09-06-2004 at 09:31 AM

You've got a similar thread going at http://shoutbox.menthix.net/showthread.php?tid=30977, so I'm closing this one.