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

Home » Imported messages » comp.lang.php » How to transfer value to iframe?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to transfer value to iframe? [message #183134 is a reply to message #183125] Thu, 10 October 2013 13:25 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Wed, 09 Oct 2013 23:31:55 -0400, richard wrote:

> I tried this

> <iframe id="x1" src="audiox1.php?asong=songid" name="alpha"></iframe>

> Assigining songid as $songid=$play[0];

> Retrieving value through

> $number=$_GET["asong"];

> echo $number;

> Results in "songid" being printed.

That is as expected, you're setting the value of asong in the query
string to the text value songid.

Depending on how you're generating the string:

<iframe id="x1" src="audiox1.php?asong=songid" name="alpha"></iframe>

and assuming that $songid is a php variable containing the numeric songid
that you want to pass, you may wish to replace songid in the above
construction with one of:

' . $songid . '
$songid
{$songid}

I also suggest that you read

http://www.php.net/manual/en/language.types.string.php

very carefully. There are some very important comments there about what
happens inside different types of string literal depending on the quoting
methods used.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[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
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: please unsubscribe me
Next Topic: Can't change upload_max_filesize
Goto Forum:
  

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

Current Time: Tue Nov 05 00:15:22 GMT 2024

Total time taken to generate the page: 0.06591 seconds