5 ms·
Well, since you helped me to find an awesome webhost last time, I figure I'll bite on some more generosity. :) I have a product that will be completed soon.
by Random_Person 15y ago
Well, since you helped me to find an awesome webhost last time, I figure I'll bite on some more generosity. :)
I have a product that will be completed soon. I do not plan on selling this product through my site, but I do want to drive traffic there before and after release. I have kept myself socially detached on the Internet in the past and I do not have a Facebook and only recently embraced Twitter and G+. I am slowly trying to build a brand around my name so that I might have traffic for future products.
Since launching my site, I have been working on learning HTML/CSS and it has slowly come together between work, school and children. Now I am venturing into the world of PHP. I built a little script that I use for people to register for my newsletter. It is driven by a form with one text box and a submit button. It takes whatever is in that box, throws it in a flat file, then redirects to a thanks page.
I like working with flat files, I always have, but I am currently up against a wall where I either need to dive deeper into PHP or look into a service like MailChimp. What I need to know:
I'd like for there to be more feedback to both the user and myself that their submission was okay. I'd like to generate a subscription email that is sent after the completion of the form which would also CC me. I am really not interested in a service that convolutes this process if it is something I can manage myself. What do you recommend? If you say PHP is the answer, are there any resources out there that you suggest that would put me on the right path?
- developuh 15y agoI would suggest : sign up with mailchimp or something like that and avoid the hassle. It will actually save you a lot of time, frustration and possibly money. You should focus more on your product and building your brand. just my 2 cents.
- mikegreenberg 15y agoReally happy that they are working out for you! PHP has been my world for many years and recently I've begun branching out. After playing around with the likes of Python, Ruby, and NodeJS; they are all just tools that you can use to get the job done. That said, there are much better tools than others for specific tasks. And I were to suggest a language that you should start learning in regards to web development, I would probably not recommend PHP. The language has hit a bit of a slow trough as they (the PHP gods) decide on an appropriate roadmap going forward. PHP will be around for a long, long time so there's not much worry of it becoming legacy too quickly. But other languages are much better maintained and have more activity in the community. (My current favorite being Python.) Regarding your problem at hand, PHP can do this quite simply and the only resource you'll need would be http://php.net/mail/ http://php.net/mail/. That said, I wouldn't use this for high volume traffic as the mail implementation in PHP is not efficient. (Read the notes on that link.) Email on the internet is a bit tricky, especially when ensuring your message is delivered appropriately, well-formatted, readable in both text and HTML, etc. And as soon as you start hitting these problem, it's a much more efficient use of your time to go with these services over rolling your own. This is just one person's opinion who ended up using a perl script to handle mailing functionality instead of PHP's native function in a PHP app he wrote. blush
- Random_Person 15y agoExcellent reply sir, might I ask another? The reason I used PHP for my little script was because I discovered that you just ship the output of the form button to whatever.php and it essentially took whatever values as arguments, then quickly spit me back to the site when it was done. I am familiar with Python, and have written some utilities I use daily, but is just as easy to implement Python server side or do I need to install some extensions that handle this sort of stuff?
- mikegreenberg 15y agoI think your solution is perfect for problem. The biggest gripe I have with PHP is the mail interface. When you outgrow your currently solution, the next step I'd take is use your PHP solution to pass the mail request to a mail service provider. That will give you the most bang for your buck without added complexity. If you're feeling really brave and really want to roll your own solution, try to find a way to cheaply create a HTTP POST interface that you could point your form at to process your request. A python/django instance could do this but might be a lot of overhead for just a mail processor, for example. Just don't try to over engineer it. :)
- mfkp 15y agoI've done something similar to this in the past. If you want to use mailchimp (which I would recommend), I pasted some example code for you at https://gist.github.com/1488819 https://gist.github.com/1488819 . It uses jquery and the ketchup plugin for validation, found at http://demos.usejquery.com/ketchup-plugin/ http://demos.usejquery.com/ketchup-plugin/ . Let me know if you need help with getting it working.
- Random_Person 15y agoThanks for the code. I looked at MailChimp and the only reason I didn't go with them was to keep yet another service out of the stack. I'm not one to remember things easily so sprinkling bits and pieces of my structure around on different services is really limiting for me. That being said, I'm starting to see the value in using something like MailChimp and if I can't accomplish what I want in a few days with just PHP/Python, I might head there.