Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Drummin's Achievements


Member (2/5)



  1. Thank you SO MUCH requinix. The script as it was worked when I did a stand alone test in a plain text email. I had then converted the email to send both plain and html versions and that's when I ran into trouble. The boundary at the bottom of the loop was the major problem and I also changed the sans-boundaries as you suggested and everything works great. Thanks again for your help.
  2. I'm using a foreach loop to attach an array of images to email. Emails are being sent with attachments however I am short one attachment every time. I'm thinking it has to be the $mime_boundary (dashes) and I've tried many combinations and the commented out IF statement to no avail. Can someone spot the problem? The attachment section is as follows. # Attachments would go here $x = 0; foreach($files as $thefile){ $file = fopen($thefile,"rb"); $data = fread($file,filesize($thefile)); fclose($file); $data = chunk_split(base64_encode($data)); $body .= "Content-Type: {\"image/png\"};\n" . " name=\"$thefile\"\n" . "Content-Disposition: attachment;\n" . " filename=\"$thefile\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; $body .= "--$mime_boundary\n"; /* if($x == (count($files)-1)) { $body .= "--$mime_boundary--\n"; } else { $body .= "-–$mime_boundary\n"; } $x++; */ } # End email $body .= "--$mime_boundary--\n"; # <-- Notice trailing --, required to close email body for mime's
  3. DUH. Sorry I didn't see that. Thanks for your help and quick response. Worked perfectly.
  4. I'm not sure if this problem is related to the query style or my JOIN. Tried LEFT JOIN and straight JOIN. The following works fine. $sql_statement = <<<END_OF_SQL SELECT DISTINCT(`rr`.`GuestID`) AS `Guest ID`, `rr`.`FromDate` AS `Check In Date`, `rr`.`ToDate` AS `Check Out Date`, `g`.`firstname` AS `First Name`, `g`.`lastname` AS `Last Name`, `g`.`email` AS `Email`, `g`.`phone` AS `Phone`, `g`.`address` AS `Address`, `g`.`city` AS `City`, `g`.`state` AS `State`, `g`.`country` AS `Country`, `g`.`zip` AS `Zip`, `g`.`user_id` AS `User ID` FROM `room_reservations` as `rr` LEFT JOIN `guests` AS `g` ON `g`.`user_id` = `rr`.`GuestID` END_OF_SQL; I however wish to add a date filter to this query and adding WHERE `rr`.`FromDate`>=$specstart AND `rr`.`ToDate`<=$specend doesn't work. $sql_statement = <<<END_OF_SQL SELECT DISTINCT(`rr`.`GuestID`) AS `Guest ID`, `rr`.`FromDate` AS `Check In Date`, `rr`.`ToDate` AS `Check Out Date`, `g`.`firstname` AS `First Name`, `g`.`lastname` AS `Last Name`, `g`.`email` AS `Email`, `g`.`phone` AS `Phone`, `g`.`address` AS `Address`, `g`.`city` AS `City`, `g`.`state` AS `State`, `g`.`country` AS `Country`, `g`.`zip` AS `Zip`, `g`.`user_id` AS `User ID` FROM `room_reservations` as `rr` LEFT JOIN `guests` AS `g` ON `g`.`user_id` = `rr`.`GuestID` WHERE `rr`.`FromDate`>=$specstart AND `rr`.`ToDate`<=$specend END_OF_SQL; I've alse tried using AND instead of WHERE, which doesn't give me the correct results. Thank you for your time and help.
  5. OK, so in other words, valid markup would be full echo then, correct? <?php echo $aset['SiteDescription']; ?> OR <?php echo "{$aset['SiteDescription']}"; ?> ... and there no valid "notation" type formatting with the equal sign for this and all lines like this would need to be replaced, correct? Note: it's not my site or code so testing isn't all that easy. Just wanted to understand if there was in fact notation type scripting and if so, the correct way to write it. Thanks for the feedback.
  6. Never been real good with terminology but an unquoted name in brackets [name] would be a constant, right? And I understand that the "name" in brackets should be quoted ['name']. I do that all the time. But what is that called? Also can I get an answer if the code posted above is valid?
  7. Thanks. Just seemed odd <?= Would this be valid? <?php=$aset['SiteDescription']?> Personally I've always echoed anything that need to be rendered to the page. Just want to understand it, thanks.
  8. Looking at some code from post http://forums.phpfreaks.com/index.php?topic=364299.0 and was wondering if this is even php? Anyone seen this before with the equal sign after the question mark? <?=$aset[siteDescription]?>"
  9. What I find very odd is you can go to your site in a fresh browser and you don't see any styling, yet clicking any link and styling will show, even if you click a back button to the page that was missing styling it would now have styling. On any working page, you click Ctrl-F5 and styling goes away. So it seems to be that style sheet is being downloaded to the browser but being blocked initially when the page loads. It might be something as simple as the order of your tags but can't be sure as I can't duplicate the problem locally. Note: most Tags should be lower case and a charset=utf-8 is probably more common so I would try changing the order to have any links after meta tags. Also note I added "type" attributes to both css and javascript tags. Not sure about that license meta tag but in didn't look right without ="" so added as such. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html> <head> <title><?php if (isset($aset['SiteTitle'])) echo "{$aset['SiteTitle']}"; ?></title> <meta dcb="" license="123456789"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="DESCRIPTION" content="Find the world's greatest classic cars for sale here today. Your dream car is waiting."> <meta name="KEYWORDS" content="classic cars, sales, for sale, Pittsburgh, PA"> <!--[if lt IE 7]> <script defer type="text/javascript" src="pngfix.js"></script> <![endif]--> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> .BlackLink {font-family:verdana; font-size:22; color:black; font-weight:bold; text-decoration:none} a.BlackLink:hover {text-decoration: underline} .BlueLink {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:underline} a.BlueLink:hover {text-decoration: underline} .RedLink {font-family:verdana; font-size:11; color:red; font-weight:bold; text-decoration:none} a.RedLink:hover {text-decoration: underline} a.CatLinks {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none} a.CatLinks:hover {text-decoration:underline} a.SubCatLinks {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:none} a.SubCatLinks:hover {text-decoration:underline} a.TitleLinks {font-family:verdana; font-size:12; color:black; font-weight:bold; text-decoration:none} a.TitleLinks:hover {text-decoration:underline} .ItemText {font-family:verdana; font-size:11; color:black; font-weight:regular; text-decoration:none} .sm {font-family:verdana; font-size:11} </style> <script language="JavaScript" type="text/javascript">
  10. Possible problem... What does pngfix.js do? Link to a different style sheet?
  11. I downloaded the html found on your link in the first post. Made a css page called style.css and put it in a folder called css relative to the page. Checked in four different browsers including Chrome and I see a black background with expected page styling. Not sure why it's not working for you. You really need to fix some of those markup errors though.
  12. Looks like you found your style sheet. Still a good 24 errors on the page but I'm sure if you go through it with a validator you'll fix those issues. Be sure to fix all those <? short tags as your host may turn (allowing short tags) off.
  13. Also note there are a good number of nesting or other errors in your html markup such as an </div> tag after the </form> tag. </form> </div> </td></tr></table> Get Tidy validator for firefox or use another validator to check your page.
  14. You have a single quote at the end of your "<link>" line. Also don't use short tags, i.e. <? Use full php start tags, <?php. Also I added isset() to your title php code but I don't see any includes where this title might be set. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html> <head> <!--[if lt IE 7]> <script defer type="text/javascript" src="pngfix.js"></script> <![endif]--> <link href="css/style.css" rel="stylesheet" type="text/css"> <title><?php if (isset($aset['SiteTitle'])) echo "{$aset['SiteTitle']}"; ?></title>
  • 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.