July 21, 201115 yr Doing a job for a client here that is turning out to be a much longer affair than i first thought. I've put together a custom Facebook landing page for them and i'm currently trying to integrate their home pages 'sign up' form in to the Facebook page. However their site is based on a CMS (i think it may be sugar) that i've never worked with. On going through their files i discovered each page is calling so many includes that it would be impossible to figure out exactly what is calling what. What i decided to do was create a form and insert the fields in to the database myself. I've successfully connected to the database no problems and i can sanitise the form fields and drop them in no problems, my problem however is that when you submit the form on the home page you receive an email confirming this. What is going on here? Can any one have a quick look for me and possibly point me in the right direction. I've spent hours on this so far and feel like I'm going round in circles! Cheers guys. Mike
July 21, 201115 yr Are you running PHP5.3? if so you can monkey patch it to locate where it's sending mail... <?php // at the top of your code namespace chipshop; function mail() { echo 'someone is trying to send mail!'; echo '<pre>'; debug_print_backtrace(); echo '</pre>'; die(); } Assuming that its sending it via mail and not its sending via sockets.
July 22, 201115 yr Author I ended up stripping the template right back and hooking in to the core functions. Took a lot longer but it was far more elegant a solution than hacking my script together around their CMS. Moral of the story is to check what environment you're going to be working with in advance!
Create an account or sign in to comment