variable as a parameter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • raul76@gmx.de

    variable as a parameter

    <?php

    echo "<frame src=http://localhost/example.php?fir st=first name =
    top>";
    echo "<frame src=http://localhost/test.php?first= first name =
    bottom>";

    ?>
    I have $fitst variable (from post data, and echo of $first is
    proper).
    I want to give the value of the $first as a parameter for test.php and
    example.php [there are also $first variables] scripts. But what I
    reach is, that the $first in both scripts get "first" as a value. It
    is not what I mean.
    How could I make it?
    TIA
    Greetings
  • Tom Thackrey

    #2
    Re: variable as a parameter


    On 9-Oct-2003, raul76@gmx.de (raul76@gmx.de) wrote:
    [color=blue]
    > <?php
    >
    > echo "<frame src=http://localhost/example.php?fir st=first name =
    > top>";
    > echo "<frame src=http://localhost/test.php?first= first name =
    > bottom>";
    >
    > ?>
    > I have $fitst variable (from post data, and echo of $first is
    > proper).
    > I want to give the value of the $first as a parameter for test.php and
    > example.php [there are also $first variables] scripts. But what I
    > reach is, that the $first in both scripts get "first" as a value. It
    > is not what I mean.
    > How could I make it?[/color]

    try:
    echo "<frame src=\"http://localhost/example.php?fir st=$first\" name=top>";
    echo "<frame src=\"http://localhost/test.php?first= $first\" name=bottom>";


    --
    Tom Thackrey

    tom (at) creative (dash) light (dot) com
    do NOT send email to jamesbutler@wil lglen.net (it's reserved for spammers)

    Comment

    • Haggis

      #3
      Re: variable as a parameter

      Alternatively:
      <frame src="http://localhost/example.php?fir st=<?=$first?>" name="top">
      <frame src="http://localhost/test.php?first= <?=$first?>" name="bottom">

      Al,


      "Tom Thackrey" <use.signature@ nospam.com> wrote in message
      news:uenhb.117$ k_3.32429202@ne wssvr21.news.pr odigy.com...[color=blue]
      >
      > On 9-Oct-2003, raul76@gmx.de (raul76@gmx.de) wrote:
      >[color=green]
      > > <?php
      > >
      > > echo "<frame src=http://localhost/example.php?fir st=first name =
      > > top>";
      > > echo "<frame src=http://localhost/test.php?first= first name =
      > > bottom>";
      > >
      > > ?>
      > > I have $fitst variable (from post data, and echo of $first is
      > > proper).
      > > I want to give the value of the $first as a parameter for test.php and
      > > example.php [there are also $first variables] scripts. But what I
      > > reach is, that the $first in both scripts get "first" as a value. It
      > > is not what I mean.
      > > How could I make it?[/color]
      >
      > try:
      > echo "<frame src=\"http://localhost/example.php?fir st=$first\"[/color]
      name=top>";[color=blue]
      > echo "<frame src=\"http://localhost/test.php?first= $first\"[/color]
      name=bottom>";[color=blue]
      >
      >
      > --
      > Tom Thackrey
      > www.creative-light.com
      > tom (at) creative (dash) light (dot) com
      > do NOT send email to jamesbutler@wil lglen.net (it's reserved for spammers)[/color]


      Comment

      • Virgil Green

        #4
        Re: variable as a parameter

        "Haggis" <nospa@mchaggis .org.uk> wrote in message
        news:1065751309 .995548@auth2.d ns.griffin.net. uk...[color=blue]
        > Alternatively:
        > <frame src="http://localhost/example.php?fir st=<?=$first?>" name="top">
        > <frame src="http://localhost/test.php?first= <?=$first?>" name="bottom">[/color]

        provided that short tags are enabled...


        Comment

        Working...