Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-23-2004, 11:11 PM   PM User | #1
Mafty
New Coder

 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Mafty is an unknown quantity at this point
little php image help

<?php
$con = mysql_connect("localhost","USERNAME","PASWORD");
$db = mysql_select_db("maftystu_mafty",$con);
$sql = "SELECT * FROM `newest work` ORDER BY `id` DESC LIMIT 1";
$result = mysql_query($sql) or die("Error: ".mysql_error());
while($row = mysql_fetch_array($result)){
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr> ";
echo "<td colspan='9'align='center'><a href='$row[1]'target='_blank'><img>$row[2]</img></a></td>";
echo "</tr>";
echo "</table>";
}
?>

i have my real username and pass in the real one of course, but something is going wrong, and i dont know if its in the php code im putting in dreamweaver, or if its something i did on mySQL. the file extensions i used for my icon image were

../jpegs/abstractspikesPOTM.jpg for the icon and

../jpegs/abstractspikes.jpg for the full image to be showed in a new browser window.

which part am i messing up, you can see my problem here at
www.maftystudios.com
in the bottom right you can see were im trying to put my php. hopefully someone can help me
Mafty is offline   Reply With Quote
Old 03-23-2004, 11:43 PM   PM User | #2
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
To show an image in html, you use <img src="path/to/file"> not <img>path/to/file</img>
__________________
Blue Panda
Website Design | 1 Pound Ads | 'ow much? | Coding Geeks
Nightfire is offline   Reply With Quote
Old 03-24-2004, 01:29 AM   PM User | #3
Mafty
New Coder

 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Mafty is an unknown quantity at this point
ah thank you, worked
Mafty is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:25 PM.


Advertisement
Log in to turn off these ads.