Reply to Re: [PHP] [NEWBIE] Cant get $_POST to work

Your name:

Reply:


Posted by The Disguised Jedi on 02/21/05 03:01

i think you have to use the ID parameter in the input tag in your HTML

Name: <input type="text" name="name" value="your name" id="name" /><br/>
Age: <input type="text" name="age" value="your age" id="age" /><br/>

try that and see how it goes....

On Sun, 20 Feb 2005 17:52:26 -0500, Randy Johnson <php@ewebpc.com> wrote:
> try $HTTP_POST_VARS maybe it is an older version of PHP
>
> Randy
>
> eatc7402 wrote:
> > Thanks for the input. However it does no good if the variables are empty,
> > which is my problem. The darn $_POST thing does not work at all
> > for me, and I am trying to find out why.
> >
> >
> > -----Original Message-----
> > From: b1nary Developement Team [mailto:dev@b1nary.jamwil.com]
> > Sent: Sunday, February 20, 2005 3:40 PM
> > To: David Freedman; php
> > Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work
> >
> >
> > What's up David... This script *should* work... I don't see any errors,
> > but try this anyways. In your change your print command to this:
> >
> > print("Hello, " . $name . "! You are " . $age . " years old!");
> >
> > What those periods do is simply append them to each other, so in this
> > case, you have the string, then you're appending the variable, then
> > appending another string, then another variable, then the last string.
> > Instead of having it all bunched up.
> >
> > David Freedman wrote:
> >
> >
> >>I have this simple form file:
> >><html>
> >><head>
> >></head>
> >><body>
> >><form action="test.php" method="post">
> >>Name: <input type="text" name="name" value="your name" /><br/>
> >>Age: <input type="text" name="age" value="your age" /><br/> <input
> >>type="submit" name="submit" value="submit" /> </form>
> >></body>
> >></html>
> >>Which passes (I wish!) data to this script:
> >>
> >><?php
> >>$name = $_POST['name'] ;
> >>$age = $_POST['age'] ;
> >>print("Hello, $name! You are $age years old!");
> >>?>
> >>
> >>It does not work unless I turn register_globals ON in the php.ini
> >>file. The php documentation leads me to believe this script SHOULD work
> >>with register_globals
> >>OFF.
> >>
> >>This a NEW instasllation of the Windows IIS Server also. Is there
> >>perhaps some configuration on the WINDOWS SERVER that must be set for
> >>general global data to be passed from a 'form' type page?
> >>
> >>David F.
> >>
> >>
> >>
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
The Disguised Jedi
disguised.jedi@gmail.com

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm
already internationally compatible!
PHP rocks!
"Knowledge is Power. Power Corrupts. Go to school, become evil"

Disclaimer: Any disclaimer attached to this message may be ignored.
However, I must say that the ENTIRE contents of this message are
subject to other's criticism, corrections, and speculations.

This message is Certified Virus Free

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация