Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

60 users online



PHP Include

PHP Include

Currently viewing this thread: 1 (0 members and 1 guests)


bleedwithme

bleedwithme

i do my crosswords in pen
Status: Offline!

PHP Include

How would one turn the following code:

<iframe src="/fusionpoll/polls.php?poll=7&temp=main1" marginheight="0" marginwidth="0" width="142" height="240" frameborder="0"></iframe>

Into a regular PHP include?

Thanks a bunch.

Motorspin

Motorspin

Neverside Newbie
Status: Offline!

You can't. In PHP, you are unable to include query strings.

___________________

Travis Farrell
http://motorspin.com/stuff/images/avasig/m_enterprisesig.gif

bleedwithme

bleedwithme

i do my crosswords in pen
Status: Offline!

Hmm, okay. Well on my website, http://jordanmeeter.com, I have a column on the right, with the ID 'rclmn'. Here is the code that makes up the right column:

<div id="rclmn">
<h3>Daily Poll</h3>
<p><iframe src="/fusionpoll/polls.php?poll=7&temp=main1" marginheight="0" marginwidth="0" width="142" height="240" frameborder="0"></iframe></p>
</div>

And here is my CSS for 'rclmn':

#rclmn {
width: 150px;
height: 400px;
background-color: #D9E1ED;
border: solid 1px #5675A5;
color: #000;
font-size: 12px;
padding: 10px 0px 5px 0px;
float: right;
text-align: center;
}

#rclmn p {
margin-bottom: 0px;
margin-top: 0px;
width: 130px;
padding: 0px 0px 0px 8px;
}

What would I add to make that stinkin' iframe centered, using CSS?

v3x0rg

v3x0rg

Pawn Coder
Status: Offline!

Why don't you just make up a header, footer, and index file, and just include it all into the index file? Smile

___________________

- Moderator at the official AMX Mod X forums

bleedwithme

bleedwithme

i do my crosswords in pen
Status: Offline!

Wait, I got it. I just took away the <p> tags...

Ynhockey

Ynhockey

Neverside Newbie
Status: Offline!

You can still turn that into an include...

ob_start();
include '/fusionpoll/polls.php';
header ("location: $_SERVER['PHP_SELF']?poll=7&temp=main1");
ob_end_flush;

i THINK that's how it would be done... but instead of directly appending the GET var, i think it would be a lot better to learn basic PHP and re-code your site in a way where this is not needed.

___________________

Learn HTML

bleedwithme

bleedwithme

i do my crosswords in pen
Status: Offline!

Could I use:

PHP:

<?
$poll
=7;
$temp="main1";
include_once(
"fusionpoll/polls.php");
?>

?

Ynhockey

Ynhockey

Neverside Newbie
Status: Offline!

That would work if the vars you're using inside polls.php are $poll and $temp, otherwise no.

___________________

Learn HTML

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0082 seconds.