By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

BASIC HELP on php

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.