Date: 02/29/00
- Next message: Wolfgang Schneider: "Re: [PHP3] pulldown menu lists with php3 possible?"
- Previous message: er-chan: "[PHP3] Re: [RE: [PHP3] RPM packages for RedHat 6.1]"
- Next in thread: Gregor Welters: "Re: [PHP3] form information into variables"
- Reply: Gregor Welters: "Re: [PHP3] form information into variables"
- Reply: Richard Lynch: "Re: [PHP3] form information into variables"
- Maybe reply: sreenivasulu chakka: "Re: [PHP3] form information into variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I didn't see this post to the group the first time so I will try again.
If I understand the PHP3 manual correctly, you can make the action of an HTML form your PHP3 script, and in your PHP3 script, simply put an $ in front of the field name from the form and insert it that way correct?
I have been playing around with this and cannot seem to get it to insert any of the info. This is a snippet of the code I am using . . .
form.html
=========
<FORM action="insert.php3" method="post">
<input type="text" name="FirstName">
<input type="text" name="LastName">
<input type="submit" name="submit" value="submit">
</form>
insert.php3
=========
<?PHP
require('logon.inc');
$table = 'CHHmember';
{
$str_sql = "insert into $table
(
FirstName,
LastName
)
values
(
'$FirstName'
'$LastName'
)";
exit();
}
?>
==============
I have tried this several different ways (with quotes, without quotes, etc) and never get any error messages, it acts like the records have been updated, however, when I telnet to a mysql prompt and do a SELECT * FROM CHHmember it gives me an empty set, so the records are obviously not being inserted, I just don't know why.
What am I doing wrong?
Erik
- Next message: Wolfgang Schneider: "Re: [PHP3] pulldown menu lists with php3 possible?"
- Previous message: er-chan: "[PHP3] Re: [RE: [PHP3] RPM packages for RedHat 6.1]"
- Next in thread: Gregor Welters: "Re: [PHP3] form information into variables"
- Reply: Gregor Welters: "Re: [PHP3] form information into variables"
- Reply: Richard Lynch: "Re: [PHP3] form information into variables"
- Maybe reply: sreenivasulu chakka: "Re: [PHP3] form information into variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

