470,874 Members | 1,787 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,874 developers. It's quick & easy.

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:
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.)
Jul 16 '05 #1
2 1617
On Sat, 23 Aug 2003 15:13:44 -0700, tobias wrote:
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.)

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

hth,
sotto

Jul 16 '05 #2
sam
You have register_globals set to off in your php.ini file.
user $_GET['texto'] instead of $texto.

HTH

"tobias" <to****@sabadellpisos.com> wrote in message
news:16**************************@posting.google.c om...
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.)

Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Michael Foord | last post: by
9 posts views Thread by Malcolm | last post: by
56 posts views Thread by Dave Vandervies | last post: by
14 posts views Thread by luis | last post: by
3 posts views Thread by sefe dery | last post: by
10 posts views Thread by trippeer | last post: by
97 posts views Thread by Master Programmer | last post: by
6 posts views Thread by Simon Walsh | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.