Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: How to transfer value to iframe? Date: Thu, 10 Oct 2013 07:10:15 +0200 Lines: 85 Message-ID: References: <12cqbhii4rehb.1tf3fbhsnvt9o$.dlg@40tude.net> <68c95v23ldk4$.azmbhc33v7v4.dlg@40tude.net> <1072h1gn3qh4z.axclc9ryd5s7$.dlg@40tude.net> <3key9ksh6plj.mz1o0un2ccrs.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net pjjG6J6YT1qA+eQw1Kfb8Az0RtqKei41ehSjFGp5LsVOLiCcoL Cancel-Lock: sha1:3z0YnoqIQQNECDqjWx/+RKDZ7Bw= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <3key9ksh6plj.mz1o0un2ccrs.dlg@40tude.net> Xref: csiph.com comp.lang.php:11340 On 10/10/13 06:51, richard wrote: > On Thu, 10 Oct 2013 15:40:55 +1100, Jeff North wrote: > >> On Thu, 10 Oct 2013 00:01:56 -0400, in comp.lang.php richard >> >> <1072h1gn3qh4z.axclc9ryd5s7$.dlg@40tude.net> wrote: >> >>> | On Thu, 10 Oct 2013 14:20:56 +1030, David Robley wrote: >>> | >>> | > richard wrote: >>> | > >>> | >> On Thu, 10 Oct 2013 13:43:42 +1030, David Robley wrote: >>> | >> >>> | >>> richard wrote: >>> | >>> >>> | >>>> http://mroldies.net/200/audiox.php >>> | >>>> >>> | >>>> First, the sound will work only in firefox. >>> | >>>> So don't go bashing me for that. >>> | >>>> >>> | >>>> I have it set up so that a shuffled array will be displayed any time the >>> | >>>> page is loaded. Hopefully. >>> | >>>> What I want to do is to ensure that item one in the menu list will match >>> | >>>> what is in the iframe. >>> | >>>> >>> | >>>> $_get[] relies on the values being transferred via a link. >>> | >>> >>> | >>> Not so - it uses the query string - >>> | >>> https://en.wikipedia.org/wiki/Query_string - which may be passed via a >>> | >>> clickable link, or as part of a URL >>> | >>> >>> | >>>> At this point, no link has been clicked on to set the value. >>> | >>>> So how do I properly set the intitial value? >>> | >>> >>> | >>> >>> | >>> >>> | >>> Simply pass the value(s) you need to utilise in the iframe >>> | >> >>> | >> I tried this >>> | >> >>> | >> >>> | >> >>> | >> >>> | >> Assigining songid as $songid=$play[0]; >>> | >> >>> | >> Retrieving value through >>> | >> >>> | >> >>> | >> $number=$_GET["asong"]; >>> | >> >>> | >> echo $number; >>> | >> >>> | >> >>> | >> >>> | >> Results in "songid" being printed. >>> | > >>> | > Not surprisingly, because that is what you have set as the value for asong >>> | > in the iframe link. If you want to pass a value contained in a variable, you >>> | > should use the variable, not a string. Look closely at what you are doing >>> | > when calling the iframe. >>> | > >>> | > >>> | >>> | so my question kind of still stands. >>> | how do I make asong=?????? as the given initial value of the shuffled >>> | array? >> >> Shhheeeeesssshhh. >> > > Wonder why I get absolutely nothing as a reeult? > Guess it's because nothing got assingned eh? > If you copied the example as it was, you never get a value passed to the frame, if you did make it as you should for appending a php value, then the problem is that you haven't assigned a value. Maybe something like http://www.w3schools.com/php could help you on the way with the simple things. -- //Aho