Jump to content

[SOLVED] Php ?page=pageinfo


Crew-Portal

Recommended Posts

;D I need help making pages switch in a table so that the header and sidebar and copywrite doesn't reload just the center frame does I have written some code and it doesn't seem to work PS: I just started writing PHP about 7 days ago so forgive me if Im writing this code completly wrong:

 

	<?php
$page1 = page_1.php;
            $page2 = page_2.php;
            $page3 = page_3.php;
            $page4 = page_4.php;

   if ($page1 == "page?=page1") 
{
   ifelse ($page2 == "page?=page2") 
{
   ifelse ($page3 == "page?=page3") 
{
   ifelse ($page4 == "page?=page4") 
{
?>

 

As You Can See I want the frame to be able to accept links and to just label them

<a href=page2.php>Page 2</a>

but in the address bar it would say www.mysite.com/index.php?page=page2 and it would automatically load on page1 and you would be able to switch between pages but in the main table! Are you confused! I Am And Im writing the script

 

Heres A Link To What I want Feel free to visit the site and see the address bar change as you move between pages www.vegasair.org

 

I Am Not wanting to charge money for this script I just want to know where I am going wrong So If Your looking for money you should look elsewhere because I do not want to pay for this script I am merely wanting someone to help me out!  ::)

 

Please I am only a young programmer (15) And I Want To Become A Professional When I Am 20 Or So Please Help Me Out!

""Just Like The Song "I Believe Children Are The Future" Which Makes Me The Future Of PHP Programming""

Link to comment
https://forums.phpfreaks.com/topic/53909-solved-php-pagepageinfo/
Share on other sites

;D I need help making pages switch in a table so that the header and sidebar and copywrite doesn't reload just the center frame does I have written some code and it doesn't seem to work PS: I just started writing PHP about 7 days ago so forgive me if Im writing this code completly wrong:

 

i stopped reading from their as if you only want to update a frame you need to give the frame a name and then set the target in the href to the frames name

 

ie

<frameset rows="105px,*" border="0" frameborder="no">

<frame src="menu.php" name="menu" noresize="noresize" scrolling="no"></frame>
<frame src="main.php" name="main" noresize="noresize"></frame>
</frameset><noframes></noframes>

 

in the menu.php i would use this link

<a href="main.php?Main=Login" target="main">Login</a>

 

Note target="main"

 

thus opening the page in the main.php frame NOT the menu (yet it was called from the menu)

 

hope this helps

I dont want to switch between pages using an index with a frames page! I hat the frames Hate em and Php include (); Lags the site I want An Index page that allows the index file to stay in place and a TABLE changes in the middle betwwen the Header And The Copywrite!

<?php
//this is index.php, this is the main page for the site
if ((!isset($_REQUEST['page'])) || ($_REQUEST['page'] == 'index')) { //if the page has not been set, or if they are trying to call index.php
$title = 'Site Index';
include_once ('header.php'); // this is the page header - it only contains the top portion of the site
?>
This is where you would put your site content, includes, etc
<?php
include_once('footer.php');
} else { // ok this is where the URL has ?page= and its not index
include_once('header.php');
include_once($_REQUEST['page'] . '.php'); //this will include whatever page is set to - so it will echo if ?page=contacts 'contacts.php'
include_once('footer.php');
?>

 

^^ that might work

 

Thank you for your responses although the closest was from yzerman, it wasn't quite what I needed but using your responses I believe I can mold this code into what I wanted thank you:

yzerman

MadTechie

 

Your Responses Helped Me!

 

[move]My Issue Is Now Resolved You Can Checkmark it![/move]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.