pixeltrace
Members-
Posts
577 -
Joined
-
Last visited
Never
Everything posted by pixeltrace
-
its not working. this is the current code of my entire page <?php session_start(); ob_start(); include_once("FileUpload.php"); include_once("Functions.php"); //$dir = "D:/xampp/htdocs/test/data/"; $dir = "/home/museikne/www/misc/"; $active = false; $error = ""; $text = "List:<br>"; $subject = stripslashes($_POST['SUBJECT']); $header = isset($_POST['FROM']) ? stripslashes($_POST['FROM']) : "JobHiRings<postmaster@jobhirings.com>"; $url = isset($_POST['URL']) ? stripslashes($_POST['URL']) : ""; // Clear All if(isset($_POST['CANCEL'])){ unset($_SESSION['LIST']); unset($_SESSION['URL']); } // Clear URL Content if(isset($_POST['CLEARURL']))unset($_SESSION['URL']); if(isset($_POST['AMEND'])){ $_SESSION['URL'] = stripslashes($_POST['URLPREVIEW']); } // Get URL Content if(isset($_POST['GETURL'])){ if(trim($_POST['URL']) == ""){ $error = "Please fill in the url"; }else{ $file = fopen($_POST['URL'], "r") or exit("Invalid URL!"); //Output a line of the file until the end is reached while(!feof($file)) { $body .= fgets($file); //mail($email,"To $email", "Hi there!", "From: ncy@museik.net"); } fclose($file); //$body = str_replace("%name%", "chuyang", $body); $_SESSION['URL'] = $body; } } // Import name list if(isset($_POST['IMPORT'])){ $validFile = array("txt"); // valid file formats $file = $_FILES['FILE']; if($file['name'] != ''){ unset($_SESSION['LIST']); $fu = new FileUpload($file, $dir); $fu->CheckFileFormat($validFile); $fu->UploadFile(); $file = fopen($dir."list.txt", "r") or exit("Unable to open file!"); //Output a line of the file until the end is reached while(!feof($file)) { $email = fgets($file); $email = explode(",",$email); $_SESSION['LIST'][] = $email; //mail($email,"To $email", "Hi there!", "From: ncy@museik.net"); } fclose($file); }else{ unset($_SESSION['LIST']); $error = "Please locate the file"; } //header("Location:$PHP_SELF"); } if(isset($_SESSION['LIST'])){ $i = 1; foreach($_SESSION['LIST'] as $key=>$val){ $name = $val[0]; $email = $val[1]; $text.= "$i ."."$name - $email<br>"; $i++; } print $text; } if(isset($_POST['SEND'])){ if(trim($_POST['SUBJECT'] == ""))$error = "Please fill in a subject title"; if($error == ""){ require_once("includes/Mail.php"); $mail = new Mail(); $mail->SetHeader($header); if(isset($_SESSION['LIST'])){ $original_msg = $_SESSION['URL']; foreach($_SESSION['LIST'] as $key=>$val){ $new_msg = str_replace("%name%", $val[0], $original_msg); $mail->SendHTML($val[1],$subject,$new_msg); } session_destroy(); header("Location:$PHP_SELF"); } } } if($active){ $file = fopen("html.txt", "r") or exit("Unable to open file!"); //Output a line of the file until the end is reached while(!feof($file)) { $email .= fgets($file); //mail($email,"To $email", "Hi there!", "From: ncy@museik.net"); } fclose($file); $email = str_replace("\"", "\\\"", $email); print $email; print "END"; } //$bodytag = str_replace("'", "\'", $body); echo $error; ?> <form action="" method="post" enctype="multipart/form-data" name="form1"> <table border="0" cellspacing="0" cellpadding="3"> <tr> <td nowrap>Subject:</td> <td><input name="SUBJECT" type="text" id="SUBJECT" value="<?php print $subject;?>"></td> </tr> <tr> <td>From:</td> <td><input name="FROM" type="text" id="FROM" value="<?php print $header;?>"></td> </tr> <tr> <td>File:</td> <td><span class="text7"> <select name="to" class="textfield1"> <option selected="selected" value="all">Entire list</option> <option value="notall">Specialization</option> <option value="peremail">Individual Email</option> </select> <input name="select" type="submit" id="select" value="select" /> </span></td> </tr> <tr> <td> </td> <td><?php if(isset($_SESSION['to']) == "notall"){?> <select name="specialization"> <option value="" selected="selected">-- select specialization here --</option> <? $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ ?> <option value="<?= $uRow[specialization]?>"><?= $uRow[specialization]?></option> <? } } ?></select> <?php }?> <?php if(isset($_SESSION['to']) == "peremail"){?> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> <?php }?> </td> </tr> <tr> <td>URL:</td> <td><input name="URL" type="text" id="URL" value="<?php print $url;?>"></td> </tr> <tr> <td> </td> <td> <?php if(isset($_SESSION['URL'])){?> <textarea name="URLPREVIEW" cols="80" rows="10" id="URLPREVIEW"><?php print $_SESSION['URL']?></textarea> <br> <input name="CLEARURL" type="submit" id="CLEARURL" value="Clear"> <input name="AMEND" type="submit" id="AMEND" value="Amend"> <?php }?> <input name="GETURL" type="submit" id="GETURL" value="Get URL"> </td> </tr> <tr> <td> </td> <td><input name="SEND" type="submit" id="SEND" value="Send"> <input name="CANCEL" type="submit" id="CANCEL" value="Cancel"></td> </tr> </table> </form> <?php ob_end_flush();?>
-
will this work on all browsers?
-
i want the specialization list menu or email field to appear just right below the file drop down menu example, if i select individual email and i click select the page will refresh and the email field will appear just below the select menu notice in my code [code]<td><?php if(isset($_SESSION['to']) == "notall"){?> <select name="specialization"> <option value="" selected="selected">-- select specialization here --</option> <? $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ ?> <option value="<?= $uRow[specialization]?>"><?= $uRow[specialization]?></option> <? } } ?></select> <?php }?> <?php if(isset($_SESSION['to']) == "peremail"){?> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> <?php }?> </td> this is the condition that i want to happen but its not working hope you could help me with this. thanks![/code]
-
guys, i need help please check http://www.jobhirings.com/admean/email/blastsend2.php on the file area, that one is not working and i dont know what wrong with my scripts normally, what should happen there, if i select by specialization the specialization list menu will appear below and when i select individual email the email field will appear below too. below is the codes for this page <?php session_start(); ob_start(); include_once("FileUpload.php"); include_once("Functions.php"); //$dir = "D:/xampp/htdocs/test/data/"; $dir = "/home/museikne/www/misc/"; $active = false; $error = ""; $text = "List:<br>"; $subject = stripslashes($_POST['SUBJECT']); $header = isset($_POST['FROM']) ? stripslashes($_POST['FROM']) : "JobHiRings<postmaster@jobhirings.com>"; $url = isset($_POST['URL']) ? stripslashes($_POST['URL']) : ""; // Clear All if(isset($_POST['CANCEL'])){ unset($_SESSION['LIST']); unset($_SESSION['URL']); } // Clear URL Content if(isset($_POST['CLEARURL']))unset($_SESSION['URL']); if(isset($_POST['AMEND'])){ $_SESSION['URL'] = stripslashes($_POST['URLPREVIEW']); } // Get URL Content if(isset($_POST['GETURL'])){ if(trim($_POST['URL']) == ""){ $error = "Please fill in the url"; }else{ $file = fopen($_POST['URL'], "r") or exit("Invalid URL!"); //Output a line of the file until the end is reached while(!feof($file)) { $body .= fgets($file); //mail($email,"To $email", "Hi there!", "From: ncy@museik.net"); } fclose($file); //$body = str_replace("%name%", "chuyang", $body); $_SESSION['URL'] = $body; } } // Import name list if(isset($_POST['IMPORT'])){ $validFile = array("txt"); // valid file formats $file = $_FILES['FILE']; if($file['name'] != ''){ unset($_SESSION['LIST']); $fu = new FileUpload($file, $dir); $fu->CheckFileFormat($validFile); $fu->UploadFile(); $file = fopen($dir."list.txt", "r") or exit("Unable to open file!"); //Output a line of the file until the end is reached while(!feof($file)) { $email = fgets($file); $email = explode(",",$email); $_SESSION['LIST'][] = $email; //mail($email,"To $email", "Hi there!", "From: ncy@museik.net"); } fclose($file); }else{ unset($_SESSION['LIST']); $error = "Please locate the file"; } //header("Location:$PHP_SELF"); } if(isset($_SESSION['LIST'])){ $i = 1; foreach($_SESSION['LIST'] as $key=>$val){ $name = $val[0]; $email = $val[1]; $text.= "$i ."."$name - $email<br>"; $i++; } print $text; } if(isset($_POST['SEND'])){ if(trim($_POST['SUBJECT'] == ""))$error = "Please fill in a subject title"; if($error == ""){ require_once("includes/Mail.php"); $mail = new Mail(); $mail->SetHeader($header); if(isset($_SESSION['LIST'])){ $original_msg = $_SESSION['URL']; foreach($_SESSION['LIST'] as $key=>$val){ $new_msg = str_replace("%name%", $val[0], $original_msg); $mail->SendHTML($val[1],$subject,$new_msg); } session_destroy(); header("Location:$PHP_SELF"); } } } if($active){ $file = fopen("html.txt", "r") or exit("Unable to open file!"); //Output a line of the file until the end is reached while(!feof($file)) { $email .= fgets($file); //mail($email,"To $email", "Hi there!", "From: ncy@museik.net"); } fclose($file); $email = str_replace("\"", "\\\"", $email); print $email; print "END"; } //$bodytag = str_replace("'", "\'", $body); echo $error; ?> <form action="" method="post" enctype="multipart/form-data" name="form1"> <table border="0" cellspacing="0" cellpadding="3"> <tr> <td nowrap>Subject:</td> <td><input name="SUBJECT" type="text" id="SUBJECT" value="<?php print $subject;?>"></td> </tr> <tr> <td>From:</td> <td><input name="FROM" type="text" id="FROM" value="<?php print $header;?>"></td> </tr> <tr> <td>File:</td> <td><span class="text7"> <select name="to" class="textfield1"> <option selected="selected" value="all">Entire list</option> <option value="notall">Specialization</option> <option value="peremail">Individual Email</option> </select> <input name="select" type="submit" id="select" value="select" /> </span></td> </tr> <tr> <td> </td> <td><?php if(isset($_SESSION['to']) == "notall"){?> <select name="specialization"> <option value="" selected="selected">-- select specialization here --</option> <? $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ ?> <option value="<?= $uRow[specialization]?>"><?= $uRow[specialization]?></option> <? } } ?></select> <?php }?> <?php if(isset($_SESSION['to']) == "peremail"){?> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> <?php }?> </td> </tr> <tr> <td>URL:</td> <td><input name="URL" type="text" id="URL" value="<?php print $url;?>"></td> </tr> <tr> <td> </td> <td> <?php if(isset($_SESSION['URL'])){?> <textarea name="URLPREVIEW" cols="80" rows="10" id="URLPREVIEW"><?php print $_SESSION['URL']?></textarea> <br> <input name="CLEARURL" type="submit" id="CLEARURL" value="Clear"> <input name="AMEND" type="submit" id="AMEND" value="Amend"> <?php }?> <input name="GETURL" type="submit" id="GETURL" value="Get URL"> </td> </tr> <tr> <td> </td> <td><input name="SEND" type="submit" id="SEND" value="Send"> <input name="CANCEL" type="submit" id="CANCEL" value="Cancel"></td> </tr> </table> </form> <?php ob_end_flush();?> hope you could help me with this. thanks!
-
guys, i need help, i have a sendmail form that should send HTML pages to the email address that i specify i tested it first sending to individual emails and it worked. unfortunately, when you try to view the HTML page that you send first, the color is different, the text is also different and the links are not clickable. hope you could help me fix the problem. below is the code for my form page <?php include("db_connect.php"); ?> <table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="6" align="left"><img src="../images/spacer.gif" width="6" height="10" /></td> <td width="100%"><form method="post" action="emailalert.php?id=3"> <table width="216" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="214" valign="top"><table width="558" border="0" cellspacing="2" cellpadding="3"> <tr> <td colspan="3" valign="top"><img src="images/spacer.gif" width="10" height="1" /></td> </tr> <tr> <td colspan="3" bgcolor="#999999" class="text2">SEND EMAIL ALERTS </td> </tr> <tr> <td colspan="3" valign="top" class="text7"> </td> </tr> <tr> <td width="119" align="right" valign="top" class="text6">send by :</td> <td> </td> <td width="412" class="text7"> <select name="to" class="textfield1"> <option selected value="all">Entire list</option> <option value="notall">Specialization</option> <option value="peremail">Individual Email</option> </select> </select></td> </tr> <tr> <td align="right"><span class="text6">by specialization : </span></td> <td> </td> <td><select name="specialization"> <option value="" selected="selected">-- select specialization here --</option> <? $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ ?> <option value="<?= $uRow[specialization]?>"> <?= $uRow[specialization]?> </option> <? } } ?> </select></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if by specialization, please select one here </td> </tr> <tr> <td align="right"><span class="text6">per email :</span> </td> <td> </td> <td><span class="text7"> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> </span></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if per email, please input the email address here </td> </tr> <tr> <td align="right"><span class="text6">subject :</span></td> <td> </td> <td><span class="text7"> <input name="subject" type="text" class="textfield" maxlength=100 size=40> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td valign="top" class="text7"> </td> </tr> <tr> <td colspan="3" valign="top" class="text6"><hr></td> </tr> <tr> <td colspan="3" valign="top" class="text6">HTML BODY: copy & paste the HTML page here <span class="text7"></span> </td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><textarea id="elm1" name="message" rows="35" cols="80" style="width: 100%"></textarea></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><input type="submit" name="submit" value="send" class="textfield1" /> <input type=hidden value=http://www. name=redirect></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"> </td> </tr> </table></td> <td align="right" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table> </form></td> <td width="6" align="right"><img src="../images/spacer.gif" width="6" height="10" /></td> </tr> </table> and this is the code for my emailalert.php?id=3 <?php $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $peremail = $_POST['peremail']; $specialization = $_POST['specialization']; switch($to) { case "all": $x = 1; $hold = 50; // quantity of emails sent before 3 sec delay $emails = mysql_query("SELECT email FROM applicant WHERE subscribe = 'yes'"); while ($sendemail = mysql_fetch_array($emails)) { $email = $sendemail["email"]; mail($email, $subject, $message, "From:JobHiRings <posmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; case "notall": $byspecialization = mysql_query("SELECT email FROM applicant WHERE specialization = '$specialization' AND subscribe = 'yes'"); while ($countmail = mysql_fetch_array($byspecialization)) { $email = $countmail["email"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>" ); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; case "peremail": $replyto = "postmaster@jobhirings.com"; $returnpath = "postmaster@jobhirings.com"; $headers = "From:JobHiRings <postmaster@jobhirings.com>\r\n"; $headers .= "Reply-To: $replyto\r\n"; $headers .= "Return-Path: $returnpath\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $email = "$peremail"; $okemail = mail($email, $subject, $message,$headers); $x++; if(okemail) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; } ?> hope you could help me with this. thanks!
-
this is the code that MadTechie gave me <?php include("../db_connect.php"); if ( !isset($_POST['submit']) ) { ?> <table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="6" align="left"><img src="../images/spacer.gif" width="6" height="10" /></td> <td width="100%"><form method="post" action="<?=$_SERVER['PHP_SELF']?>"> <table width="216" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="214" valign="top"><table width="558" border="0" cellspacing="2" cellpadding="3"> <tr> <td colspan="3" valign="top"><img src="images/spacer.gif" width="10" height="1" /></td> </tr> <tr> <td colspan="3" bgcolor="#999999" class="text2">SEND EMAIL ALERTS </td> </tr> <tr> <td colspan="3" valign="top" class="text7"> </td> </tr> <tr> <td width="119" align="right" valign="top" class="text6">send by :</td> <td> </td> <td width="412" class="text7"> <select name="to" class="textfield1"> <option selected value="all">Entire list</option> <option value="notall">Specialization</option> <option value="peremail">Individual Email</option> </select> </select></td> </tr> <tr> <td align="right"><span class="text6">by specialization : </span></td> <td> </td> <td><select name="specialization" class="textfield1"> <option value="" selected="selected">-- select specialization here --</option> <?php $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult) { echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)) { echo "<option value='{$uRow[specialization]}'>/n"; echo "{$uRow[specialization]}/n"; echo "</option>/n"; } } ?> </select></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if by specialization, please select one here </td> </tr> <tr> <td align="right"><span class="text6">per email :</span> </td> <td> </td> <td><span class="text7"> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> </span></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if per email, please input the email address here </td> </tr> <tr> <td align="right"><span class="text6">subject :</span></td> <td> </td> <td><span class="text7"> <input name="subject" type="text" class="textfield" maxlength=100 size=40> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td valign="top" class="text7"> </td> </tr> <tr> <td colspan="3" valign="top" class="text6"><hr></td> </tr> <tr> <td colspan="3" valign="top" class="text6">HTML BODY: copy & paste the HTML page here <span class="text7"></span> </td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><textarea id="elm1" name="message" rows="35" cols="80" style="width: 100%"></textarea></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><input type="submit" name="submit" value="send" class="textfield1" /> <input type=hidden value=http://www. name=redirect></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"> </td> </tr> </table></td> <td align="right" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table> </form></td> <td width="6" align="right"><img src="../images/spacer.gif" width="6" height="10" /></td> </tr> </table> <?php }else{ $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $specialization = $_POST['specialization']; switch($to) { case "all": $x = 1; $hold = 50; // quantity of emails sent before 3 sec delay $emails = mysql_query("SELECT email FROM applicant WHERE subscribe = 'yes'"); while ($sendemail = mysql_fetch_array($emails)) { $email = $sendemail["email"]; mail($email, $subject, $message, "From:JobHiRings <posmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; case "notall": $byspecialization = mysql_query("SELECT email FROM applicant WHERE specialization = '$specialization' AND subscribe = 'yes'"); while ($countmail = mysql_fetch_array($byspecialization)) { $email = $countmail["email"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>" ); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; case "peremail": $email = $_POST["peremail"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>"); $x++; if(okemail) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; } } ?> and you can check the link here http://www.jobhirings.com/admean/email/blast.php hope you could help me with this. thanks!
-
oh, because i am also testing it. by the way, during your testing is the javascript message prompting?
-
hi, this is the link of my test page http://www.jobhirings.com/admean/email/blast.php thanks!
-
hi, i copy exactly the codes that you gave me but it still not working. also the javascript message is not prompting also. need help. thanks!
-
hi, i tried testing it for the individual email i still cant get my test mail and another thing, when sending, its not even prompting the javascript telling me that the email alert has been submitted. this is the current code that you gave me <?php include("db_connect.php"); if ( !isset($_POST['submit']) ) { ?> <table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="6" align="left"><img src="../images/spacer.gif" width="6" height="10" /></td> <td width="100%"><form method="post" action="<?=$_SERVER['PHP_SELF']?>"> <table width="216" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="214" valign="top"><table width="558" border="0" cellspacing="2" cellpadding="3"> <tr> <td colspan="3" valign="top"><img src="images/spacer.gif" width="10" height="1" /></td> </tr> <tr> <td colspan="3" bgcolor="#999999" class="text2">SEND EMAIL ALERTS </td> </tr> <tr> <td colspan="3" valign="top" class="text7"> </td> </tr> <tr> <td width="119" align="right" valign="top" class="text6">send by :</td> <td> </td> <td width="412" class="text7"> <select name="to" class="textfield1"> <option selected value="all">Entire list</option> <option value="notall">Specialization</option> <option value="peremail">Individual Email</option> </select> </select></td> </tr> <tr> <td align="right"><span class="text6">by specialization : </span></td> <td> </td> <td><select name="specialization" class="textfield1"> <option value="" selected="selected">-- select specialization here --</option> <?php $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)) { echo "<option value='{$uRow[specialization]}'>/n"; echo "{$uRow[specialization]}/n"; echo "</option>/n"; } } ?> </select></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if by specialization, please select one here </td> </tr> <tr> <td align="right"><span class="text6">per email :</span> </td> <td> </td> <td><span class="text7"> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> </span></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if per email, please input the email address here </td> </tr> <tr> <td align="right"><span class="text6">subject :</span></td> <td> </td> <td><span class="text7"> <input name="subject" type="text" class="textfield" maxlength=100 size=40> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td valign="top" class="text7"> </td> </tr> <tr> <td colspan="3" valign="top" class="text6"><hr></td> </tr> <tr> <td colspan="3" valign="top" class="text6">HTML BODY: copy & paste the HTML page here <span class="text7"></span> </td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><textarea id="elm1" name="message" rows="35" cols="80" style="width: 100%"></textarea></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><input type="submit" name="submit" value="send" class="textfield1" /> <input type=hidden value=http://www. name=redirect></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"> </td> </tr> </table></td> <td align="right" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table> </form></td> <td width="6" align="right"><img src="../images/spacer.gif" width="6" height="10" /></td> </tr> </table> <?php }else{ $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $specialization = $_POST['specialization']; switch($to) { case "all": $x = 1; $hold = 50; // quantity of emails sent before 3 sec delay $emails = mysql_query("SELECT email FROM applicant WHERE subscribe = 'yes'"); while ($sendemail = mysql_fetch_array($emails)) { $email = $sendemail["email"]; mail($email, $subject, $message, "From:JobHiRings <posmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; case "notall": $byspecialization = mysql_query("SELECT email FROM applicant WHERE specialization = '$specialization' AND subscribe = 'yes'"); while ($countmail = mysql_fetch_array($byspecialization)) { $email = $countmail["email"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>" ); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; case "peremail": $email = $_POST["peremail"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop break; } } ?> whatelse could be wrong here? thanks!
-
individual email
-
hi, its still not working. i tried sending it to my email and i wasnt able to get my test email what else do i need to do here? thanks!
-
can you help me sort it, since i honestly dont know how to do it, the codes where just given to me and the sender never came back to me again. thanks!
-
any help for this please? thanks!
-
hi, i dont see the errors now, but when i try sending an email here to my email address. i dont receive any emails hope you could help me fix the error below is my codes for this page <? include("db_connect.php"); if (!isset($_POST['submit'])): ?> <table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="6" align="left"><img src="../images/spacer.gif" width="6" height="10" /></td> <td width="100%"><form method="post" action="<?=$_SERVER['PHP_SELF']?>"> <table width="216" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="214" valign="top"><table width="558" border="0" cellspacing="2" cellpadding="3"> <tr> <td colspan="3" valign="top"><img src="images/spacer.gif" width="10" height="1" /></td> </tr> <tr> <td colspan="3" bgcolor="#999999" class="text2">SEND EMAIL ALERTS </td> </tr> <tr> <td colspan="3" valign="top" class="text7"> </td> </tr> <tr> <td width="119" align="right" valign="top" class="text6">send by :</td> <td> </td> <td width="412" class="text7"> <select name="to" class="textfield1"> <option selected value="all">Entire list</option> <option value="notall">Specialization</option> <option value="peremail">Individual Email</option> </select> </select></td> </tr> <tr> <td align="right"><span class="text6">by specialization : </span></td> <td> </td> <td><select name="specialization" class="textfield1"> <option value="" selected="selected">-- select specialization here --</option> <? $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ ?> <option value="<?= $uRow[specialization]?>"> <?= $uRow[specialization]?> </option> <? } } ?> </select></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if by specialization, please select one here </td> </tr> <tr> <td align="right"><span class="text6">per email :</span> </td> <td> </td> <td><span class="text7"> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> </span></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if per email, please input the email address here </td> </tr> <tr> <td align="right"><span class="text6">subject :</span></td> <td> </td> <td><span class="text7"> <input name="subject" type="text" class="textfield" maxlength=100 size=40> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td valign="top" class="text7"> </td> </tr> <tr> <td colspan="3" valign="top" class="text6"><hr></td> </tr> <tr> <td colspan="3" valign="top" class="text6">HTML BODY: copy & paste the HTML page here <span class="text7"></span> </td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><textarea id="elm1" name="message" rows="35" cols="80" style="width: 100%"></textarea></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><input type="submit" name="submit" value="send" class="textfield1" /> <input type=hidden value=http://www. name=redirect></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"> </td> </tr> </table></td> <td align="right" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table> </form></td> <td width="6" align="right"><img src="../images/spacer.gif" width="6" height="10" /></td> </tr> </table> <?php else: $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $specialization = $_POST['specialization']; if ("all" == $to) { $x = 1; $hold = 50; // quantity of emails sent before 3 sec delay $emails = mysql_query("SELECT email FROM applicant WHERE subscribe = 'yes'"); while ($sendemail = mysql_fetch_array($emails)) { $email = $sendemail["email"]; mail($email, $subject, $message, "From:JobHiRings <posmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop } elseif ("notall" == $to) { $byspecialization = mysql_query("SELECT email FROM applicant WHERE specialization = '$specialization' AND subscribe = 'yes'"); while ($countmail = mysql_fetch_array($byspecialization)) { $email = $countmail["email"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop } elseif ("peremail" == $to) { $email = $_POST["peremail"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop } ?> <?php endif; ?> thanks!
-
hi, its still not working. could you help me fix the error? thanks!
-
guys, i need help, i have a emailer sender form which is meant to send to either, indivual, per group or entire email list in my database. my problem now, its now working and i am getting some error messages which i cannot fix. the error message is Parse error: parse error, unexpected $end in c:\hosting\webhost4life\member\diorgrace\admean\email\blast.php on line 173 this is the code for my page <? session_start(); if (session_is_registered("username")){ include("../db_connect.php"); if (!isset($_POST['submit'])): ?> <table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="6" align="left"><img src="../images/spacer.gif" width="6" height="10" /></td> <td width="100%"><form method="post" action="<?=$_SERVER['PHP_SELF']?>"> <table width="216" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="214" valign="top"><table width="558" border="0" cellspacing="2" cellpadding="3"> <tr> <td colspan="3" valign="top"><img src="images/spacer.gif" width="10" height="1" /></td> </tr> <tr> <td colspan="3" bgcolor="#999999" class="text2">SEND EMAIL ALERTS </td> </tr> <tr> <td colspan="3" valign="top" class="text7"> </td> </tr> <tr> <td width="119" align="right" valign="top" class="text6">send by :</td> <td> </td> <td width="412" class="text7"> <select name="to"> <option selected value="all">Entire list</option> <option value="notall">Specialization</option> <option value="peremail">Individual Email</option> </select> </select></td> </tr> <tr> <td align="right"><span class="text6">by specialization : </span></td> <td> </td> <td><select name="specialization"> <option value="" selected="selected">-- select specialization here --</option> <? $uSql = "SELECT specialization FROM specialization"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ ?> <option value="<?= $uRow[specialization]?>"> <?= $uRow[specialization]?> </option> <? } } ?> </select></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if by specialization, please select one here </td> </tr> <tr> <td align="right">per email : </td> <td> </td> <td><span class="text7"> <input name="peremail" type="text" class="textfield" maxlength="100" size="40" /> </span></td> </tr> <tr> <td align="right"> </td> <td> </td> <td class="text7">*if per email, please input the email address here </td> </tr> <tr> <td align="right"><span class="text6">subject :</span></td> <td> </td> <td><span class="text7"> <input name="subject" type="text" class="textfield" maxlength=100 size=40> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td valign="top" class="text7"> </td> </tr> <tr> <td colspan="3" valign="top" class="text6"><hr></td> </tr> <tr> <td colspan="3" valign="top" class="text6">HTML BODY: copy & paste the HTML page here <span class="text7"></span> </td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><textarea id="elm1" name="message" rows="35" cols="80" style="width: 100%"></textarea></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"><input type="submit" name="submit" value="Add Candidate" class="textfield1" /> <input type=hidden value=http://www. name=redirect></td> </tr> <tr> <td colspan="3" align="center" valign="top" class="text6"> </td> </tr> </table></td> <td align="right" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table> </form></td> <td width="6" align="right"><img src="../images/spacer.gif" width="6" height="10" /></td> </tr> </table> <?php else: $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $specialization = $_POST['specialization']; if ("all" == $to) { $x = 1; $hold = 50; // quantity of emails sent before 3 sec delay $emails = mysql_query("SELECT email FROM applicant WHERE subscribe = 'yes'"); while ($sendemail = mysql_fetch_array($emails)) { $email = $sendemail["email"]; mail($email, $subject, $message, "From:JobHiRings <posmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop } elseif ("notall" == $to) { $byspecialization = mysql_query("SELECT email FROM applicant WHERE specialization = '$specialization' AND subscribe = 'yes'"); while ($countmail = mysql_fetch_array($byspecialization)) { $email = $countmail["email"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; } echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop } elseif ("peremail" == $to) { $email = $_POST["peremail"]; $okemail = mail($email, $subject, $message, "From:JobHiRings <postmaster@jobhirings.com>"); $x++; if($x == $hold) { // When $x is equal to $hold, a 3 sec delay will occur avoiding php to timeout sleep(3); $x = 0; echo '<script language=javascript> alert("Email alert has been submitted!");top.location = "emailalert.php?id=1";</script>'; } // end of while loop ?> <? }else{ echo "<font face=\"Arial\">You are not authorized to access this page ... Please <a href='../index.php'>Login</a></font>"; } ?> hope you could help me with this. thanks!
-
guys, i need help. i have a page where in it lists all job items on a table and each item has a checkbox so when i check one or more items when i click the post button it should display the job items on this post page. my problem is, my post page is not working. hope you could help me with this. this is the codes for my first page <?php session_start(); if (session_is_registered("username")){ include("pagina/my_pagina_class.php"); $cond = ''; if (isset($_GET['specialization'])) { if($_GET['specialization'] != ''){ $cond = " WHERE specialization = '". $_GET['specialization'] ."'"; } } if(isset($_GET['sort1']) && $_GET['sort1']!='') $sort1 = $_GET['sort1']; else $sort1 = "j_position"; if(isset($_GET['sort2']) && $_GET['sort2']!='') $sort2 = $_GET['sort2']; else $sort2 = "ASC"; $test = new JHpage; $test->sql = "SELECT * FROM job_ads ".$cond." ORDER BY ".$sort1 ." ".$sort2.""; //print_r($test); // the (basic) sql statement (use the SQL whatever you like) $result = $test->get_page_result(); // result set $num_rows = $test->get_page_num_rows(); // number of records in result set $nav_links = $test->navigation(" | ", "currentStyle"); // the navigation links (define a CSS class selector for the current link) $nav_info = $test->page_info(); // information about the number of records on page ("to" is the text between the number) $simple_nav_links = $test->back_forward_link(true); // the navigation with only the back and forward links, use true to use images $total_recs = $test->get_total_rows(); // the total number of records ?> <script type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //--> </script> <table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="../images/spacer.gif" width="6" height="10"></td> <td><table width="216" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td align="left" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1"></td> <td width="214" valign="top"> <table width="732" border="0" cellspacing="2" cellpadding="0"> <tr> <td colspan="6"><form method="get" action="emailalert.php?id=1"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="281"><span class="text6"> <?php echo " total record found: " .$total_recs; ?> </span></td> <td width="447" align="right" class="text6">sort by : <select name="sort1"> <option value="j_position">name</option> <option value="jobid">ID</option> <option value="date_posted">date</option> </select> <select name="specialization"> <? $spec = isset($_GET['specialization']) ? $_GET['specialization'] :$_POST['specialization']; ?> <option value="<? echo "$spec"; ?>" selected><? echo "$spec"; ?></option> <? $uSql = "SELECT specialization FROM specialization ORDER by sid ASC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; } else{ while($uRow = mysql_fetch_row($uResult)){ ?> <option value="<?= $uRow[0]?>"> <?= $uRow[0]?> </option> <? } } ?> </select> <select name="sort2"> <option value="ASC">ASC</option> <option value="DESC">DESC</option> </select> <input type="submit" name="Submit" value="Go" /> </td> </tr> </table> </form></td> </tr> <form action="email/viewpost.php" method="post" target="_blank"> <input type="hidden" value="<? echo "$username"; ?>" name="username" > <tr> <td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="60%" align="left" class="text8"> <input type="submit" name="Submit" value="post"></td> <td width="39%" align="right"><!-- nav top --> <? echo "<span class='link1'>".$nav_links."</span>"; ?> </td> </tr> </table></td> </tr> <tr> <td width="20" align="center" bgcolor="#83C2ED" class="text5"> </td> <td width="41" align="center" bgcolor="#83C2ED" class="text5">ID</td> <td width="324" align="center" valign="top" bgcolor="#83C2ED" class="text5">title</td> <td width="194" align="center" bgcolor="#83C2ED" class="text5">specialization</td> <td width="84" align="center" bgcolor="#83C2ED" class="text5">date posted </td> <td width="62" align="center" bgcolor="#83C2ED" class="text5">status</td> </tr> <?php for ($i = 0; $i < $num_rows; $i++) { $jobid = mysql_result($result, $i, "jobid"); $j_position = mysql_result($result, $i, "j_position"); $specialization = mysql_result($result, $i, "specialization"); $date_posted = mysql_result($result, $i, "date_posted"); $j_status = mysql_result($result, $i, "j_status"); ?> <tr> <td bgcolor="#FFFFCC" class="text8"><span class="text5"> <input type="checkbox" name="checkbox[]" value="<? echo"$jobid"; ?>" /> </span></td> <td bgcolor="#FFFFCC" class="text8">J<? echo ($jobid <= 9) ? $jobid : $jobid;?> </td> <td bgcolor="#FFFFCC"> <a href="javascript:;" class="link1" onClick="MM_openBrWindow('../jobsearch/jobpost.php?jobid=<? echo "$jobid"; ?>','','scrollbars=yes,width=720,height=700')"> <? echo "$j_position";?></a></td> <td align="center" bgcolor="#FFFFCC" class="text8"> <? echo "$specialization";?> </td> <td align="center" bgcolor="#FFFFCC" class="text8"> <? echo "$date_posted";?><br></td> <td align="center" bgcolor="#FFFFCC" class="text8"> <? echo "$j_status";?></td> </tr> <? } ?> <tr> <td colspan="6" bgcolor="#83C2ED"><img src="../images/spacer.gif" width="10" height="2" /></td> </tr> <tr> <td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="60%" align="left" class="text8"> </td> <td width="39%" align="right"><!-- nav top --> <? echo "<span class='link1'>".$nav_links."</span>"; ?> </td> <td width="1%" align="right"><img src="images/spacer.gif" width="12" height="10" /></td> </tr> </table></td> </tr> </form> <tr> <td colspan="6"> </td> </tr> </table> </td> <td align="right" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1"></td> </tr> </table></td> <td><img src="../images/spacer.gif" width="6" height="10"></td> </tr> </table> <? }else{ echo "<font face=\"Arial\">You are not authorized to access this page ... Please <a href='../index.php'>Login</a></font>"; } ?> and this is the code in my post page <form method="post" target="_blank" action="http://www.jobhirings.com/jobpost.php?id=2"><table width="516" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="516" align="right"> </td> </tr> <tr> <td class="text4">Dear <? echo " ".$fname." ".$lname." "; ?> </td> </tr> <tr> <td class="text4"> JobHiRings is glad to inform you that we have found job/s matching your job specialization. If the job/s listed below does/do not fit your job specialization, please click <a href="http://www.jobhirings.com/job/jobfinder.php" target="_blank" class="link1">here</a> to login and modify your JobHiRings account job specialization.</td> </tr> <tr> <td> </td> </tr> <tr> <td align="center"><table width="484" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="286" bgcolor="950101" class="text9"> Position</td> <td width="110" bgcolor="950101" class="text9"> Company</td> <td width="80" bgcolor="950101"> </td> </tr> <? include '../db_connect.php'; $jobid = $_POST['jobid']; $username = $_POST['username']; $checkb = $_POST['checkbox']; print_r($checkb); $query = mysql_query("SELECT jobid, j_position FROM job_ads WHERE jobid= '$checkb'") or die(mysql_error()); $row = mysql_fetch_array( $query ); $jobid = $row["jobid"]; $j_postion = $row["j_position"]; ?> <tr> <td bgcolor="#e5e5e5"><a href="http://www.jobhirings.com/jobpost.php?jobid=<? echo "$jobid"; ?>" class="link1"> <? echo "$j_position"; ?></a></td> <td bgcolor="#e5e5e5"><span class="text4"> JobHiRings</span></td> <td align="center" bgcolor="#e5e5e5"><a href="http://www.jobhirings.com/jobpost.php?id=2&jobid=<? echo "$jobid"; ?>"> <input name="Submit" type="submit" class="text4" value="apply now"> </a> </td> </tr> <tr> <td colspan="3" bgcolor="950101"><img src="http://www.jobhirings.com/images/main/spacer.gif" width="10" height="2" /></td> </tr> <tr> <td><a href="http://www.jobhirings.com/jobsearch/view.php" class="link1"> click here</a> <span class="text4">to view full list</span> </td> <td> </td> <td> </td> </tr> <tr> <td> <span class="text4"><a href="http://www.jobhirings.com/job/jobfinder.php?id=2" class="link1">Register</a> or <a href="http://www.jobhirings.com/job/jobfinder.php?id=1" class="link1">update</a> your resume now </span></td> <td> </td> <td> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td><hr></td> </tr> <tr> <td class="text6"> </td> </tr> <tr> <td align="center"><p class="text10">You received this job alert as part of your registration with JobHiRings. If you do not want to receive any job alert us, please email us at <a href="mailto:postmaster@jobhirings.com?subject=Unsubscribe+Job+Emal+Alert" target="_blank" class="link2">postmaster@jobhirings.com</a> to unsubscribe. </p></td> </tr> </table> </form> hope you could help me with this. thanks!
-
lets just change my question. i need to create form that will submit HTML page to email addresses. how do i do this? so far, the only form that i have done is to send plain text only but i haven't tried sending html pages. hope you could help me with this. thanks!
-
guys, i want to create a newsletter or emailer form sender. and that form has a text area. can be an ordinary text area or can also be tinymce. i want to have the text area in such a way that an HTML page can be pasted in the text area (let say the html page is jobpost.html) and send it to the email address that i specified. is this possible? need help on this please. thanks!
-
guys, i need help, before my registration form is working in such a way when after registering you will automatically be directed to your profile page. know, what i did is i just added a validation page for picking up errors on the page and after that, the auto-direct is no longer working. this is my process i have a registration form, after filling up the form and everything is correct and valid you will know be directed to your profile page. below is the codes for my registration form <form action="registrationsend.php" method="post"> <table width="216" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="left" bgcolor="#B30110" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> <td width="214" valign="top"><table width="530" border="0" cellspacing="2" cellpadding="3"> <tr> <td colspan="4" valign="top"><img src="../images/main/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="4" bgcolor="#999999" class="text9">PERSONAL INFORMATION </td> </tr> <tr> <td colspan="4" valign="top"><img src="../images/main/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td width="159" align="right" valign="top" class="text6"><span class="text3">*</span>Email :</td> <td> </td> <td width="340" colspan="2" class="text8"><input type="text" name="email1" class="field3"> this will be your Login ID</td> </tr> <tr> <td align="right" valign="top" class="text6"><span class="text3">*</span>re-type Email : </td> <td width="5" rowspan="2"> </td> <td colspan="2"><span class="text7"> <input type="text" name="email2" class="field3"> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"><span class="text3">*</span>Password : </td> <td colspan="2"><span class="text8"> <input type="password" name="password1" class="field3"> 6 to 60 characters</span></td> </tr> <tr> <td align="right" valign="top" class="text6"><span class="text3">*</span>re-type Password : </td> <td> </td> <td colspan="2"><span class="text7"> <input type="password" name="password2" class="field3"> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"><span class="text3">*</span>First Name : </td> <td> </td> <td colspan="2"><span class="text7"> <input type="text" name="fname" class="field3"> </span></td> </tr> <tr> <td align="right" valign="top" class="text6"><span class="text3">*</span>Last Name : </td> <td> </td> <td colspan="2"><span class="text7"> <input type="text" name="lname" class="field3"> </span></td> </tr> <tr> <td align="right"><span class="text6">Date of Birth : </span></td> <td> </td> <td colspan="2"><span class="text7"> <select name="daybirth" class="field3"> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> <option value='6'>6</option> <option value='7'>7</option> <option value='8'>8</option> <option value='9'>9</option> <option value='10'>10</option> <option value='11'>11</option> <option value='12'>12</option> <option value='13'>13</option> <option value='14'>14</option> <option value='15'>15</option> <option value='16'>16</option> <option value='17'>17</option> <option value='18'>18</option> <option value='19'>19</option> <option value='20'>20</option> <option value='21'>21</option> <option value='22'>22</option> <option value='23'>23</option> <option value='24'>24</option> <option value='25'>25</option> <option value='26'>26</option> <option value='27'>27</option> <option value='28'>28</option> <option value='29'>29</option> <option value='30'>30</option> <option value='31'>31</option> </select> <select name="monthbirth" class="field3"> <option value='1'>Jan</option> <option value='2'>Feb</option> <option value='3'>Mar</option> <option value='4'>Apr</option> <option value='5'>May</option> <option value='6'>Jun</option> <option value='7'>Jul</option> <option value='8'>Aug</option> <option value='9'>Sep</option> <option value='10'>Oct</option> <option value='11'>Nov</option> <option value='12'>Dec</option> </select> <input name="yearbirth" type="text" size="8" class="field3"> (YYYY) </span></td> </tr> <tr> <td align="right" valign="top" class="text6">Gender : </td> <td> </td> <td colspan="2" class="text7"><input name="gender" type="radio" value="Male" /> Male <input name="gender" type="radio" value="Female" /> Female </td> </tr> <tr> <td align="right" valign="top" class="text6"><span class="text3">*</span>Contact number : </td> <td> </td> <td colspan="2" class="text7"><input type="text" name="contact" class="field3"> <span class="text3">* include area code & country code</span> </td> </tr> <tr> <td align="right" class="text6">Country of Residence : </td> <td> </td> <td colspan="2"><select name="country" class="field3"> <option value="Afghanistan">Afghanistan</option> <option value="Albania">Albania</option> <option value="Algeria">Algeria</option> </select></td> </tr> <tr> <td align="right" valign="top" class="text6">State/ Region : </td> <td> </td> <td colspan="2"><span class="text7"> <input type="text" name="state" class="field3"> </span></td> </tr> <tr> <td colspan="4" bgcolor="#999999" class="text9">CAREER PREFERENCES / INFORMATION </td> </tr> <tr> <td colspan="4" valign="top"><img src="../images/main/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td colspan="2" valign="top" class="text6"><span class="text3">*</span>Select your preferred Job Specialization<br> <span class="text3">you can select up to 10 preferred specialization</span> </td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td colspan="2" valign="top" class="text6"><select name="specialization[]" size="8" class="field3" multiple> <? include 'db_connect.php'; $uSql = "SELECT specialization FROM specialization ORDER by sid ASC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; } else{ while($uRow = mysql_fetch_row($uResult)){ ?> <option value="<?= $uRow[0]?>"> <?= $uRow[0]?> </option> <? } } ?> </select> </td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td align="right" valign="top" class="text6"> </td> <td colspan="2" valign="top" class="text3">* press CTRL then click on the items you wish to select </td> </tr> <tr> <td align="right" valign="top" class="text6">Experience Level :</td> <td align="right" valign="top" class="text6"> </td> <td colspan="2" valign="top" class="text7"><select name="level" class="field3"> <option value=""></option> <?php $uSql = "SELECT level FROM level"; $uResult = mysql_query($uSql, $connection); while($uRow = mysql_fetch_array($uResult)){ echo "<option value=\"". $uRow['level'] ."\">". $uRow['level'] ."\n"; } ?> </select></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td> </td> <td colspan="2"> </td> </tr> <!--<tr> <td align="right" valign="top" class="text6">Text Resume : </td> <td colspan="2">*Please copy and paste your <strong>FULL</strong> resume below.</td> </tr> <tr> <td colspan="3" valign="top" class="text6"><textarea name="textarea" cols="85" rows="20"></textarea></td> </tr>--> <tr> <td colspan="4" valign="top" class="text6"><hr></td> </tr> <tr> <td colspan="4" valign="top" class="text6">I learned about JobHiRings from : <span class="text7"> <input type="text" name="learned" class="field3"> </span></td> </tr> <tr> <td colspan="4" valign="top" class="text6"><hr></td> </tr> <tr> <td colspan="4" align="center" valign="top" class="text6"><input type="submit" name="Submit" value="Register" class="textfield1" /> <input type="hidden" name="sender" value="postmaster@jobhirings.com" /> <input type="hidden" name="accounttype" value="applicant" /> <input type=hidden value=http://www. name=redirect></td> </tr> <tr> <td align="right" valign="top" class="text6"> </td> <td> </td> <td colspan="2"> </td> </tr> </table></td> <td align="right" bgcolor="#B30110" width="1"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#B30110"><img src="images/spacer.gif" width="1" height="1" /></td> </tr> </table> </form> this is the code for my registrationsend.php <? include '../admean/db_connect.php'; include("validate.php"); $email1 = $_POST['email1']; $email2 = $_POST['email2']; $password1 = $_POST['password1']; $password2 = $_POST['password2']; $fname = $_POST['fname']; $lname = $_POST['lname']; $daybirth = $_POST['daybirth']; $monthbirth = $_POST['monthbirth']; $yearbirth = $_POST['yearbirth']; $gender = $_POST['gender']; $contact = $_POST['contact']; $country = $_POST['country']; $state = $_POST['state']; $specialization = implode("\n", $_POST['specialization']); $level = $_POST['level']; $sender = $_POST['sender']; $accounttype = $_POST['accounttype']; //$photofile = $_POST['photofile']; //$resume = $_POST['resume']; $learned = $_POST['learned']; $dateregistered = date('Y-m-d'); // 0000-00-00 $datebirth = $yearbirth.'-'.$monthbirth.'-'.$daybirth; if ($email1=='' or $email2=='' or $password1=='' or $password2=='' or $fname=='' or $lname=='' or $contact=='') { error ('Kindly fill in the fields with (*).\\n'.'Thank you!'); } if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email1)){ error("Invalid e-mail address"); } //email verification 1 if ($email1 == $email2){ $email = $email1; $username = $email1; }else { error ('Email Address does not match!'); } //email verification 2 $sql_username_check = mysql_query("SELECT username FROM applicant WHERE email='$email'"); $username_check = mysql_num_rows($sql_username_check); if($username_check > 0){ error ('Email Address already in use!'); } //password verification if ($password1 == $password2){ $password = ($password1); }else { error ('Password does not match!'); } $email = stripslashes($email); $username = stripslashes($username); $password = stripslashes($password); $fname = stripslashes($fname); $lname = stripslashes($lname); $datebirth = stripslashes($datebirth); $gender = stripslashes($gender); $contact = stripslashes($contact); $country = stripslashes($country); $state = stripslashes($state); $specialization = stripslashes($specialization); $level = stripslashes($level); $accounttype = stripslashes($accounttype); //$photofile = stripslashes($photofile); //$resume = stripslashes($resume); $learned = stripslashes($learned); $dateregistered = stripslashes($dateregistered); $db_password = md5($password); $special = $_POST['specialization']; foreach($special as $key=>$val){ //print "$key".$val; $sql="UPDATE specialization SET hits = hits + 1 WHERE specialization LIKE '%". $val ."%'"; mysql_query($sql) or die("error:".mysql_error()); } $sql = mysql_query("INSERT INTO applicant (email, username, password, account_type, fname, lname, datebirth, gender, contact, country, state, specialization, level, learned, dateregistered ) VALUES('$email', '$username', '$db_password', '$accounttype', '$fname', '$lname', '$datebirth', '$gender', '$contact', '$country', '$state', '$specialization', '$level', '$learned', '$dateregistered')") or die (mysql_error()); if(!$sql){ error ('Error adding your account. Please try again!'); } else { $appid = mysql_insert_id(); echo '<script language=javascript> alert("Thank you for registering!");top.location = "../accounts/profile.php?id=1&username='.$username.'";</script>'; } // -- send registrant email copy $Message = ""; $Message .= "Hello $name\n"; $Message .= "Thank you for signing up at JobHirings\n"; $Message .= "\n\n"; $Message .= "Below is a copy of your account details\n"; $Message .= "-------------------------\n"; $Message .= "Email ID: $email\n"; $Message .= "Password: $password\n"; $Message .= "-------------------------\n"; $Message .= "\n\n"; $Message .= "Please make sure to visit our website to check\n"; $Message .= "fresh new job vaccancy that's just meant for you\n"; $Message .= "Again, thank and good luck to your career\n"; $Message .= "\n\n"; $Header = $sender; $To = "$email"; $Subject = "Thank you for signing up at JobHiRings"; // mail($To,$Subject,$Message,"From: $Header","-f $EmailAdd"); last parameter might not be supported mail($To,$Subject,$Message,"From: $Header"); ?> and this is the code for my profile page <?php session_start(); if (session_is_registered("username")){ $username = $_SESSION['username']; include '../admean/db_connect.php'; $query = mysql_query("SELECT appid, fname, lname FROM applicant WHERE username= '$username'") or die(mysql_error()); $row = mysql_fetch_array( $query ); $fname = $row["fname"]; $lname = $row["lname"]; $appid = $row["appid"]; if (!isset($id)) { $id='1';} ?> some text table and text here <? }else{ echo "<font face=\"Arial\">You are not authorized to access this page ... Please <a href='../index.php'>Login</a></font>"; } ?> hope you could hglp me with this. Thanks!
-
thanks! everything is in order now!
-
guys, can you help me with my drop down menu for year selectin my in my current codes its displays the year from 2001 to 2007 now what i wanted to happen is it will display the year from 2007 to 2001 this is my current code which displays the year from 2001 to 2007 hope you could help me with this. <?php for($i=2001; $i<=date("Y"); $i++){ print '<option value="'.$i.'"'; if($yearText == $i){ print ' selected'; } print '>'.$i.'</option>'; } ?> thanks!
-
guys, is there a way that we can disable the <ENTER> key for the submit button? because i have a form and all fields should be filled up. but what happens is if the person filling up the form accidentally hit the <ENTER> key the form will be submitted eventhough he/she hasnt completed the form yet. how should i fix this? thanks!
-
guys, do you happen to know a ready scripts for newsletter sending and can be send to several number of emails taken from the database? hope you could help me with this. thanks!