Help with PHP and MySQL database

I have a domain, call it www.domain.com. I have a mysql database that
I created that I would like to add records to using an html form.

1. where do I put the php script that takes the fields of the form,
and adds it to the database? The fields (firstname, lastname, etc) are
called the same in the form as well as the database.

2. how do I dump the recors that were added to the database into
excel?

thanks
Juan Epstein [ So, 17 Dezember 2006 20:12 ] [ ID #1570660 ]

Re: Help with PHP and MySQL database

Juan Epstein wrote:
> I have a domain, call it www.domain.com. I have a mysql database that
> I created that I would like to add records to using an html form.
>
> 1. where do I put the php script that takes the fields of the form,
> and adds it to the database? The fields (firstname, lastname, etc) are
> called the same in the form as well as the database.

--- formpage.html ---
<form action="thispage.php">
Firstname<input type="text" name="firstname"><br>
Lastname<input type="text" name="lastname"><br>
<input type="submit" name="Submit">
</form>
--- eof ---


--- thispage.php ---
echo $_REQUEST['firstname'] ." ". $_REQUEST['lastname'];
--- eof ---


> 2. how do I dump the recors that were added to the database into
> excel?

Why would you?

see myphpadmin for getting out data in cvs format that then maybe can be
imported into microsoft excel (excel is a registered trademark by Excel AB).


--

//Aho
Shion [ So, 17 Dezember 2006 20:35 ] [ ID #1570661 ]
PHP » alt.php.sql » Help with PHP and MySQL database

Vorheriges Thema: phpmyadmin inport functions
Nächstes Thema: I get a syntax error when trying to learn code in a quick start guide.