Jump to content

Need a code.....


john_bboy7

Recommended Posts

Umm, can you give a more informative example. Not understanding your question! Do you want something like the following:

home > some category > page

Like this forum has, eg:

PHP Freaks Forums > PHP and MySQL > PHP Help > Topic: Need a code.....

If you do then search for PHP breadcrumbs tutorial

Link to comment
https://forums.phpfreaks.com/topic/100919-need-a-code/#findComment-516080
Share on other sites

I think this is what you want?

 

index.php

<br><br><center><a href="?page=home">Home |</a><a href="?page=about"> About |</a><a href="?page=contact"> Contact</a>
<br><br><br></center>

<?php
$page = $_GET["page"];
if (!$page) {
include "home.php";
}

else if($page=="home")       { include "home.php"; }        

else if($page=="about")      { include "about.php"; }

else if($page=="contact")    { include "contact.php"; }

else { echo "<b><h1>404 Error</h1></b>"; } 
?>

 

home.php

HOME PAGE

 

about.php

ABOUT PAGE

 

contact.php

CONTACT PAGE

Link to comment
https://forums.phpfreaks.com/topic/100919-need-a-code/#findComment-516084
Share on other sites

Umm, can you give a more informative example. Not understanding your question! Do you want something like the following:

home > some category > page

Like this forum has, eg:

PHP Freaks Forums > PHP and MySQL > PHP Help > Topic: Need a code.....

If you do then search for PHP breadcrumbs tutorial

 

No its like this:

 

When i press the button then the page Goes to www.google.com then after completing that page it should go yahoo.com and so on... Or much more like a mailer... ??? ??? Means it will b working in background... I saw it some where thats y i m not sure of the coding but i will try to get it.. i will try my best... Until then please suggest me a good tutorial related to this thing...

Link to comment
https://forums.phpfreaks.com/topic/100919-need-a-code/#findComment-516088
Share on other sites

I think this is what you want?

 

index.php

<br><br><center><a href="?page=home">Home |</a><a href="?page=about"> About |</a><a href="?page=contact"> Contact</a>
<br><br><br></center>

<?php
$page = $_GET["page"];
if (!$page) {
include "home.php";
}

else if($page=="home")       { include "home.php"; }        

else if($page=="about")      { include "about.php"; }

else if($page=="contact")    { include "contact.php"; }

else { echo "<b><h1>404 Error</h1></b>"; } 
?>

 

home.php

HOME PAGE

 

about.php

ABOUT PAGE

 

contact.php

CONTACT PAGE

 

 

No the other pages are not pHp... its a normal site...

Link to comment
https://forums.phpfreaks.com/topic/100919-need-a-code/#findComment-516089
Share on other sites

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.