Jump to content

Mail Looping


ipwnzphp

Recommended Posts

$keyword = mysql_query("SELECT * FROM `sl_keywords` WHERE c_id = '$id'");
while ($keywords = mysql_fetch_array($keyword)) {

$key = $keywords['keyword'];

$find = strpos($Desc, $key);

if ($find == true) {
$service = mysql_query("SELECT * FROM sl_services WHERE service = '$key' && c_id = '$id'");
$num = mysql_num_rows($service);
$services = mysql_fetch_array($service);

$service = $services['service'];
$price = $services['price'];
$hours = $services['hours'];
$option = $services['option'];

$Name = "$_POST[name]";
$Email = "$_POST[email]";
$Phone = "$_POST[phone]";
$Budget = "$_POST[budget]";
$Site = "$_POST[site]";
$Work = "$_POST[work]";
$Desc = "$_POST[desc]";
$Im_client = "$_POST[im_client]";

$message = "$company Free Quote System Form" . "\n\n";
$message .= 'Name: ' . $Name . "\n";
$message .= 'Email: ' . $Email . "\n";
$message .= 'Phone: ' . $Phone . "\n";
$message .= 'Project Budget: ' . $Budget . "\n";
$message .= 'Current Site: ' . $Site . "\n";
$message .= 'Type Of Work: ' . $Work . "\n";
$message .= 'Project Desc: ' . $Desc . "\n";
$message .= 'IM Client: ' . $Im_client . "\n\n";

if ($num) {
mail($email, "$company - New Quote Request", $message, "From: $Name");
}

}
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.