PHP - Avoid Duplicated Mails On Browser Refresh
Hello, guys. I'm using the following code to send me an automated mail in case the user find a broken link. But there are 2 problems: 1) after submitting I'd rather not disrupt their game by refreshing the page. So, is there any way to send mail without the post refreshing? 2) if the user hits F5, the page reloads and the code runs again, sending two or more times the same email. How can I avoid duplicated emails caused by manual browser refresh?
(the most important solution currently is how to to avoid duplicated entries, in case an ajax solution is too hard to post here.) <form name="fbrlink" action="<?= $_SERVER['PHP_SELF']."?page=ok" ?>" method="post"> <?php echo('<input name="sbrlink" id="B1" type="button" value="broken Link?" style="border:none; background-color:#FFFFFF; font-family:Trebuchet MS; font-size:15px; font-weight:bold; color:#1A4877; cursor:pointer; display:block; text-decoration:underline;" onclick="this.form.submit();"/>'); ?> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['QUERY_STRING'] == 'page=ok') { echo '<script type="text/javascript" >confirm("Click OK to notify us.");</script>'; mail("contact@ctt.net","report broken link","Game notified:MarioBros"); echo '<script type="text/javascript" >document.fbrlink.sbrlink.disabled = true;</script>'; ?> <script type="text/javascript" >document.fbrlink.action='<?php echo $a; ?>'; alert('<?php $_SERVER['QUERY_STRING'];?>'); </script> <?php } else {} }else{ } ?> Similar TutorialsWhen I submitted my Form & refresh then browser resend all data again into database, So anybody know any solution of this to avoid data resend after refreshing browser.. Ok first of all i have this code at the final of my insert and update code.
if (!mysql_query($sql,$conn)) { die('Error: ' . mysql_error($conn)); } else{ header("Location: finalmsj.php?finalmsj=".$hiwu.""); } mysql_close($conn); } Hello All,
I've encountered one more problem (with the first WebApp I'm building), and I have no idea how to fix it. I've tried something, but it doesn't seem to work, so I'd appreciate some help in getting it fixed.
Here's what's happening:
So after I perform an operation (let's say "ADDing a record")...the records gets added correctly, but then, if/when I press [F5] in my browser window (or click on the Refresh/Reload icon), the same input details are being used and a second identical record is being added. I believe the same thing happens for some (or perhaps all) of the other CRUD operations.
What do I need to do to disable that behavior?
The only thing I could think of is to set the $functionSelected variable to blank ("") - which I've done towards the bottom of my code (shown below) - but that doesn't seem to be doing anything...the problem persists.
if(isset($_POST['action'])) { $functionSelected = $_POST["action"]; } if(isset($functionSelected)){ switch($functionSelected){ case "insert": $initialize_flag = "N"; // Store POST(ed) user-entered values into memory variables $store_name = $_POST['store_name']; $item_description = $_POST['item_description']; $qty_pkg = $_POST['qty_pkg']; $pkg_of = $_POST['pkg_of']; $price = $_POST['price']; $flyer_page = $_POST['flyer_page']; $limited_time_sale = $_POST['limited_time_sale']; $flyer_date_start = $_POST['flyer_date_start']; $nos_to_purchase = $_POST['nos_to_purchase']; // Setup customized query $sql = "INSERT INTO shoplist (store_name, item_description, qty_pkg, pkg_of, price, flyer_page, limited_time_sale, flyer_date_start, nos_to_purchase, shopper1_buy_flag, shopper2_buy_flag, purchased_flag, purchase_later_flag) VALUES (:store_name, :item_description, :qty_pkg, :pkg_of, :price, :flyer_page, :limited_time_sale, :flyer_date_start, :nos_to_purchase, :shopper1_buy_flag, :shopper2_buy_flag, :purchased_flag, :purchase_later_flag)"; try { $statement = $conn->prepare($sql); $statement->bindParam(':store_name', $store_name); $statement->bindParam(':item_description', $item_description); $statement->bindParam(':qty_pkg', $qty_pkg); $statement->bindParam(':pkg_of', $pkg_of); $statement->bindParam(':price', $price); $statement->bindParam(':flyer_page', $flyer_page); $statement->bindParam(':limited_time_sale', $limited_time_sale); $statement->bindParam(':flyer_date_start', $flyer_date_start); $statement->bindParam(':nos_to_purchase', $nos_to_purchase); $statement->bindParam(':shopper1_buy_flag', $initialize_flag); $statement->bindParam(':shopper2_buy_flag', $initialize_flag); $statement->bindParam(':purchased_flag', $initialize_flag); $statement->bindParam(':purchase_later_flag', $initialize_flag); // Execute the query $statement->execute(); $statement->closeCursor(); $functionSelected = ""; // WILL THIS STATEMENT NOT SERVE TO INITIALIZE/RESET THE OPERATION??? break; } catch (PDOException $e) { print "Error!: " . $e->getMessage() . "<br/>"; } case "update-delete": ... ... ...Thanks. Hello, I'm trying to code a private message system and got stuck (yup, again) on this part: At the page where the messages are read, I'd like to display all the messages where the same sender and the receiver participate, like this: Code: [Select] SELECT * FROM messages WHERE sender = 1 AND receiver = 2 OR sender = 2 AND receiver = 1 ORDER BY date LIMIT 0,10; Is there anyway to do something like that? Thank you. (Again, sorry for the weird Subject, I gave my best) Hello. I have here a php code getting information from mysql but when printing the result is duplicated, or more. Code: [Select] <?php $query = "SELECT SUM(amount) FROM user_detail"; $result = mysql_query($query) or die(mysql_error()); // Print out result while($row = mysql_fetch_array($result)){ echo "<p align=\"left\">Total ".$row['SUM(amount)']."</p>"; } ?> and then I get result like this: you can see there are 3 result and I need to print only one time. I use for sql connection other file with : include_once("./includes/config.php"); Need help to solve this Thanks in advance Hi guys, I am currently stuck in a situation. I have duplicated names in my form. View duplicated.jpg for a reference. What exactly went wrong? Any help will be greatly appreciate! How do I eliminate the duplicated names. Thanks!! And my $count is currently not working as well, it is supposed to be 5 columns per row. Code: [Select] <?php /***Pre-School Level***/ echo '<input name="level[]" type="checkbox" id="level_1" value="1">'; echo '<span class="zone_text_enlarge"><label for="level_1">Pre-School</label></span><br/>'; $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die(mysqli_error($dbc)); $query = "SELECT sl.subject_level_id, sl.level_id, sl.subject_id, tl.level_name AS level_name, ts.subject_name AS subject_name " . "FROM tutor_subject_level AS sl " . "INNER JOIN tutor_level AS tl USING (level_id) " . "INNER JOIN tutor_subject AS ts USING (subject_id) " . "ORDER BY subject_level_id ASC LIMIT 7"; $sql = mysqli_query($dbc, $query) or die(mysqli_error($dbc)); $query1 = "SELECT subject_level_id FROM tutor_overall_level_subject WHERE tutor_id = '" . $_GET['tutor_id'] . "'"; $sql1 = mysqli_query($dbc, $query1) or die(mysqli_error($dbc)); $selected_subjects = array(); while ($row = mysqli_fetch_array($sql1)) { array_push($selected_subjects, $row['subject_level_id']); } echo'<table><tr>'; // Start your table outside the loop... and your first row $count = 0; // Start your counter while($data = mysqli_fetch_array($sql)) { /* Check to see whether or not this is a *new* row If it is, then end the previous and start the next and restart the counter. */ if ($count % 5 == 0) { echo "</tr><tr>"; $count = 0; } foreach($selected_subjects as $selected_subject) { if ($data['subject_level_id'] == $selected_subject) { echo '<td><input name="subject_level[]" class="subject_a" type="checkbox" checked="checked" id="subject_level_'.$data['subject_level_id'].'" value="'.$data['subject_level_id'].'"/>'; echo '<label for="subject_level_'.$data['subject_level_id'].'" class="subject_1">'.$data['subject_name'].'</label></td>'; $count++; //Increment the count } else { echo '<td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_'.$data['subject_level_id'].'" value="'.$data['subject_level_id'].'"/>'; echo '<label for="subject_level_'.$data['subject_level_id'].'" class="subject_1">'.$data['subject_name'].'</label></td>'; $count++; //Increment the count } } } echo '</tr></table><br/>'; //Close your last row and your table, outside the loop ?> This is the end result of the HTML code, through 'view page source' in web browser Code: [Select] <input name="level[]" type="checkbox" id="level_1" value="1"> <span class="zone_text_enlarge"><label for="level_1">Pre-School</label></span><br/> <table><tr></tr> <tr> <td><input name="subject_level[]" class="subject_a" type="checkbox" checked="checked" id="subject_level_1" value="1"/> <label for="subject_level_1" class="subject_1">Mathematics</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_1" value="1"/> <label for="subject_level_1" class="subject_1">Mathematics</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_2" value="2"/> <label for="subject_level_2" class="subject_1">English</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_2" value="2"/> <label for="subject_level_2" class="subject_1">English</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_3" value="3"/> <label for="subject_level_3" class="subject_1">Chinese</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_3" value="3"/> <label for="subject_level_3" class="subject_1">Chinese</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_4" value="4"/> <label for="subject_level_4" class="subject_1">Tamil</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_4" value="4"/> <label for="subject_level_4" class="subject_1">Tamil</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_5" value="5"/> <label for="subject_level_5" class="subject_1">Malay</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_5" value="5"/> <label for="subject_level_5" class="subject_1">Malay</label></td> </tr> <tr> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_6" value="6"/> <label for="subject_level_6" class="subject_1">Phonics</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" checked="checked" id="subject_level_6" value="6"/> <label for="subject_level_6" class="subject_1">Phonics</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_7" value="7"/> <label for="subject_level_7" class="subject_1">Creative Writing</label></td> <td><input name="subject_level[]" class="subject_a" type="checkbox" id="subject_level_7" value="7"/> <label for="subject_level_7" class="subject_1">Creative Writing</label></td></tr> </table><br/> Hi, Right when a form is submit the data in the form is added to the database basically I need to know how I can check one of the inputs to see if 'http://' has been add along with an URL, if it has not I need to add it in front of the string. How can this be done? Regards Lee Hi, I have a question. Currently, when I retrieve the records in my zone 'North', there is no misalignment. However when I tried to copy the same coding to make up zone 'West', the alignment went off? May I know what is the reason? Any advice to align it properly. Attached is the picture of my example <div id ="location"> <input name="zone[]" type="checkbox" id="1" value="1"> <label for="1">North</label><br /> <?php $dbc = mysqli_connect('localhost', 'aliendatabase', '1234567', 'aliendatabase') or die(mysqli_error()); $query = ("SELECT * FROM tutor_preferred_district ORDER BY district_id ASC"); $sql = mysqli_query($dbc, $query) or die(mysqli_error()); echo'<table><tr>'; // Start your table outside the loop... and your first row $count = 0; // Start your counter while($data = mysqli_fetch_array($sql)) { /* Check to see whether or not this is a *new* row If it is, then end the previous and start the next and restart the counter. */ if ($count % 3 == 0) { echo "</tr><tr>"; $count = 0; } echo '<td><input name="district[]" type="checkbox" id="'.$data['district_id'].'" value="'.$data['district_id'].'">'; echo '<label for="'.$data['district_id'].'">'.$data['district_name'].'</label></td>'; $count++; //Increment the count } echo '</tr></table><br />'; //Close your last row and your table, outside the loop ?> <input name="zone[]" type="checkbox" id="2" value="2"> <label for="2">West</label><br /> <?php $dbc = mysqli_connect('localhost', 'aliendatabase', '1234567', 'aliendatabase') or die(mysqli_error()); $query = ("SELECT * FROM tutor_preferred_district ORDER BY district_id ASC"); $sql = mysqli_query($dbc, $query) or die(mysqli_error()); echo'<table><tr>'; // Start your table outside the loop... and your first row $count = 0; // Start your counter while($data = mysqli_fetch_array($sql)) { /* Check to see whether or not this is a *new* row If it is, then end the previous and start the next and restart the counter. */ if ($count % 3 == 0) { echo "</tr><tr>"; $count = 0; } echo '<td><input name="district[]" type="checkbox" id="'.$data['district_id'].'" value="'.$data['district_id'].'">'; echo '<label for="'.$data['district_id'].'">'.$data['district_name'].'</label></td>'; $count++; //Increment the count } echo '</tr></table>'; //Close your last row and your table, outside the loop ?> </div> Hello,
I have 3 tables for clients, orders and the products they ordered.
Here are the tables... Clients CLIENT_ID CLIENT_NAME Orders o_id client_id o_number o_date o_notes Products o_id qty name I am getting the results I need with this query... SELECT clients.CLIENT_ID, clients.CLIENT_NAME, orders.o_id, orders.client_id, orders.o_date, orders.o_number, orders.o_notes, products.o_id, products.qty, products.name FROM clients, orders, products WHERE clients.CLIENT_ID = orders.client_id AND orders.o_id = products.o_id AND orders.o_id = $theOrder..and this is the php I use to display it... while ($row = $result->fetch_assoc()) { echo "<h2>$row[CLIENT_NAME]</h2>"; echo '<label>Date</label><input type="text" value="'.timechange($row['o_date']).'" readonly><br>'; echo '<label>Order No.</label><input type="text" value="'.$row['o_number'].'" readonly><br>'; echo '<label>Notes</label><input type="text" value="'.$row['o_notes'].'" readonly>'; echo '<label>Product Qty.</label><input type="text" value="'.$row['qty'].'" readonly><br>'; echo '<label>Product Name</label><input type="text" value="'.$row['name'].'" readonly><br>'; }However - rather predictably I am getting three forms printed out as the results from MySQL look like this... mysql0.jpg 33.47KB 0 downloads Is it possible to somehow get my form to display the results, like this... mysql1.jpg 22.54KB 0 downloads I hope I'm explaining myself well enough - and thank you for reading. Edited by tHud, 04 July 2014 - 11:06 AM. I am assuming doing the following is bad practice as the short name "Account" is both for the repository and account. Agree? Appears that use always takes precedent over namespace and just Account\User is always short for \NotionCommotion\Domain\Entity\Account\User and not \NotionCommotion\Api\Account\User. Still sees like it could easily result in confusion. namespace NotionCommotion\Domain\Repository\Account; use NotionCommotion\Domain\Entity\Account; class AccountRepository { public function getUser(string $mainKey, int $userId):?Account\User { // } } Would it be better to do something like the following? Interestingly, it worked fine on the below class but when I tried to do so on the above AccountRepository class, it resulted in AccountDir\User class not found error. Is there any logic reason why that might/should happen, or is it more likely I just have some error elsewhere? namespace NotionCommotion\Api\Account; use NotionCommotion\Domain\Entity\Account as AccountDir; class AccountService { public function read():AccountDir\Account { // } } Hi have a webpage (homepage) that has a wordpress blog linked to it. when i save the page exactly as it is for example. home.php then saves as home1.php and load the home1.php the wordpress blog is missing. i dont use wordpress normally this is a site i have been sent to amend some part in php. Is the reason for this wordpress backend is pointing to the home.php?
here is the code for the blog
<div class="blog_container"> <a href="/blog" class="title_link">Latest Blog Posts</a> <? if ($posts) { ?> <ul> <? foreach ($posts as $post) { ?> <li> <a href="<?= $post->guid ?>"> <?= word_limiter($post->post_title, 10) ?> <span><?= date('d-m-Y', strtotime($post->post_date)) ?></span> <strong>read more ></strong> </a> </li> <? } ?> </ul> <? } ?> </div>thanks For solely to reduce duplicated code and when injection isn't applicable, should one use inheritance or traits? <?php abstract class BaseClass { private $id, $name; public function __construct(int $id, string $name) { $this->id=$id; $this->name=$name; } public function getId():int { return $this->id; } public function getName():string { return $this->name; } } <?php class A extends BaseClass{} class B extends BaseClass{} class C extends BaseClass { private $foo; public function __construct(int $id, string $name, Foo $foo) { parent::__construct($id, $name); $this->foo=$foo; } public function getFoo():Foo { return $this->foo; } } <?php trait MyTrait { private $id, $name; public function __construct(int $id, string $name) { $this->id=$id; $this->name=$name; } public function getId():int { return $this->id; } public function getName():string { return $this->name; } } <?php class A { use MyTrait; } class B { use MyTrait; } class C { use MyTrait; private $foo; public function __construct(int $id, string $name, Foo $foo) { $this->id=$id; $this->name=$name; $this->foo=$foo; } public function getFoo():Foo { return $this->foo; } } Edited January 2, 2020 by NotionCommotion I 'm having some problem while sending mails . i am sending bulk mails using php script, der is no problem in the script. i hope some guys have faced similar issue. while i am sending bulk emails, i figured out that - few mails are going to spam not into their INBOX. can you guys pls give some hint to resolve this issue. .. A form is filled and the information is emailed to my address. The problem is it goes to the spam folder. Is it a problem with the email filter? I suppose I could whitelist the email address the server uses to email the info, but then spam would get through as well. Any ideas? I'm using this code to create and populate a database. It gets a bit involved as it is creating a series of times for every day in the year. The database gets created and populated just fine, however I have 2 quirks I can't figure out. First, I am creating a separate file to store connection creds to the database. The file gets created and holds the correct information, but as I am using the program, somehow the file is getting overwritten with blank spaces, making it impossible to connect to the database. 2nd, the program sends me an e-mail when the database is created. Problem is I'm getting 2 e-mails about 20 minutes apart. 1 with all the correct information and 1 blank. I'm thinking maybe these problems are related??? Like the program is trying to run itself twice or is getting called twice. Once the program runs, it never gets called again in any other part of the program code. Any ideas? Thanks. Code: [Select] <?php $coursename = $_POST["coursename"]; $websiteurl = $_POST["websiteurl"]; $email = $_POST["email"]; $otime = $_POST["opentime"]; $ctime = $_POST["closetime"]; $interval = $_POST["interval"]; $year = $_POST["year"]; $server = $_POST["server"]; $username = $_POST["username"]; $password = $_POST["password"]; $userpassword = $_POST["userpassword"]; //--Creates a file to store Login Information--\\ $data = <<<DATA <?php \$server = "$server"; \$username = "$username"; \$password = "$password"; ?> DATA; file_put_contents("databasedata.php", $data); //--Connect to the Server--\\ mysql_connect("$server", "$username", "$password"); //--Create the Database--\\ mysql_query("CREATE DATABASE IF NOT EXISTS TeeTimes"); mysql_select_db("TeeTimes"); //--Create the Tables--\\ mysql_query("CREATE TABLE IF NOT EXISTS CourseInfo ( Course_ID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(Course_ID), CourseName varchar(40) NOT NULL default '', HomePage varchar(50)NOT NULL default '', Email varchar(50) NOT NULL default '', Password varchar(20) NOT NULL default '' )"); mysql_query("CREATE TABLE IF NOT EXISTS Daysheets$year ( Sheet_ID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(Sheet_ID), Date date NOT NULL, Time time NOT NULL, Player1 varchar(30) NOT NULL default '', Cart1 varchar(3) NOT NULL default '', Player2 varchar(30) NOT NULL default '', Cart2 varchar(3) NOT NULL default '', Player3 varchar(30) NOT NULL default '', Cart3 varchar(3) NOT NULL default '', Player4 varchar(30) NOT NULL default '', Cart4 varchar(3) NOT NULL default '', Player5 varchar(30) NOT NULL default '', Cart5 varchar(3) NOT NULL default '', Men smallint(4) NOT NULL default 0, Women smallint(4) NOT NULL default 0, Guest smallint(4) NOT NULL default 0, Event varchar(3) NOT NULL default '', EventName varchar(30) NOT NULL default '' )"); //***To Populate the Database with Dates and Times***\\ mysql_query(" INSERT INTO CourseInfo (CourseName,HomePage,Email,Password) VALUES('$coursename','$websiteurl','$email','$userpassword')"); $rows = mysql_query("SELECT * FROM Daysheets$year"); if ($rows[Date]=="") { $firstday = "$year:01:01 $otime:00:00"; $firstdate = strtotime($firstday); $firsttime = "$year:01:01 $otime:00:00"; $opentime = strtotime($firsttime); $lasttime = "$year:01:01 $ctime:00:00"; $closetime = strtotime($lasttime); $time = date("g:i",$opentime); $i=1; //***To Account For Leap Years***\\ if ($year == 2012 || $year == 2016 || $year == 2020 || $year == 2024) {$n=366;} else {$n=365;} while ($i <= $n) { $newday = date("Y-m-d",$opentime); mysql_query(" INSERT INTO Daysheets$year (Date,Time) VALUES('$newday','$time')"); while ($opentime < $closetime) { $newtime = strtotime("+$interval minute", $opentime); $nexttime = date("Y-m-d g:i a",$newtime); $nextd = date("Y-m-d",$newtime); $nextt = date("g:i",$newtime); mysql_query(" INSERT INTO Daysheets$year (Date,Time) VALUES('$nextd','$nextt')"); $opentime = strtotime($nexttime); } $opentime = strtotime($firsttime); $newday = strtotime("+$i day", $opentime); $nextday = date("Y-m-d g:i a",$newday); $opentime = strtotime($nextday); $closetime = strtotime($lasttime); $newday = strtotime("+$i day", $closetime); $nextday = date("Y-m-d g:i a",$newday); $closetime = strtotime($nextday); $i++; } } mysql_close(); //--Send Information for Safekeeping--\\ $to = "someone@somewhere.org"; $subject = "Tee Time Maker User Info"; $message = "Course Name:' '$coursename \n Website: ' '$websiteurl \n E-Mail: ' '$email \n Password: ' '$userpassword"; mail($to, $subject, $message, "From: $coursename <$email>"); //--Redirect user to the newly created site--\\ header("Location: /teetimes/adminteetimes.php"); ?> Hi all, Thanks for reading. I'm running a script using jQuery that auto-refreshes a <div> on the index page from an external PHP script to get all the rows in a database and display them on the index page. The script works great - here it is as follows: Code: [Select] <script type="text/javascript"> $(document).ready(function() { $("#responsecontainer").fadeOut("fast").load("getrows.php").fadeIn("slow"); var refreshId = setInterval(function() { $("#responsecontainer").fadeOut("fast").load('getrows.php').fadeIn("slow"); }, 5000); $.ajaxSetup({ cache: false }); }); </script> The getrows.php script I'm working with looks like this: Code: [Select] <?php $rowsQuery = mysql_query("SELECT * FROM Happenings WHERE HappeningDate='$today'"); if (mysql_num_rows($rowsQuery) == 0) { $happeningsToday = "There are no happenings today."; } else { $allHappeningsToday = 1; while ($getHappeningsToday = mysql_fetch_array($rowsQuery)) { $happeningName = stripslashes($getHappeningsToday['HappeningName']); $happeningDate = $getHappeningsToday['HappeningDate']; $happeningDescription = $getHappeningsToday['HappeningDescription']; if ($allHappeningsToday == 1) { $happeningsToday .= " <div class=\"box\"> <p>".$happeningName." | ".$happeningDate." | ".$happeningDescription." </div>"; $allHappeningsToday = 2; } else { $happeningsToday .= " <div class=\"box\"> <p>".$happeningName." | ".$happeningDate." | ".$happeningDescription." </div>"; $allHappeningsToday = 1; } } } echo $happeningsToday; ?> This script works great as well. Currently, the auto-refresh jQuery script as you can see if getting and fading in/out all of the rows. Off of the above getrows.php script, is there a way after I could get only the newly created rows since the last refresh and only fade those in and out while leaving the others already loaded by the auto-refresh script to not fade in/out? Any ideas, thoughts or suggestions would be unbelievably helpful. Thank you very much. I've been using something like this to send email messages to users on a site: $to = $email; $subject = "Message From Microsoft.com\r\n"; $headers = "From: support@Microsoft.com\r\n"; $headers .= "Return-Path: support@Microsoft.com\r\n"; $headers .= "Reply-To: support@Microsoft.com\r\n"; $message = "<html><body><img src='http://www.Microsoft.com/images/logo.png' /><br /><br />You have a message from Bill:<br /><br />"; $message .= '<img src="' . $image . '" /><br /><br />'; $message .= 'Isn't it pretty?.<br /><br />'; $message .= '<a href="http://www.Microsoft.com">Microsoft.com</a></body></html>'; mail($to,$subject,$message,$headers); This sends, literally, text like this: <html><body><img src='http://www.Microsoft.com/images/logo.png' /><br /><br />You have a message from Bill:<br /><br /><img src="http://www.Microsoft.com/images/billiam.jpg" /><br /><br />Isn't it pretty?.<br /><br /><a href="http://www.Microsoft.com">Microsoft.com</a></body></html> Obviously, I would like the email to hide the HTML, but use it to format the output. Also, I'd obviously like the image to show up, not a link to the image, and I would like the link to show up as a link, not as HTML. How do I do this? Cheers. Hi, I'm developing a php newsletter software but I'm in trouble with bounce mails! I set a return path directing them into a specific email box then I read that email box with php and I process bounce mails to get the kind of problem. Well, I need to get some informations about those bounce emails: The name of the user that should recive that mail, the date when the mail has been sent, the kind of error encountered; It could be so easy if I could read the body of the mail I sent into the back bounce one but every server sends a different kind of bounce...for example mailer-daemon won't let me get the body of the sent message...how can I handle this? Andrea. how to tell gmail to send plan messages only i want to send my friend a pgp-crypted mail - but this fails since the html-based mails allways do some changes to the pgp my friend receives the mails in a broken style they are not readable any more plz advice me - any and all help is much appreciated by the way i use kgpg and the editor to create the crypted message. i do not like the enigmail-addon for tbird. + But if i should try this - : Which credentials are needed to configure the einigmail - the public key that i have generated recently. love to hear from you greetings Hello I am working on php website. Now here im working on sending orders. So once it is ordered the confirmation e-mail goes to one who ordered(he enters his e-mail id manually) and the head of the department(e-mail ids written in code). But now I have put a checkbox that if the person is head of the department he checks the checkbox and e-mail should be sent to him. So how to verify this by checkbox.Can anyone please help me with this. The person should not get 2 e-mails. I hope I was clear in explaining my doubt. If not please do ask me for more explanation. Thank you. |