Hi,I'm rookie for php, and I'm trying to learn how to write that code. i have create upload images where i can save imges in folder called "images" and then put image file path name for sample "images-folder\image.png" along with some comments text in second column.
My question is that if i want to reterieve images and text using database how can write that statments for sample "row...."
please help me i need to learn that thanks.
AM
picture path
Moderator: General Moderators
Re: picture path
There are lots of examples online. Try some of these:
http://www.designplace.org/scripts.php?page=1&c_id=25
http://www.devpapers.com/article/306
http://www.oreillynet.com/pub/a/php/200 ... tions.html
http://www.weberdev.com/ViewArticle/PHP ... SQL-search
http://www.php-mysql-tutorial.com/wikis ... abase.aspx
That should get you started.
[Moving this topic to PHP - Code forum]
http://www.designplace.org/scripts.php?page=1&c_id=25
http://www.devpapers.com/article/306
http://www.oreillynet.com/pub/a/php/200 ... tions.html
http://www.weberdev.com/ViewArticle/PHP ... SQL-search
http://www.php-mysql-tutorial.com/wikis ... abase.aspx
That should get you started.
[Moving this topic to PHP - Code forum]
Re: picture path
Hi,
Please use this
<?php
$query=mysql_query("select * from table-name");
$res=mysql_fetch_array($query);
while($res)
{
?>
<img src="image-path/<?php echo $res[imagename];?>" /> </br> <?php echo $res[comments];?>
<?php
}
?>
I think this will help you.
Thanks
Please use this
<?php
$query=mysql_query("select * from table-name");
$res=mysql_fetch_array($query);
while($res)
{
?>
<img src="image-path/<?php echo $res[imagename];?>" /> </br> <?php echo $res[comments];?>
<?php
}
?>
I think this will help you.
Thanks