how can I print url parameters?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tobias

    how can I print url parameters?

    I am new in programming with PHP.

    I wrote the following code:

    file name: output.php

    <?php echo $texto; ?>

    And I call it on my browser like:


    The response in my browser is:
    Notice: Undefined variable: texto in C:\Inetpub\cgt\ output.php on line 1

    Can anybody help me?
    Lots of thanks.

    (you can reply to my email address.)
  • Hywel Jenkins

    #2
    Re: how can I print url parameters?

    In article <165e4477.03082 31426.3891221@p osting.google.c om>,
    tobias@sabadell pisos.com says...[color=blue]
    > I am new in programming with PHP.
    >
    > I wrote the following code:
    >
    > file name: output.php
    >
    > <?php echo $texto; ?>
    >
    > And I call it on my browser like:
    > http://localhost/cgt/output.php?texto=testing
    >
    > The response in my browser is:
    > Notice: Undefined variable: texto in C:\Inetpub\cgt\ output.php on line 1[/color]

    <?php echo $_GET["texto"]; ?>

    --
    Hywel I do not eat quiche


    Comment

    • sam

      #3
      Re: how can I print url parameters?

      You have register_global s set to off in your php.ini file.
      user $_GET['texto'] instead of $texto.

      HTH

      "tobias" <tobias@sabadel lpisos.com> wrote in message
      news:165e4477.0 308231426.38912 21@posting.goog le.com...[color=blue]
      > I am new in programming with PHP.
      >
      > I wrote the following code:
      >
      > file name: output.php
      >
      > <?php echo $texto; ?>
      >
      > And I call it on my browser like:
      > http://localhost/cgt/output.php?texto=testing
      >
      > The response in my browser is:
      > Notice: Undefined variable: texto in C:\Inetpub\cgt\ output.php on line 1
      >
      > Can anybody help me?
      > Lots of thanks.
      >
      > (you can reply to my email address.)[/color]


      Comment

      Working...