Welcome Guest, Not a member yet? Register   Sign In
How to call a image name from my database
#1

[eluser]Miguel Diaz[/eluser]
Hello

I´m a designer and I am starting to use a little of php on my web pages and also start with codeigniter just like 2 weeks ago. Can somebody help me letting me know how to call and image from my graphic folder to a query. Here is the code I have in this moment but it is not working.

Example:


<?php foreach($query->result() as $row): ?>
<strong>&lt;?=anchor('articles/view/'.$row->url, $row->title);?&gt;</strong>
<span>&lt;?=$row->date?&gt;</span>
<img >url, $row->graphics);?&gt; src="&lt;?=$row->date?&gt;" alt="titletags" />
<p>&lt;?=$row->shortdescription?&gt;&lt;?=anchor('articles/'.$row->url, 'read more');?&gt;</p>
&lt;?php endforeach; ?&gt;

The names of my data base titles are id, title, date, shortdescription and graphics.


This is the query I made if I take out the img tag it work perfect with the text but I would like to know how to do it with an image. I have one filed in my database with the name of the image and also with the extension and then I am trying to insert the text from the database to load the image.

Can somebody help me please.


Messages In This Thread
How to call a image name from my database - by El Forum - 11-18-2009, 09:42 PM
How to call a image name from my database - by El Forum - 11-18-2009, 11:12 PM
How to call a image name from my database - by El Forum - 11-19-2009, 03:49 PM
How to call a image name from my database - by El Forum - 11-20-2009, 09:27 AM
How to call a image name from my database - by El Forum - 11-20-2009, 09:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB