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

how can I print url parameters?

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
In article <16*************************@posting.google.com> ,
to****@sabadellpisos.com says...
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


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

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
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.co m...
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.