Jump to content
xisto Community
Sign in to follow this  
Raven

Html Frames how do i wrap html into php

Recommended Posts

hi all what i want to know is does anybody know a way to input html code into php ;) because i want to bulid a website using frames but i wish for with to run using php or if theres a way of creating frames using php that would be better for me.if any of u people got some good advice or links please reply.Thanks ;)

Share this post


Link to post
Share on other sites

If I understood You correctly, You want to put HTML into PHP...

 

Try using echo command

 

echo "<P>This is a new paragraph</P>";

This will output <P>This is a new paragraph</P> when you look at the source... Using this method, you can enter any code you want...

 

Or, as an alternative, you can use following method:

<?php if($variable == 1) { ?>[/br]<P>Variable <STRONG>$variable</STRONG> equals 1</P>[br]<?php } else { ?>[/br]<P>Variable <STRONG>$variable</STRONG> is not 1</P><?php } ?>

Share this post


Link to post
Share on other sites

just starting to look into php right now, but i've delayed for quite a while just cause i'm comfortable with perl / cgi. so with perl, and i assume it's very similar to php, simply print out what html you want through your script ... ie:<frameset> <frame name=blah target=blah2></frameset>you simply achive this with print "<frameset><frame name=blah target=blah2></frameset>" ;maybe there's fancy way of doing it, but doesn't matter. ie print br; = print <br>

Share this post


Link to post
Share on other sites

For my understood...., you want to put php by html frames.

>> Try this...

<FRAMESET rows="50%,50%"> [br]<FRAME SRC="pag_01.php" NAME="frame1"> [/br]<FRAME SRC="pag_02.php" NAME="frame2">[br]</FRAMESET>
[/br]

but if you want to send variable with frame, you can not do it.

[br]//this code can not sent variable...[/br]<FRAME SRC="pag_01.php?value=$variable" NAME="frame1"> [br]
[/br]

I use iframe to solve this problem....

[br]// use iframe to send variable...[/br]<a href=page1.php?variable=001 target=iframe1>[br]<iframe name=iframe1 src="page1.php?value=<?=$variable;?>">[/br]

Share this post


Link to post
Share on other sites

hi all what i want to know is does anybody know a way to input html code into php ;)

because i want to bulid a website using frames but i wish for with to run using php or if theres a way of creating frames using php that would be better for me.

 

if any of u people got some good advice or links please reply.

 

Thanks  ;)

<{POST_SNAPBACK}>


From my example, i advice u to use IFRAMES, u have examples down in other posts, but u can also dynamicly create html pages with php echo (also example in posts down) give yourself and imagination. Why IFRAMES because you will not so having problems with google.com

 

link to tutorials: php tutorials

Share this post


Link to post
Share on other sites

Exactly why do you want to use frames? Unless you don't have absolutely any other alternative you should use frames.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.