Display two pages side by side in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dilnesaw
Forum Newbie
Posts: 5
Joined: Fri Apr 10, 2009 9:18 pm

Display two pages side by side in PHP

Post by Dilnesaw »

Greetings,

I am new to PHP programming.

I want to show two pages side by side on one php page. I have a picture that is retrieved from mysql database and shown on my page. At the same time, I want to show another page containing list of picture next to this picture on the same page. I tried to use include command as follows, but was not able to put the page next to a picture (on the same line but to the left).

Any help is appreciated.

Thanks,

Dilnesaw

Code: Select all

 
<?php
   $link = ***
$data1 = mysql_query("SELECT * FROM Table1 where ID='$id'");
 
while($info = mysql_fetch_array( $data1))
{
Print $info['Picture']. "<br></br>";  
}
include("PcitureList.php"); 
?>
 
Last edited by Benjamin on Sat May 16, 2009 2:22 pm, edited 1 time in total.
Reason: Added [code=php] tags.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Display two pages side by side in PHP

Post by Benjamin »

@Dilnesaw - Use

Code: Select all

tags when posting code in the forums.
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: Display two pages side by side in PHP

Post by ldougherty »

What is inside of PcitureList.php?

If you want to do it properly you should do so with either TABLES or DIVs

If you can post the content of PcitureList.php I can probably show you have to do it with either.
joelitos
Forum Newbie
Posts: 10
Joined: Sun May 17, 2009 12:43 am

Re: Display two pages side by side in PHP

Post by joelitos »

Hi DileneSaw I want to take advantage of the moment to ask you how do stored your picture in MYSQL? and how did you path it?

in other words what set up is used to create an image field within a table?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Display two pages side by side in PHP

Post by califdon »

Lesson #1: PHP does not display anything and has no syntax for arranging elements on a web page. PHP can send HTML and CSS to a browser, but it is that HTML and CSS that determines what appears on the page.
Dilnesaw
Forum Newbie
Posts: 5
Joined: Fri Apr 10, 2009 9:18 pm

Re: Display two pages side by side in PHP

Post by Dilnesaw »

ldougherty wrote:What is inside of PcitureList.php?

If you want to do it properly you should do so with either TABLES or DIVs

If you can post the content of PcitureList.php I can probably show you have to do it with either.

Thanks for the reply.

In the PcitureList.php, page there will be similar pictures (more than one) but related to the one picture I will be showing on the main page. This page will contain scroll bar and users will be able to scroll up and down to see the related pcitures on the same page. So I have to use PcitureList.php to include in the main page.

Dilnesaw
Post Reply