Jump to content

iframe in php


hamza

Recommended Posts

i have iframe like

<iframe id="rf" src="template_files/a.php" allowtransparency="true" class="templatedemo" frameborder="0" scrolling="auto"></iframe>

 

problem is that

when i include a.php in src it show nothing if i include a.htm then it show properly contents of a file.

 

i want to include the a.php file which is not including

please help me

thanks in advance

Link to comment
Share on other sites

i have got the main problem theme

here is the code

<?php  $apple = '12$'; ?>

<iframe id="rf" src="template_files/a.php" allowtransparency="true" class="templatedemo" frameborder="0" scrolling="auto"></iframe>

 

a.php file

contain

<?php echo $apple;  ?>

 

the main problem is that $apple variable not displaying the value.

plz tell me why it is not show value.

 

Link to comment
Share on other sites

Because variables do get passed between pages. You'll want to use include instead.

Actually iframe allowing me to scrolling on my template if i do not use iframe then it will

not scroll down.so its necessory to use .

If you use iframe then any variables you define will not be available to a.php

 

You don't have to use iframes to allow for scrolling. You should look into the overflow CSS property. Example

 

<div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div><div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div>

Link to comment
Share on other sites

Because variables do get passed between pages. You'll want to use include instead.

Actually iframe allowing me to scrolling on my template if i do not use iframe then it will

not scroll down.so its necessory to use .

If you use iframe then any variables you define will not be available to a.php

 

You don't have to use iframes to allow for scrolling. You should look into the overflow CSS property. Example

 

<div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div><div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div>

 

 

Actually i have got blog template in which iframe tag is used.and in that iframe tag a.htm i calling

and i have change a.htm to a.php i must need to call the a.php file so i can run my code properly.

if you know or can remove iframe from template and make it simple then plz .may i send u my template.

its being kind of you if u help me.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.