Re: Re[2]: [PHP] value passing from html form to php variable.
| From: | Wei Wang | Date: | Sat, 01 Jun 2002 16:22:02 +0000 |
| Subject: | Re: Re[2]: [PHP] value passing from html form to php variable. | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100236@lists.php.net to get a copy of this message | ||
>
> 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
>