Jump to content

SCook

Members
  • Posts

    73
  • Joined

  • Last visited

    Never

Posts posted by SCook

  1. Hi everyone,

     

    I am having some odd issues with sending php generated emails.  Essentially, what I'd like to know is how can I ensure they go into the inbox, and not get shunted to the junk mail folder.  I assume this is s formatting issue, and it only happens sometimes.  I am creating html emails.  I have included my headers below:

     

    $headers = "From: <Real Money Help>\r\n";

    $headers .= 'MIME-Version: 1.0' . "\r\n";

    $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

     

    Any help would be appreciated.  Thanks.

  2. Hi everyone,

     

    I was wondering, is there a countdown script out there?  What I need is this: I need to plug in two time integers, and determine how many days, hours, minutes and seconds there are between.

     

    Then I'll use JavaScript to count down in real time.  But I first need the four variables when a apge is loaded.  I could write this myself, but I was wondering if something might not already exist.  Thanks.

  3. function sendVideoEmail($mID, $id) {
    global $access;
    
    // Get the member's email and name
    $query = "select first_name,email from members where id = $mID;";
    $result = mysql_query($query, $access);
    $mem = mysql_fetch_row($result);
    
    // Get the email data
    $query = "select * from adv_mail where id = $id;";
    $result = mysql_query($query, $access);
    $mail = mysql_fetch_array($result);
    
    // Get the advetisers contact info
    $query = "select * from advertisers where id = " . $mail["aID"] . ";";
    $result = mysql_query($query, $access);
    $adv = mysql_fetch_array($result);
    
    // Compose the email
    $headers   = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "To: $mem[1]\n";
    $headers .= "From: www.stirfrytv.com\n";
    
    $body = "
    	<html>
    	<head>
    	<title>Stir Fry TV Message,/title>
    	</head>
    	<body>
    	<table width = 100% border = 0>
    		<tr>
    			<td>Hello, $mem[0]</td>
    		</tr>
    		<tr><td height = 20></td></tr>
    ";
    
    if ($mail["image_placement"] == "t") {
    	$body .= "
    		<tr>
    			<td align = 'center'>
    				<img src = 'http//65.254.38.55/~river/emails/$id.jpg' border = 0>
    			</td>
    		</tr>
    		<tr><td height = 10></td></tr>
    		<tr>
    			<td>" . $mail["msg"] . "</td>
    		</tr>
    	";
    } elseif ($mail["image_placement"] == "b") {
    	$body .= "
    		<tr>
    			<td>" . $mail["msg"] . "</td>
    		</tr>
    		<tr><td height = 10></td></tr>
    		<tr>
    			<td align = 'center'>
    				<img src = 'http//65.254.38.55/~river/emails/$id.jpg' border = 0>
    			</td>
    		</tr>
    	";
    }
    
    $body .= "
    		<tr><td height = 20></td></tr>
    		<tr>
    			<td>
    ";
    
    $body .= "<b>" . $adv["company"] . "</b><br>";
    $body .= $adv["street_address"] . "<br>";
    if ($adv["address_line_2"] != "") {
    	$body .= $adv["address_line_2"] . "<br>";
    }
    $body .= $adv["city"] . ", " . $adv["state"] . " " . $adv["zip"] . "<p>";
    $body .= "Phone: <b>" . $adv["phone"] . "</b><br>";
    $body .= "E-mail address: <b><a href = 'mailto:" . $adv["email"] . "'>" . $adv["email"] . "</a></b>";
    
    $body .= "
    			</td>
    		</tr>
    	</table>
    	</body>
    	</html>
    ";
    
    if (!mail($mem[1], $mail["subject"], $body, $headers)) {
    	return true;
    }
    }
    

  4. Hi all,

     

    I would like to send an html email with a pic inside.  I've set it up with tables and etc.  I've included the mime version and content-type: text/html in the header.  It's not working.  Can anyone give me a quick example or some help on it?  Thanks

  5. Hi all,

     

    This is kind of an odd question, and I'm just hoping for a small possibility that someone here knows the answer.

     

    I have a windows sidebar gadget that is essentially an iframe which loads a PHP document.  In this document, I am trying to access a login cookie.  It does not work.  Does anyone have any clue on this?  Thanks.

  6. Well, I suppose I can use the date function, I've thought of that.  What I suppose I can do is split the number string and apply the date to the final digit, as this is the only thing that matters.  However, ou run into a weierd problem with the teens.  They're all "th"  So I guess I'll have to figure something out.  Maybe the is_mumeric can help

  7. Hi all,

     

    Here is my problem:  I have a list of people who've taken a quiz, they have the number right, and their time.  I want to sort them all so that they're organized.

     

    I was thinking of an array like:

    my_array[0][0] = id;

    my_array[0][1] = number_right;

    my_array[0][1] = time;

     

    Is there a way to sort the array by a specific key?  Seems like I should know this, but I'm blocked.  Any help would be great, thanks

  8. Well, if they aren't in any order, then why do they show up wirth print_r in the order they were created from a form?

     

    The reason is that I'm creating dynamic mysql entries using the post array submitted from a form.  What I'm doing is coming a month, day, year field into one date variable.  So what I do is unser the month, day, and year variables and create a $_POST["date"] variable.  Now, when I do this, query creation, the date variable is at the end of the array, not in the space it should be.  There fore, I need to move it forward.

×
×
  • Create New...

Important Information

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