<?php
require_once('config/config.php');
require_once(CLASS_DIR.'dbClass.php');

$obj = new DBClass();

$rq = mysql_fetch_array(mysql_query("select * from coal_listing where id = '".$_GET['id']."'"));

$name	=	$_GET['name'];
$email	= 	$_GET['email'];
$phone	=	$_GET['phone'];
$sendto	=	$rq['email1'];

require_once('enqmail.php');

		
		mysql_query("insert into enq (name,phone,email,listingID,memberID) values ('".$_GET['name']."','".$_GET['phone']."','".$_GET['email']."','".$_GET['id']."','".$rq['memberID']."')");
		echo 'Success!';		
		
?>