Submit form using one button, one to emailmeform using html script and another to my internal database -- 2

Im sorry for my bad english. Im begineer with PHP and all coding method. I've been searching this for a days and still cannot find what I need lack to my understanding especially with php, java or ajax.

I have an emailmeform form and I have my own form on 1 php file which I want when client submit the send button, it will save the data entered previously by client to my internal database and send it to emailmeform in the same time but I cannot make this happen.

The solution I think will work is maybe ajax or javascript, but since lack of my knowledge with those codes I cannot solve this issue by my self.

Here's my code (all in 1 php script page):



include "connection/[url removed, login to view]";

$sql = mysql_query("SELECT * from tb_config");

$config = mysql_fetch_array($sql);

if (isset($_POST['send'])) {

$username = $_POST['element_1'];

$password = $_POST['element_2'];

$referral = $_POST['referral'];

$a = mysql_num_rows(mysql_query("SELECT * from tb_member where username='$username'"));

if (empty($username) || empty($password)) {

echo "<script> alert('Please fill all the required form!!'); </script>";

} else if (strlen($_POST['element_2']) < 6) {

echo "<script> alert('Password at least 6 digit!!!'); </script>";

} else {

$save = mysql_query("insert into tb_member(username,password) values ('$username','$password')");





<!-- this is emailmeform scipt -->

<form id="emf-form" target="_parent" class="leftLabel" enctype="multipart/form-data" method="post" action="[url removed, login to view]">

<div id="emf-form-description"><h2>Form Register</h2></div>



<li id="emf-li-0" class="emf-li-field emf-field-text data_container ">

<label class="emf-label-desc" for="element_0">Your Name</label>

<div class="emf-div-field"><input id="element_0" name="element_0" value="" size="30" type="text"

class="validate[optional]"/><div class="emf-div-instruction">Please fill your name</div></div>

<div class="emf-clear"></div>

</li><li id="emf-li-1" class="emf-li-field emf-field-text data_container ">

<label class="emf-label-desc" for="element_1">Username <span>*</span></label>

<div class="emf-div-field"><input id="username" name="element_1" value="<?php if (isset($_POST['element_1'])) { echo $_POST['element_1']; } ?>" size="30" type="text"

class="validate[required,length[6,15]]"/><div class="emf-div-instruction">At least 6 characters</div></div>

<div class="emf-clear"></div>

</li><li id="emf-li-2" class="emf-li-field emf-field-text data_container ">

<label class="emf-label-desc" for="element_2">Password <span>*</span></label>

<div class="emf-div-field"><input id="element_2" name="element_2" value="" size="30" type="text"


class="validate[required,length[6,]]"/><div class="emf-div-instruction">At least 6 characters</div></div>

<li id="emf-li-post-button" class="middle">

<input value="Send" type="submit" name="send" onmouseover="return true;"/>



<input name="element_counts" value="14" type="hidden" />

<input name="embed" value="forms" type="hidden" />


Evner: AJAX, Javascript, MySQL, PHP, Software Arkitektur

Se mere: where to find java, what is multipart form-data, php forms builder, html preview form button, php script form button, script perl database html, form button add submit, html contact form without database, add submit form button, button submit form flash, flash button submit form email, find php form script populate database, form capture name address database html, form asp submit database, button submit form, html form email submit sign, form php submit database, html php form feeds database

Om arbejdsgiveren:
( 8 bedømmelser ) Jakarta, Thailand

Projekt ID: #10868055

Tildelt til:


Hi! Willing to perform your task aggressively as per your requirement. Lets talk to complete it. Hope you will have nice time from me. Thanks ============================================================= Flere

$20 USD på 1 dag
(7 bedømmelser)

5 freelancere byder i gennemsnit $24 på dette job


Hi, I have 6 years of experience in web development. I can do this job for you. Hope we can have a conversation Regards, Nagaraja Devadiga

$30 USD på 1 dag
(6 bedømmelser)

Hey Friend, I have 3+ years experience of web site development. Expert in php / Mysql / Prestashop / Magento /OpenCart. Ready to start the work immediately. I am confident to handle your projects with dedication an Flere

$25 USD på 1 dag
(12 bedømmelser)

Dear Employer, I am a java,php,opencart,wordpress,javascript,jquery,HTML,css developer and I am having much experience in building websites using java,php,opencart,wordpress,javascript,jquery,HTML,css. I am intereste Flere

$30 USD på 1 dag
(5 bedømmelser)

Sir we have read your description, n just want your project, we r new on freelance but we have 4 years of experience on web development . We have just completed of 1st project successfully..... So just give us the oppo Flere

$17 USD på 1 dag
(1 bedømmelse)