473,320 Members | 2,110 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,320 software developers and data experts.

how to arrange image echo from database and increment a page

123 100+
how can i arrange image that i echo from the database to be in 5column
and 2 row that is if i have 5 image that is echo on a page the next image
that will be added should be in the second row and second column the next
one will be in the second row and third column and also i want the page to
increment after clicking next to display the next 10image.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $db_database = "files";
  3. $db_host = "localhost";
  4. //conecting to and select datebase
  5. $dbconnect = @mysql_connect('localhost','user2','point')or die('could not connect');
  6. //echo "connected successfully <BR><BR>";
  7. mysql_select_db($db_database) or die('could not select database'); 
  8.  
  9.     $query = "SELECT * FROM stored ";
  10.     $result = mysql_query ($query) or die('query error');
  11.  
  12.     $count = 0;
  13.     while ($line = mysql_fetch_array($result, MYSQL_ASSOC)){
  14.     $web = $line[web];
  15.     $present = $line[picname];
  16.     echo "<a href= 'http://$web' target = '_blank'><img src='company/$present' width='70' height='68'/></a> ";
  17.     $count++;
  18. }
  19.  
  20. ?>
  21.  
Dec 19 '08 #1
1 2544
Markus
6,050 Expert 4TB
Have a look at this thread.
Dec 19 '08 #2

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

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
0
by: doffer | last post by:
I want to make a portfoliosystem where user can register and get their own portfolio... I've started the developer work, but I'm stuck on the image upload part... I'm experiencing some problems...
0
by: wizardworkz | last post by:
Hello All! Having a bit of a problem combining php with javascript here. What I have is a store with images (There will be a smaller image of each item, and a larger image of each item, but I want...
7
by: eholz1 | last post by:
Hello Group, Perhaps you can help me. I have a mysql db, that holds images. Images are encoded using base64_decode/encode, etc. Image data seems fine. I have a view.php page that is supposed...
7
by: dino d. | last post by:
Hi- I want to create a dynamic image with areas so that when the user clicks different areas, the user jumps to those pages. The problem is, I can't seem to figure out how to do this efficiently....
5
by: howzy | last post by:
Hello I am new to the database world and Ive learned how to do a few things storing text is easy. i found that out but trying to get an image to show up on a page is difficult and i cant seem to find...
3
by: brijesh1234 | last post by:
dear Sir/madam I am getting a problem while displaying a image from database Database : MSSQL2000 I have a table named “Image” having following fields as ImageId int Image Image
8
tharden3
by: tharden3 | last post by:
Hey Bytes, The website I'm working on is coming along just fine, and I'd like to thank all of you PHP folks who have been helping me out. I'm almost done with the coding! I'm trying to get the...
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.