Page 1 of 1

Display two pages side by side in PHP

Posted: Sat May 16, 2009 2:22 pm
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"); 
?>
 

Re: Display two pages side by side in PHP

Posted: Sat May 16, 2009 2:23 pm
by Benjamin
@Dilnesaw - Use

Code: Select all

tags when posting code in the forums.

Re: Display two pages side by side in PHP

Posted: Sat May 16, 2009 6:14 pm
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.

Re: Display two pages side by side in PHP

Posted: Sun May 17, 2009 12:46 am
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?

Re: Display two pages side by side in PHP

Posted: Sun May 17, 2009 6:57 pm
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.

Re: Display two pages side by side in PHP

Posted: Mon May 18, 2009 10:45 pm
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