Computing.Net > Forums > Web Development > (PHP) Form sending e-mail

(PHP) Form sending e-mail

Reply to Message Icon

Original Message
Name: masterj
Date: July 2, 2008 at 00:05:06 Pacific
Subject: (PHP) Form sending e-mail
OS: Windows Vista
CPU/Ram: 4096
Model/Manufacturer: x64
Comment:

Hey there :)
I'm trying to figure out what the heck happened...
Let's say I have an array of user_id that I need send e-mail to. I programmed button:
echo "<form method='post'>";
echo "<input type='submit' value='Perspėti narius' name='mailsender' class='button'></p>";
echo "</form>";

and here's actual function:

if (isset($_POST['mailsender'])){
require_once BASEDIR."includes/sendmail_include.php";
$pavadinimas = "VWKLUBAS.LT anketų automatinis BOT'as įspėja (".date("Y.m.d H:i").")";
$laiskas = "Sveiki,\n\n siunčiu Jums informacinį laišką dėl Jūsų pateiktos klubo anketos. Radau neatitikimų, kuriuos galite pažiūrėti adresu http://vwklubas.lt/viewpage.php?pag... Privalote juos ištaisyti iki artimiausio anketų audito. Jeigu Jūsų anketa teisinga ir lankotės klube reguliariai, praneškite klubo superadminui masterj apie BOT'o aptikimo klaidą!\n\n\nAtminkite šitas laiškas yra AUTOMATIZUOTAS.\n\nvwklubas.lt BOTAS";
foreach ($bloginariai as $bl) {
$datag = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$bl'"));
sendemail($datag['user_aim'], $datag['user_email'], "www.vwklubas.lt", "mjguscius@yahoo.com", $pavadinimas, $laiskas, $type="html");
}
unset($bl);
fallback(FUSION_SELF.$aidlink);
}


Problem is that after I press the button, function sends e-mail to everyone in array as supposed to but browser never shows me that page have reloaded : (fallback(FUSION_SELF.$aidlink);) it just keeps loading page with no activity, for example Firefox shows "Loading..." on tab of my web site. I suspect that problem lies in form or button


Report Offensive Message For Removal


Response Number 1
Name: neodare
Date: July 17, 2008 at 00:40:38 Pacific
Reply: (edit)

just set the form action to the page and check ...


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: (PHP) Form sending e-mail

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge