# Insert info and email

**URL:** <https://forum.kirupa.com/t/insert-info-and-email/148630>\
**Category:** Uncategorized\
**Created:** [May 21, 2005, 6:55pm UTC](https://forum.kirupa.com/t/insert-info-and-email/148630 "2005-05-21T18:55:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [May 21, 2005, 6:55pm UTC](https://forum.kirupa.com/t/insert-info-and-email/148630/1 "2005-05-21T18:55:57Z")

</div>

Hey guys, need help agian with php.  
I’ve created 6 different html contact forms that collect info and will store that info into a mySql db so the results can be searched later. This is not problem however. Each of those 6 forms will need the information sent to a different dept email address. Im stumped as to how to send the email AND send the info to the db at the same time. Seems like when I get one working the other one breaks. ☹

This is the insert.php that Im using which works fine

```php

<?
include("dbinfo.php");
$name=$_POST['name'];
$company=$_POST['company'];
$title=$_POST['title'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$state=$_POST['state'];
$contact_how=$_POST['contact_how'];
$message=$_POST['message'];
$query = "INSERT INTO contacts VALUES ('','$name','$company','$title','$email','$phone','$state','$contact_how','$message')";
mysql_query($query);
mysql_close();
?>

```

I need this to send an email and to direct to a confirmation page. I can pay some one a little money like 50$ via paypal. It would only take a good coder like 15 minutes to do 😉 May also need your services later down the line for developing the search form too. (thats if I cant figure it out) 😛  
Thanks,  
Josh

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [May 21, 2005, 10:30pm UTC](https://forum.kirupa.com/t/insert-info-and-email/148630/2 "2005-05-21T22:30:35Z")

</div>

wooohooo! It’s works like a charm 😃  
I may take you up on the search help. But I won’t be touching the pc that much tomorrow. Im gonna be riding my downhill bike hoping I dont die :lol:  
If I need help I will post here.  
Thanks again Digital! 🙂
