473,503 Members | 11,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Insert JPG created with information from a DB in HTML

I look in my DB for a CODE. I find it and now I want to show the jpg
corresponding to this CODE in html. Here is my piece of code, however
the photo will not be shown....

<?php
-
-
-

$posavaso=mysql_fetch_field($result,CODE);
while ($row = mysql_fetch_assoc($result)) {

$posavaso= $row["CODE"].".jpg"; //here I create my jpg
}
}
?>
<img src="../Fotos/<? $posavaso?> width="215" height="108">

....

any tips???

Jul 17 '05 #1
7 1969
there is a " missing after <? $posavaso?> which appends "width=" to
all of your fiel names

micha

Jul 17 '05 #2


chotiwallah schrieb:
there is a " missing after <? $posavaso?> which appends "width=" to
all of your fiel names

micha

I tried but it doesn't work.......
Bettina

Jul 17 '05 #3
*** be*****@coaster.ch wrote/escribió (26 Jun 2005 12:58:53 -0700):
<img src="../Fotos/<? $posavaso?> width="215" height="108">

any tips???


Two troubleshooting techniques that will help you in the future:

* PHP is not everything: do check the generated HTML!

IE: View-> Source
Mozilla: View-> Page Source (or Ctrl+U)

* Use the W3C Validator to test the validity of your HTML and CSS:

http://validator.w3.org

This way you would have found that

<img src="../Fotos/foo.jpg width="215"

is invalid HTML, thus noticing the missing quote :)

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #4
*** be*****@coaster.ch wrote/escribió (26 Jun 2005 12:58:53 -0700):
<img src="../Fotos/<? $posavaso?> width="215" height="108">

any tips???


Two troubleshooting techniques that will help you in the future:

* PHP is not everything: do check the generated HTML!

IE: View-> Source
Mozilla: View-> Page Source (or Ctrl+U)

* Use the W3C Validator to test the validity of your HTML and CSS:

http://validator.w3.org

This way you would have found that

<img src="../Fotos/ width="215"

is invalid HTML, thus noticing the missing equal and quote :)

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #5
Gracias Alvaro por tu ayuda, voy a tener en cuenta el troubleshooting.
Pero aún cuando escribo las comillas antes de width no funciona:
<img src="images/<?php $a ?>" width="48" height="30">

Bettina

Jul 17 '05 #6
*** be*****@coaster.ch wrote/escribió (27 Jun 2005 03:27:25 -0700):
Gracias Alvaro por tu ayuda, voy a tener en cuenta el troubleshooting.
Pero aún cuando escribo las comillas antes de width no funciona:
<img src="images/<?php $a ?>" width="48" height="30">


Te falta un echo.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #7
<img src="images/<?php echo $a; ?>" width="48" height="30">

//OENS

"Alvaro G Vicario" <al******************@telecomputeronline.com> skrev i en
meddelelse news:23*****************************@40tude.net...
*** be*****@coaster.ch wrote/escribió (27 Jun 2005 03:27:25 -0700):
Gracias Alvaro por tu ayuda, voy a tener en cuenta el troubleshooting.
Pero aún cuando escribo las comillas antes de width no funciona:
<img src="images/<?php $a ?>" width="48" height="30">


Te falta un echo.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--

Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8728
by: PT | last post by:
I got a problem. And thats..... First of all, I got these three tables. ------------------- ------------------ ---------------------- tblPerson tblPersonSoftware ...
14
4269
by: serge | last post by:
I have a scenario where two tables are in a One-to-Many relationship and I need to move the data from the Many table to the One table so that it becomes a One-to-One relationship. I need to...
16
16975
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
4
65597
by: YFS DBA | last post by:
How do I use VBA to insert a *new* record into a subform? I have a master form with client information, and a sub form with billing information. I want to click on a button ("Add Data") and have...
5
4068
by: Andrew | last post by:
Hi, friends, In ASP, we use obj = CreateObject("com.dll") obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2) to get different HTML strings based on input values. Then, we insert them into...
6
14865
by: Marcel Hug | last post by:
Hi all ! I have a table in my database, which has 3 attributes. IDFailureControl, ControlDate and ControlVersion. In the following function I test, if the date of today allready exists. Then I...
28
18494
by: Giggle Girl | last post by:
Can someone show me how to insert a row at any given row index of an already created table? It only has to work in IE6 (used on intranet at work). Specifically, if a table is 20 rows in total...
2
7034
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
5
4329
by: Lawrence 007 | last post by:
Hi, I am pretty new to HTML programming and I am stuck in one location at the moment. I created a web page where users can enter information and add it to a table in my SQL database. I am running...
0
2135
ak1dnar
by: ak1dnar | last post by:
There is a Error getting while i am entering records using this jsp file. <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %> <%@ include...
0
7194
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.