Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11359
| Path | csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-ID | <9534732.tJzfvtEYAU@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <php@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Fri, 11 Oct 2013 01:51:10 +0200 |
| User-Agent | KNode/4.10.5 |
| Content-Transfer-Encoding | 8Bit |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| Subject | Re: resolved?? Re: How to transfer value to iframe? |
| Newsgroups | comp.lang.php |
| References | <12cqbhii4rehb.1tf3fbhsnvt9o$.dlg@40tude.net> <orlpb7ptvlye.o9v9q8t427lk.dlg@40tude.net> <l378qb$r9n$1@dont-email.me> <3866294.L8KrQWI3Da@PointedEars.de> |
| MIME-Version | 1.0 |
| Lines | 65 |
| NNTP-Posting-Date | 11 Oct 2013 01:51:12 CEST |
| NNTP-Posting-Host | e56fe12b.newsspool2.arcor-online.net |
| X-Trace | DXC=3G2BCbiL8R0^8FBo0_81f>A9EHlD;3Yc24Fo<]lROoR18kF<OcfhCO;:lDn3Y]T[_5DZm8W4\YJN<b@mF9jNikd5@hR_<@5eU4;VSBc@LM4@U> |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | csiph.com comp.lang.php:11359 |
Show key headers only | View raw
Thomas 'PointedEars' Lahn wrote:
> Norman Peelman wrote:
>> On 10/10/2013 01:01 PM, richard wrote:
>>> On Wed, 9 Oct 2013 22:32:22 -0400, richard wrote:
>>>> http://mroldies.net/200/audiox.php
>>>>
>>>> First, the sound will work only in firefox.
>>>> So don't go bashing me for that.
>>>
>>>
>>> <?php
>>> $number=$numbers[0];
>>> echo '<iframe id="x1" src="audiox1.php?asong='.$number.'"
>>> name="alpha"></iframe>';
>>> ?>
>>>
>>> At least the first number is now displayed.
>>
>> echo "<iframe id=x1
>> src='audiox1.php?asong=$number&name=$alpha'></iframe>";
>
> The safe syntax is
>
> echo "<iframe id=x1
> src='audiox1.php?asong={$number}&name={$alpha}'></iframe>";
Actually, that is the safe *PHP* syntax (after the line-break is removed).
HTML requires another change:
echo "<iframe id=x1"
. " src='audiox1.php?asong={$number}&name={$alpha}'></iframe>";
AISB, conversion of ”&” to “&” or & can and should be done with
PHP's htmlentities() or htmlspecialchars(), respectively. And “echo” should
not be used like above, but like below:
<iframe id="x1" src="audiox1.php?asong=<?php echo $number;
?>&name=<?php echo htmlspecialchars($alpha); ?>"></iframe>
PHP 5.4 and PHP < 5.4 with corresponding php.ini configuration support
<iframe id="x1" src="audiox1.php?asong=<?= $number ?>&name=<?=
htmlspecialchars($alpha) ?>"></iframe>
and
<iframe id="x1" src="audiox1.php?asong=<%= $number %>&name=<%=
htmlspecialchars($alpha) %>"></iframe>
respectively. Usually you would use a template engine or the MVC pattern:
<iframe id="x1"
src="audiox1.php?asong=<?= $this->number ?>&name=<?=
$this->escape($this->alpha) ?>"></iframe>
This is explained and recommended in the first chapter of the PHP manual.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to transfer value to iframe? richard <noreply@example.com> - 2013-10-09 22:32 -0400
Re: How to transfer value to iframe? David Robley <me@home.invalid> - 2013-10-10 13:43 +1030
Re: How to transfer value to iframe? richard <noreply@example.com> - 2013-10-09 23:31 -0400
Re: How to transfer value to iframe? David Robley <me@home.invalid> - 2013-10-10 14:20 +1030
Re: How to transfer value to iframe? richard <noreply@example.com> - 2013-10-10 00:01 -0400
Re: How to transfer value to iframe? Jeff North <jnorthau@yahoo.com.au> - 2013-10-10 15:40 +1100
Re: How to transfer value to iframe? richard <noreply@example.com> - 2013-10-10 00:51 -0400
Re: How to transfer value to iframe? "J.O. Aho" <user@example.net> - 2013-10-10 07:10 +0200
Re: How to transfer value to iframe? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-11 01:15 +0200
Re: How to transfer value to iframe? Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-10 13:25 +0000
Re: How to transfer value to iframe? Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-10 13:12 +0000
resolved?? Re: How to transfer value to iframe? (was: How to transfer value to iframe?) richard <noreply@example.com> - 2013-10-10 13:01 -0400
Re: resolved?? Re: How to transfer value to iframe? richard <noreply@example.com> - 2013-10-10 13:28 -0400
Re: resolved?? Re: How to transfer value to iframe? Derek Turner <frderek@cesmail.net> - 2013-10-10 17:39 +0000
Re: resolved?? Re: How to transfer value to iframe? richard <noreply@example.com> - 2013-10-10 15:47 -0400
Re: resolved?? Re: How to transfer value to iframe? Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-10 21:31 +0000
Re: resolved?? Re: How to transfer value to iframe? richard <noreply@example.com> - 2013-10-10 19:45 -0400
Re: resolved?? Re: How to transfer value to iframe? The Natural Philosopher <tnp@invalid.invalid> - 2013-10-11 01:45 +0100
Re: resolved?? Re: How to transfer value to iframe? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-11 08:17 -0700
Re: resolved?? Re: How to transfer value to iframe? Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-11 15:27 +0000
Re: resolved?? Re: How to transfer value to iframe? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-11 21:21 -0700
Re: resolved?? Re: How to transfer value to iframe? David Robley <me@home.invalid> - 2013-10-11 11:43 +1030
Re: resolved?? Re: How to transfer value to iframe? Norman Peelman <npeelman@cfl.rr.com> - 2013-10-10 18:13 -0400
Re: resolved?? Re: How to transfer value to iframe? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-11 01:37 +0200
Re: resolved?? Re: How to transfer value to iframe? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-11 01:51 +0200
Re: resolved?? Re: How to transfer value to iframe? richard <noreply@example.com> - 2013-10-10 19:43 -0400
Re: resolved?? Re: How to transfer value to iframe? Norman Peelman <npeelman@cfl.rr.com> - 2013-10-10 22:30 -0400
Re: resolved?? Re: How to transfer value to iframe? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-11 13:05 +0200
Re: resolved?? Re: How to transfer value to iframe? Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-11 15:39 +0000
Re: resolved?? Re: How to transfer value to iframe? Norman Peelman <npeelman@cfl.rr.com> - 2013-10-11 19:04 -0400
csiph-web