You can pass them through the URL to the page you want to get to, even through frames.
Example:
You want the user to browse a section in a different frame on your page:
<a href="content.php?s=flowers" target="content">
Assuming your frame name where it gets loaded to is called "content".
The variable s is populated with the value "flowers" and is sent to the receiving page. It would be the same as if you had declared
$s=flowers -
Now, with your receiving page, you can do something like:
switch ($s) {
case default:
echo "
Your normal HTML here";
break;
case "flowers":
include ('flowers.php');
break;
}
Originally posted by chelsea7
Hello,
I have a simple question. How do I target a page in a frame in PHP. Can this be done?
I know the syntax for passing varibles in PHP is as stated below;
header('location:menusm.php?userID='.$userID);
I need the PHP syntax for the html code listed below;
<p align="center">[<a href="index2.htm" target="_top">Return to Home</a>]</p>
Any assistance would be appreciated.
thanks. Also what is the other way I could pass varibles instead of using 'header(location:'?
Chelsea7