Programming A Web Form To Email - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Programming A Web Form To Email (1040 Views)
| Programming A Web Form To Email by hayoakins(op): 6:43pm On Sep 10, 2009 |
Please how do i Programm a web form to email? |
| Re: Programming A Web Form To Email by Nobody: 8:01pm On Sep 10, 2009 |
The page form should have prevalidation and sanitization. Requirements 1.Javascript(create a code to alert user if fields are empty). 2. Php(for the post and send to email function,sanitize (remove unwanted elements). But gurus like dhtml and kobojunkie can give you detailed instruction.If not i could help you write one i've got nothing doing at the moment. |
| Re: Programming A Web Form To Email by switchmax8: 8:04pm On Sep 10, 2009 |
what type of web form do you want to programme and which language do you understand or do you wanna use? |
| Re: Programming A Web Form To Email by hayoakins(op): 1:50pm On Sep 11, 2009 |
Thanks for your reply guys, am a newbie web designer and i want to program a career page where all information filled in through the form will be sent to an email, how do i do this? |
| Re: Programming A Web Form To Email by switchmax8: 6:18pm On Sep 11, 2009 |
here is the code below but you have to modify it to your form fields $message= "Full Name:".$_POST['name']."\r\n"."Arrival Date:".$_POST['arrival']. "\r\n". "Departure Date:".$_POST['departure']."\r\n". "Country:".$_POST['country']."\r\n". "Email Address:".$_POST['Email']."\r\n". "Phone Number:".$_POST['phone']. "\r\n"."Apartment Name:".$_POST['apartment']. "\r\n". "Your Message:".$_POST['Message']; $to = "reservation@citysrentals.com\r\n"; $subject = "Self Catering Flat\r\n"; $from = "Apartment Rentals\r\n"; $headers = "From: $from\r\n"; mail($to,$subject,$message,$headers); print "<h3>Thanks,You will be contacted soon<h3>"; } ?> |
| Re: Programming A Web Form To Email by Nobody: 6:32pm On Sep 11, 2009 |
First create input elements text and assign values to them e.g <input type="text" name="" id="" value""/> you can assign id if you want depending on how to access them. After creating the necessary elements create a javascript function to check for input.E.g function validate(form) { for(var i=0;i<forms.elements.length;i++) { if(document.form.element.type=="text" && document.form.element.value=="" ![]() {alert("fill all fields" ;return false;} }return true; } remember all input should be inside a form tag. <form onclick=(return validate()) onsubmit="validate.php"/> then a php will be written with the name validate.php your form will be sent in that file which contains code for server processing.Give me some time am kinda new to php by today i'll send the complete code.The essence of prevalidation with javascript is to make sure that at least no field are left empty but php will filter out crappy input.Also my warning javascript can be used to send input to server but it.s stupid to do so cuz javascript can be read in a browser's source unlike php.Also enable error console on firefox or safari for javascript errors.Am might not be 100% error free.One love also you don't need any advanced language php and javascript can do the job. |
| Re: Programming A Web Form To Email by Nobody: 6:41pm On Sep 11, 2009 |
Omo guy you dey loved switchmax just saved you some stress.Now create your forms according to switch max code don't forget name or id should match the php.Also the form will look this. <form action="switchmax.Php" method="post" onsubmit="return validate()"> |
| Re: Programming A Web Form To Email by hayoakins(op): 7:07pm On Sep 17, 2009 |
am new to web designing so treat me like a newbie, ![]() |
| Re: Programming A Web Form To Email by Nobody: 1:35pm On Sep 18, 2009 |
question for you 1.do you have a Web editor(dream-weaver,notepad,apatana)? 2.are you familiar with HTML,DOMS? 3.Do u have a web server installed(Apache,IIS) 4.do you have PHP installed. 5.do u know any basic stuff on Server side scripts if no to 2,3,4 it's hard to teach you.though it's not that hard to learn,but to teach from scratch is strenuous.go to W3school.com for crash course learning. |
| Re: Programming A Web Form To Email by hayoakins(op): 2:27pm On Sep 18, 2009 |
All I know how to use is fireworks and dreamweavers…you can check out the web I designed www.rccgdominionstars.org www.mercurymfb.com To really understand my plight as a newbie, you can click on CAREER PAGE on the mercurymfb.com…that’s the page I want to program to email which have been having problem with. Most of the things I learnt on web designing are all by myself but I need someone to really put me through on programming…goggle is making me go crazy if you get what I mean. Thanks to you guys who replied to this thread…unlike those that would request for some bucks before rendering help like you did…am so grateful |
| Re: Programming A Web Form To Email by Nobody: 6:23pm On Sep 18, 2009 |
@poster i kinda sense that you design pages mostly through dreamweaver not html.I use dreamweaver but the code view.Webform is not hard.But what i'm saying is to send to email.Php does a neat job but you need a web server to test your pages.Go to w3school trust me you won't regret it.The email stuff is even an example there but it doesn't make sense to copy it if you don't understand it.Cuz shola wrote the code for you up there.Just read php basic and you'll understand it.Hit me on my facebook so we'll chat this up.Search for pcguru my pix has a dog in it.Don't worry we tackle this stuff. |
| Re: Programming A Web Form To Email by Nobody: 6:42pm On Sep 18, 2009 |
Fireworks and Photoshop is a must learn.I use use weaver and works too. I almost cried cuz 1.Too dependent on clicking than designing also some codes might not be in weaver.2.Creating webpage with full html is disastrous css is God sent.Dhtml a nairaland user saved me from this stuff.To be a designer you should know or have basic on. 1.css(styling web and reduces size(slice technique). 2.Html(structure for the site) 3.Dom(accessing elements on windows by any lang). 4.Javascript(scripting making the site more responsive.And accessing Dom elements 5.Photoshop(slicing the page.Resources. Then others are just added for dynamism. Web designer any one can do that but a true web designer designs a page with the graphics and considers the web page size cuz if a site takes time it's useless.In pple's site i notice they use images for headers and footers which could be 120kb .That too much,you know what add me i'll give you some tips but hey me too am self training but i get tips and tricks everyday. |
Is Programming A Talent? • How Do I Connect A Form To Mysql Database • pls i need a c# code for sending form to email • 2 • 3 • 4
Best Paid Ict Professionals In Nigeria • The World Bank Competition - Apps For Development • Coding Habit: What Habits Help You Code?

