Click to See Complete Forum and Search --> : PHP Possibilities...


john0791
06-17-2004, 09:31 AM
Good morning, all.

Redesigning a site and was wondering if this is possible...

I want to be able to set up a page using PHP. Want to divide the user agent into DIVs and be able to target those DIVs using PHP. For example, if I had a left and a right DIV, the left DIV would be the section containing the links and the right DIV would be the section that is the "target" for the links from the left DIV...kinda like how frames work I suppose.

I can do this with no difficulties using Javascript, but would like to keep my site JS free.

Can it be done?

Thank you.

solavar
06-17-2004, 10:07 AM
Easily done...



/*

HTML
<div>MenuHere</div>
<div>ContentHere</div>

*/

// PHP
<div><?php include("menu.php") ?></div>
<div><?php include("content.php") ?></div>



The idea?
You simply stick PHP code where you would define the 'target'.

Jona
06-17-2004, 10:08 AM
Not through PHP without reloading the page. Frames or JavaScript are the only ways it's ever been done before. I would just use includes, though.

Edit: Didn't see solavar's post.

aoeguy
06-17-2004, 10:18 AM
I dont really understand how you would do that...would have to reload the page over and over again. PHP isnt really supposed to do such stuff.

[Oops, lol, didnt see them :rolleyes: ]