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

Problem with post and echo $_POST['var']

P: n/a
Hi,

when I used metod post in a form, then i read posted variable and try
to print, I have :
In FORM text(variable_nr1) = 'test_var'
In php
<?php
echo $_POST['variable_nr1'];
?>
on screen :
test_varvariable_nr1=test_var

what's wrong on my server ?
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ozeh wrote:
Hi,

when I used metod post in a form, then i read posted variable and try
to print, I have :
In FORM text(variable_nr1) = 'test_var'
In php
<?php
echo $_POST['variable_nr1'];
?>
on screen :
test_varvariable_nr1=test_var

what's wrong on my server ?


You're not being all that clear here... but perhaps you should try using
$_GET rather then $_POST.

If the vars are in the URL, you want $_GET.

--
Ian P. Christian
http://www.fuzzmail.co.uk ~ Free, Fast and Fuzzy webmail
Jul 17 '05 #2

P: n/a

On 27-Oct-2003, oz**@wsp.czest.pl (ozeh) wrote:
when I used metod post in a form, then i read posted variable and try
to print, I have :
In FORM text(variable_nr1) = 'test_var'
In php
<?php
echo $_POST['variable_nr1'];
?>
on screen :
test_varvariable_nr1=test_var

what's wrong on my server ?


the echo you've shown would output 'test_var' the rest is output by
something else in your code. Show us the whole .php file and we'll point it
out to you.

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.