Hi,
I've got a site where that's got a database behind it. Currently it has loads of items in rows that all have different pictures. There is a field called "Image" that has the name of the image ie. example.jpg.
Then I have a folder on my webserver called image where the pictures are stored with the same file names and extensions.
Now, I want to display the correct image for the item that the page is showing. I have this code but it's just showing the usual box with a red X in the top left.
I should also point out that the 'Item' line is working correctly and displaying the name of the item.
Quote<table border='1' align="left" width="100%">
<?php
while($row = mysql_fetch_array( $result )) {
$dir = '/image';
$image = $row['Image'];
echo('<b><h1>'.$row['Item'].'</h1></b><br />');
echo "<tr>";
echo "<td width=15%>"."<img width=100% src='$dir/$image /'></td>";
echo "<td width=85% align=center>Description</td>";
echo "</tr>";
}
?>
</table>
Any ideas why this isn't working?
Calling a Procedure with IN & OUT Parameters
Hello,
Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a switch function to reduce redundancies, and to efficaciously implement the script on to other
adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit number then counting them and adding the missing zeros?
Most basic form question ever?
Hello,I want to use this snippet to make sure the fields in a form are ok before processing it.Code: <FORM method="post">To:<input type="text"
Interpret Order
Hello all,I'm wondering if I have this:Code: $switch = array( 'one' => $this->RenderOne() ,'two' => $this->RenderTwo());Would php call the function
$_GET problem
Hi all,Have a bit of a problem with a little piece of code, I am not sure if this should be under php or ajax as I am not sure where the problem lies. Basically here is the script:Code:
Parse XML
Good day,I use oempro software and try to parse XMLReturn but it's not working for me, simplexml_load_string return tons of errors. Maybe someone could help me?Code:
Storing user data help?
Hey Guys, I'm not use if this question is to broad but I can always give you more information if needed.I have a website where users can login which uses mysql anyway I have a little form asking some
matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be something like Code: [Select]/\([0-9]+\)/, but that doesn't work Can someone correct me please?
Creating a unique 'control panel' for each user
Hi there,I'm thinking of designing a site that will allow users to sign up and have their own unique 'control panel'.I just need some pointers on the logic behind this design, specifically:How can I