Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

JakkkeM's Achievements


Newbie (1/5)



  1. Yeah I'll give it a try. It's so confusing because it seems so random... I thought perhaps there was a character limit on the whole from header but it doesn't appear to have one.
  2. Tried fake addresses, huge address' and all sorts... For some reason, on some address' it removes the from header completely! There doesn't appear to be any other patterns...
  3. None-the-less it's still not sending the message for some abstract reason...
  4. Tried that. The only "unusual" thing, was I expected it to print the <noreply@crossfitstmarys.com.au> on the page, but it gets eaten for some reason. Nothing unexpected anywhere else.
  5. By fail - echo no and not send the email.
  6. Not at the moment it's not - but I'm using all different address' and it works. I.e. crossfit.com worked I have: if(mail($to, $subject, $message, $headers)){ echo "YES"; }else{ echo "NO"; } To debug. Seems to work fine.
  7. Hi all, I'm sending an email with php as a part of my user registration process, and for some reason the mail script begins to fail when I use my full desired email in my headers. I use the standard PHP Manual headers for email: // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: Jake M*** <**********@gmail.com>' . "\r\n"; $headers .= "From: CFS <noreply@crossfitst.com>" . "\r\n"; Now, if I make my last header: $headers .= "From: CFS <noreply@crossfitstmarys.com>"."\r\n"; It fails! As soon as I put the m in on CrossfitStMarys it fails the whole script. Any ideas? Cheers. P.S. I have real data in for my Jake M, just censored it out because I don't want everyone having my email haha.
  8. Had no need for a body tag - it was being echo'd onto a page with body tags already. Solved the problem. Had to make the function return rather than echo. Cheers for the string replace tip though!
  9. The String: <div class="cfs_container"> <div class="container-fluid"> <div class="row-fluid"> <div class="span12"> <!-- Top Bar Content --> <div class="span4">[element="title"]</div> <div class="span8"> <div class="btn-toolbar" style="float:right;"> [menu] </div> </div> </div> </div> <div class="row-fluid"> <div class="span12">[element="scroll"]</div> </div> <div class="row-fluid"> <div class="span3" style="background-color:#000; padding:10px; color:#FFF;"> <!--Left content--> [element="left"] </div> <div class="span6" style="background-color:#000; padding:10px; color:#FFF;"> <!--Central content--> </div> <div class="span3" style="background-color:#000; padding:10px; color:#FFF;"> <!--Right content--> [element="right"] </div> </div> </div> <div class="container-fluid"> <span class="span12" style="color:#FFF; padding:10px;"> <center> [element="copyright"] </center> </span><!-- SPAN END --> </div><!-- CONTAINER FLUID END --> </div> <?php /* Functions to create dropdown menus dynamically for items in DB using twitter bootstrap markup */ class Menu { public static function makeMenu() { echo "<div class=\"btn-toolbar\" style=\"margin: 0; float:right;\">"; try{ $getAllMenus = DB::get()->query("SELECT menu_id FROM menus"); $result = $getAllMenus->fetchAll(); } catch (PDOException $e){ die("Query Error: ".$e->getMessage()); } foreach($result as $menu){ self::getMenu($menu['menu_id']); } echo "</div>"; } static function isDropdown($menu_id) { try{ $dropDownCheck = DB::get()->prepare("SELECT COUNT(*) FROM links WHERE assoc_menu = :assoc_menu"); $dropDownCheck->bindParam(':assoc_menu', $menu_id, PDO::PARAM_INT); $dropDownCheck->execute(); $result = $dropDownCheck->fetch(); } catch (PDOException $e){ die("Query Error: ".$e->getMessage()); } return ($result[0] > 0); } static function getMenuItems($menu_id) { // get Link data from the database try{ $linkData = DB::get()->prepare("SELECT * from links WHERE assoc_menu = :assoc_menu"); $linkData->bindParam(':assoc_menu', $menu_id, PDO::PARAM_INT); $linkData->execute(); $links = $linkData->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e){ die("Query Error: ".$e->getMessage()); } return($links); } public static function getMenu($menu_id) { // get Menu data from the database try{ $menuData = DB::get()->prepare("SELECT * from menus WHERE menu_id = :menu_id LIMIT 1"); $menuData->bindParam(':menu_id', $menu_id, PDO::PARAM_INT); $menuData->execute(); $menu = $menuData->fetch(PDO::FETCH_ASSOC); } catch (PDOException $e){ die("Query Error: ".$e->getMessage()); } if(!self::isDropdown($menu_id)){ // if the menu doesn't contain dropdown items $markup = "<div class=\"btn-group\"> <a class=\"btn ".$menu['btn_type']."\" href=\"#\">".$menu['title']."</a> </div>"; } else { // otherwise create dropdown items $links = self::getMenuItems($menu_id); $markup = "<div class=\"btn-group\"> <a class=\"btn ".$menu['btn_type']." dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">".$menu['title']." <span class=\"caret\"></span></a> <ul class=\"dropdown-menu\"> <!-- dropdown menu links -->"; // generate link for each dropdown item foreach($links as $link){ $markup.= "<li><a href=\"".$link['link_url']."\">".$link['link_title']."</a></li>"; } $markup.= "</ul></div>"; } echo $markup; } } ?>
  10. Replaced that - no change :/
  11. Hi, I'm using a preg_replace to change [menu] into Menu::makeMenu(); , but when it executes the replace, for some reason it's sending my code to the first line after the <body> tag rather than where the [menu] was in the first place. Preg Replace: function formatPage($transform){ $a = array( "/\[element=\"(.*?)\"\]/ise", "/\ /ise", "/\[menu]/ise", "/\[login-button]/ise", ); $b = array( "elementCreate(\"$1\");", "pageCreate();", "Menu::makeMenu();", "loginBtn();", ); $transform = preg_replace($a, $b, $transform); return $transform; } I can copy out the whole function and stuff for the Menu:: but I don't think it'll matter. Please help! Cheers.
  12. Managed to get a working solution. Had my friend make up an OOP Code...
  13. Still null. Why is this so difficult?!
  14. That's the source code
  • 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.