FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » changing iframe source via php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: changing iframe source via php [message #183846 is a reply to message #183845] Fri, 22 November 2013 13:33 Go to previous messageGo to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
In article <1csll7c4jvn5r(dot)1aym2fc9ijbqu(dot)dlg(at)40tude(dot)net>, richard
<noreply(at)example(dot)com> wrote:

> On Thu, 21 Nov 2013 17:23:00 -0500, richard wrote:
>
>> I'm trying to figure out a way so that I can change the iframe source with
>> just simply changing the src value.
>> But I keep getting a parse error.
>>
>> I set the posted value with a link.
>> value=1 src=page1
>> value=2 src=page2
>> value=3 src=page3
>> if value is anything else, then the home page is used.
>>
>> <iframe name="home" id="aframe" src="????">
>>
>> How od I code where the ? are??
>
> $apage=$_GET["page"];
> if (empty($apage)) {$apage=0;}
>
> if ($apage=1){
^^^^^^ "Here we go again, oh watch him now, ..."

> echo '<iframe name="home" id="if1" src="index3.php"></iframe>';
> }
> else {
> echo '<iframe name="home" id="if1" src="home.php"></iframe>';
> }
>
> This results in "index3.php" being shown when the site is first loaded.
> when the link is clicked, which has ?page=1 as a value, it not only brings
> in the correct page, but duplicates the original page as well.
>
> On other pages I swap pages with an iframe with no problems.
>
> www.mroldies.net
> compare to www.mroldies.net/index3.php
>

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PEAR is dead?
Next Topic: PHP functions to convert markup efficiently
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 08:55:50 GMT 2024

Total time taken to generate the page: 0.04884 seconds