Re: Re[2]: [PHP] value passing from html form to php variable.
| From: | Wei Wang | Date: | Sat, 01 Jun 2002 16:23:36 +0000 |
| Subject: | Re: Re[2]: [PHP] value passing from html form to php variable. | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100237@lists.php.net to get a copy of this message | ||
Sorry. When I input "Andras" as firstname in the form, ...
On Sat, 1 Jun 2002 17:22:02 +0100
ww220@cl.cam.ac.uk (Wei Wang) wrote:
> >
> > Create a php script containing just <?php phpinfo(); ?>. That page will tell
> > you where your php.ini is (or should be).
> >
> it told me it's in php/lib, but it's not there.
> >
> > Try this...
> >
> > $query = "INSERT INTO friends (id, firstname, surname) values
> > (nextval('friends_id_seq'), ".$_POST['firstname'].",
> > ".$_POST['surname'].")";
>
> When I input "Wei" for firstname and Wang for surname in the form and submit,
> I got error:
>
> Warning: pg_exec() query failed: ERROR: Attribute 'andras' not found in
> /local/scratch-1/ww220/Apache1.3/htdocs/test/add2.php on line 6
> ERRORERROR: Attribute 'andras' not found
>
>
> ps. Philip, Great thanks for your detailed help. I still couldn't figure out how
> to access $firstname. And I couldn't find php.ini, which should be the most
> straightforward way to solve this.
>
> >
> > --
> > Stuart
> >