BASIC HELP on php

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

    BASIC HELP on php

    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.)
  • sotto

    #2
    Re: BASIC HELP on php

    On Sat, 23 Aug 2003 15:13:44 -0700, tobias wrote:
    [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]


    That's because of a setting in php.ini ... REGISTER_GLOBAL S = OFF ...
    <?php echo $_GET['texto']; ?> will work though

    hth,
    sotto

    Comment

    • sam

      #3
      Re: BASIC HELP on php

      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 308231413.2b589 a3f@posting.goo gle.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...