ggalan
09-22-2010, 05:12 PM
i had a post in PHP section but i think my question is 1/2 JS. i have href links using hash anchors like
href="#/work/section1"
this calls a "switch.php" file which is dynamic and i want to be able to read that ending part so i can write some conditions like
<?php
$id = $_GET['id'];
if($id=1 ){$link = "http://a.com/home"; $title="client1"; }
else if($id=2 ){$link = "http://b.com/home"; $title="client2"; }
else if($id=3 ){$link = "http://c.com/home"; $title="client3"; ;}
?>
// the rest of html mark up
i saw this post but i dont really understand what they are suggesting
http://stackoverflow.com/questions/940905/can-php-read-the-hash-portion-of-the-url
how do i get that has from client and send it to server so i can write my php conditions?
href="#/work/section1"
this calls a "switch.php" file which is dynamic and i want to be able to read that ending part so i can write some conditions like
<?php
$id = $_GET['id'];
if($id=1 ){$link = "http://a.com/home"; $title="client1"; }
else if($id=2 ){$link = "http://b.com/home"; $title="client2"; }
else if($id=3 ){$link = "http://c.com/home"; $title="client3"; ;}
?>
// the rest of html mark up
i saw this post but i dont really understand what they are suggesting
http://stackoverflow.com/questions/940905/can-php-read-the-hash-portion-of-the-url
how do i get that has from client and send it to server so i can write my php conditions?