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
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