Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11923
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Arno Welzel <usenet@arnowelzel.de> |
| Newsgroups | comp.lang.php |
| Subject | Re: changing iframe source via php |
| Date | Fri, 22 Nov 2013 16:27:11 +0100 |
| Lines | 43 |
| Message-ID | <528F77CF.5080308@arnowelzel.de> (permalink) |
| References | <1s4gzmodspnfe$.1sw8nmo0gpova$.dlg@40tude.net> <1csll7c4jvn5r.1aym2fc9ijbqu.dlg@40tude.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net t9WcNq1E/FlAtzatOhweJQIBexI6P/P59rd5k/UWHZ1+YxULXh |
| Cancel-Lock | sha1:EZBj/IB4b/MhqSxqM2XrYhpfl3s= |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 |
| In-Reply-To | <1csll7c4jvn5r.1aym2fc9ijbqu.dlg@40tude.net> |
| Xref | csiph.com comp.lang.php:11923 |
Show key headers only | View raw
Am 22.11.2013 14:08, schrieb richard:
> 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){
When you will you ever learn the difference between "=" and "=="?
> 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.
--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
changing iframe source via php richard <noreply@example.com> - 2013-11-21 17:23 -0500
Re: changing iframe source via php David Robley <me@home.invalid> - 2013-11-22 09:40 +1030
Re: changing iframe source via php invalid@example.com - 2013-11-22 11:21 +1100
Re: changing iframe source via php Richard Yates <richard@yatesguitar.com> - 2013-11-21 16:32 -0800
Re: changing iframe source via php richard <noreply@example.com> - 2013-11-21 20:23 -0500
Re: changing iframe source via php Richard Yates <richard@yatesguitar.com> - 2013-11-21 19:24 -0800
Re: changing iframe source via php Arno Welzel <usenet@arnowelzel.de> - 2013-11-22 12:21 +0100
Re: changing iframe source via php richard <noreply@example.com> - 2013-11-22 08:08 -0500
Re: changing iframe source via php Tim Streater <timstreater@greenbee.net> - 2013-11-22 13:33 +0000
Re: changing iframe source via php richard <noreply@example.com> - 2013-11-22 08:48 -0500
Re: changing iframe source via php Arno Welzel <usenet@arnowelzel.de> - 2013-11-22 16:30 +0100
Re: changing iframe source via php Arno Welzel <usenet@arnowelzel.de> - 2013-11-22 16:27 +0100
Re: changing iframe source via php Doug Miller <doug_at_milmac_dot_com@example.com> - 2013-11-22 20:19 +0000
Re: changing iframe source via php Doug Miller <doug_at_milmac_dot_com@example.com> - 2013-11-22 20:21 +0000
Re: changing iframe source via php Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-23 01:43 +0000
Re: changing iframe source via php Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-23 19:30 +0000
Re: changing iframe source via php Scott Johnson <noonehome@chalupasworld.com> - 2013-11-23 18:51 -0800
csiph-web