
JakkkeM
Members-
Posts
42 -
Joined
-
Last visited
Profile Information
-
Gender
Not Telling
JakkkeM's Achievements

Newbie (1/5)
0
Reputation
-
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.
-
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...
-
None-the-less it's still not sending the message for some abstract reason...
-
Link
-
Tried that. The only "unusual" thing, was I expected it to print the <[email protected]> on the page, but it gets eaten for some reason. Nothing unexpected anywhere else.
-
By fail - echo no and not send the email.
-
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.
-
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 <[email protected]>" . "\r\n"; Now, if I make my last header: $headers .= "From: CFS <[email protected]>"."\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.
-
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!
-
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; } } ?>
-
Replaced that - no change :/
-
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.
-
Managed to get a working solution. Had my friend make up an OOP Code...
-
Still null. Why is this so difficult?!
-
That's the source code