Creating a PHP variable with Something
Posted: Tue Feb 12, 2008 9:55 pm
I've got a site with several pages on it and I want to yous a table to layout the site as if it were frames. ( I don't want to use frames because they are just to structured)
Ive got a simple site now
a top bar a links bar on the left
a body section in the middle for the actual text
and a bottom bar for a footer
My intention is to create a php (or other) script that will update a php variable based on the link that was click and display the page associated with that link
Lets say I have site1, site2 and site3
I've got
Link1, link2, and link3
When link1 is clicked I want site1 to be displayed in the body section of the site and the rest of the site not to change. the same could be said about site2 and site3
I thought about using javascript onclick but I don't believe I can update the php code with javascript.
<a href="link" onclick="<?php $body['variable']='variable'; ?>">Link</a><br />
<a href="link2" onclick="<?php $body['variable']='variable2'; ?>">Link2</a>
<?PHP Get valriable ?>
Any input would be great
thanks
Ive got a simple site now
a top bar a links bar on the left
a body section in the middle for the actual text
and a bottom bar for a footer
My intention is to create a php (or other) script that will update a php variable based on the link that was click and display the page associated with that link
Lets say I have site1, site2 and site3
I've got
Link1, link2, and link3
When link1 is clicked I want site1 to be displayed in the body section of the site and the rest of the site not to change. the same could be said about site2 and site3
I thought about using javascript onclick but I don't believe I can update the php code with javascript.
<a href="link" onclick="<?php $body['variable']='variable'; ?>">Link</a><br />
<a href="link2" onclick="<?php $body['variable']='variable2'; ?>">Link2</a>
<?PHP Get valriable ?>
Any input would be great
thanks