Jump to content

Is it possible to use $_GET with base url?


defeated

Recommended Posts

Hi, Is it possible to use the $_Get function with the base of the url of a page?

I want to have a dynamic <head> based on the url of the page.... something like

$page=$_GET['url'];
if($page='http://www.jackiebrownmedical.ie'){
echo "<title>the homepage</title>";
//there will also be other tags here eg description, robots etc.
}
elseif($page='http://www.jackiebrownmedical.ie/jobdetails.php'){
$id=$_GET['id'];
echo "<title>more php that created a title for each page based on the job id</title>";
//there will also be other tags here eg description, robots etc.
}
else {echo "<title>a default title</title>";}

The site structure is like this:

http://www.jackiebrownmedical.ie    //homepage

http://www.jackiebrownmedical.ie/about.php  //Static page

http://www.jackiebrownmedical.ie/jobs.php  //Static Page with dynamic content

http://www.jackiebrownmedical.ie/jobdetails.php?id='123456'  //dynamic pages based on job id no. every <title> is different (dynamic based on details from db)

http://www.jackiebrownmedical.ie/applyform.php?id='123456'  //dynamic form based on job id no.

 

I cant just have

www.jackiebrownmedical.ie?url='home'

www.jackiebrownmedical.ie/about.php?url='about'

www.jackiebrownmedical.ie/jobs.php?url='jobs'

www.jackiebrownmedical.ie/jobdetails.php?url='jobdetails', id='123456'

Or can I?????

I need a genius to help me out here....... or failing that you'll do!

Link to comment
https://forums.phpfreaks.com/topic/98960-is-it-possible-to-use-_get-with-base-url/
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.