Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,162,509 members, 7,850,755 topics. Date: Wednesday, 05 June 2024 at 08:28 AM |
Nairaland Forum / Science/Technology / Webmasters / Form2mail (856 Views)
Form2mail by drone99(m): 1:59pm On Jan 06, 2012 |
Hey guys, I need help with coding a form. Anyone? |
Re: Form2mail by geniusng(m): 7:46pm On Jan 06, 2012 |
If you don't have the knowledge of php, you can use third party form processing to get it done. Check bexonsoft.com/freeform Stanley codedwebmaster.com |
Re: Form2mail by drone99(m): 7:48pm On Jan 06, 2012 |
Hey thanks, will give it a shot. |
Re: Form2mail by yawatide(f): 8:05pm On Jan 06, 2012 |
geniusng, As commendable as your gesture might be, I think you should steer OP in the direction of actually learning to code it himself. 3rd party is good but what do you give up in terms of flexibility and control and perhaps the most important thing of all, adding to OP's skill set? |
Re: Form2mail by geniusng(m): 8:19pm On Jan 06, 2012 |
@ yawa-ti-de You are 100% right but I take a look at his signature and went straight to his contact page. I saw that there is no contact form. He may need it now, So he need to use it now while learning how to code it himself. @ drone99 A useful advice for you - don't rely on third party, it can fail at any time. Even the site I showed stated it clearly, go down you will see it "Cost and Limitations Bexonsoft html form to email processor is free and intended for use. We do not accept any liabilities due to failure of services or loss of data. We reserve the right to withdraw services at anytime. " If you are living in Surulere, come I will help you. |
Re: Form2mail by drone99(m): 9:55am On Jan 08, 2012 |
@yawa-ti-de, you are quite correct. I am looking to enrol in PHP classes pretty soon. @geniusng, am actually using the form for another website i designed. I tried editing a form someone previously coded for me, but i doesnt seem to work. Kindly see the codes below; is there anything missing from there i should i have added. Thanks guys. <?php if(isset($_POST['go'])){ $fullname = $_POST['fullname']; $email = $_POST['email']; $phone = $_POST['phone']; $website = $_POST['website']; $comments = $_POST['comments']; $target_email = "niyi@iamniyi.com"; //change this to the real destination email $subject = "Message from Contact Form"; $content = <<<EOD Registration form was filled by a user. Here are the details Name: $fullname Email: $email Telephone: $phone Website: $website Comments: $comments Click <a href="mailto:$email">here</a> to email this user. EOD; $headers = "From: Contact Form"; $sendmail = mail($target_email,$subject,$content,$headers); if($sendmail){ echo '<script>alert("We have received your request and would get back to you as soon as possible"document.location.href="contact.php";</script>'; } } ?> |
Re: Form2mail by yawatide(f): 11:38am On Jan 08, 2012 |
What do you mean by, "it didnt seem to work"? What error(s) did you get? What does the screen look like? While you gather those answers, you might want to replace POST with REQUEST, for security reasons. Also, in the future, try reading up on what you want to do, then modify the example given, as opposed to going straight to modifying something you found. That way, you understand what the code is doing and can better troubleshoot in the event of problems. Good luck! |
Re: Form2mail by drone99(m): 11:44am On Jan 08, 2012 |
Thank you Yawa. It didn't show any error, I didn't just get a notification in the assigned email. And BTW, I didn't just 'find' the code, someone help me use the same set of codes for a similar form and I just added a few more fields to the form. |
Re: Form2mail by Nobody: 12:55pm On Jan 08, 2012 |
*Passing by* |
Re: Form2mail by drone99(m): 1:03pm On Jan 08, 2012 |
@dhtml, *hit your leg on stone* Biko, do something, |
Re: Form2mail by yawatide(f): 1:10pm On Jan 08, 2012 |
My bad, though again, I insist, that you should only modify code that you understand. My point is that assuming it worked before you got it and added your own lines, it should have worked again. If it were me (and I assume you did this), I would have used the original code as is, and ensured that it worked, then added my own lines one at a time. This would have allowed me narrow down my error much quicker. If you aren't getting any errors, back out your changes, ensure the original code works. If it does, add your own code one at a time. I noticed your IF statement assumes a positive outcome. What if it doesn't? You need to add an ELSE statement for the negative outcome. Finally, unless I am missing something, your MAILTO is referencing $headers though I don't see it in your code. |
Re: Form2mail by Nobody: 1:23pm On Jan 08, 2012 |
drone99:*stumbles but did not fall* You already got the top webmaster aka yawatide on the case, i dont think you need my help *Strolls off to other boards to find babes* |
(1) (Reply)
How Real Is www.dwitch.com? / Check Out This Website / Windows Hosting & ASP.NET Hosting (new Breed!!!)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 20 |