473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How do I insert an Image into and echo tag that is in an images folder?

I am fairly new at PHP and need help wit this attached is my code, it pick up that there is an image but doe not display it. your help would bemuch appreciated

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $conn = mysql_connect('localhost','****','****') or die("Could not do it");
  3. $rs = mysql_select_db("db name") or die("wheres the DB");
  4. $sql ="SELECT Model FROM handsets WHERE Brand = 'Brand'";
  5. $result = mysql_query($sql);
  6.  
  7. while( $row=mysql_fetch_array($result))
  8. $Model = $row['Model'];
  9. $image = $row['Image'];
  10. echo "<img src=\"http://bytes.com/images/$image\" width=\"30px\" height=\"100%\" align=\"absmiddle\"><input name=\"Model\" type=\"checkbox\" value='$Model' />$Model<br>";
  11. }
  12. ?>
Jul 4 '10 #1
2 1589
Dormilich
8,658 Expert Mod 8TB
if the stored image is the image’s location, is the path correct?
Jul 5 '10 #2
zorgi
431 Expert 256MB
Noticed that you are only selecting "Model" from your table:

Expand|Select|Wrap|Line Numbers
  1. "SELECT Model FROM handsets WHERE Brand = 'Brand'";
  2.  
Jul 5 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jason Shohet | last post by:
In my wsp, i clicked add to project, & selected Primary Output & Content Files. Thats enough to get my site working. But I want to add the images folder too so that image files that the site...
7
by: ABC | last post by:
How can I deny all users directly access image files from images folder?
2
by: guoqi zheng | last post by:
dear sir, I am using itextShap for pdf generation. I know I can insert image into it, I can add header to it as well. However, I can not add an image as a header. Does any one has experience...
1
by: Ted Ngo | last post by:
Hi All, I try to create a login screen using mode="Forms" Web Config: <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="Login.aspx" protection="All" timeout="30" path="/"
1
by: ahujasatna | last post by:
Hi all!! i am working on C#, ASP.Net with Sql server2000 and i am facing a problem, my Question is: "How to insert and retrieve images to/from Sqlserver2000 Database" I created a table...
0
by: gazanfar | last post by:
Yes thanks Question is that ---I want to insert image/or image path in my SQlServer 2000 through Visual basic application.like after scan of any photo i want insert in database on whoever's no...
1
by: Sunshine192 | last post by:
Hi, I'm still kinda new to PHP so I could do with some advice. I'm using the code below to select and show a random image from a folder of images. rotate.php <?php // Make this the relative...
6
by: LP | last post by:
Hi there, Sorry if this is a little off-topic here but can anyone explain why, when I launch my website from within VS, it can find my image files ok when they're in the root like so: <img...
1
by: Christian | last post by:
Hi, i added an image in my Solution in folder Resources and now i will open... Someone can help me? thanks
2
by: lwannwayoo | last post by:
Hi Everybody! I have a database in Microsoft Access 2003 and I want to insert image in my Table Field. How can I don it??. I use OLE type but when i insert image to that field only the word...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.