BuCki Posted September 11, 2009 Share Posted September 11, 2009 Hi Everybody I am sorry, if I did open the topic in the wrong category. I would like to ask for some help/advice regarding an Online application form. Well, let me explain the situation!! My friend runs a charity and I helped him about building the website, which is good sofar but now I am reaching my capabilities / knowledge limitation lol He asked me to create an Online Application Form, so people could fill the required details such as: Name, Addres, Afe, Gender, Status, Ethnicity etc etc etc and then when clicking on SEND button, the question & answers would be emailed to the charity email. Well, easy said as done... but I dnt know how and where I could find such a script? A long time ago, I seen on a website, that it opened as a PDF file which then I was able to fill out the details and then clicking on SEND (probably, the copy of filled-out pdf, was sent) - wonder if that would be possible ?! Any ideas please help thank you Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/ Share on other sites More sharing options...
RussellReal Posted September 12, 2009 Share Posted September 12, 2009 you can use uhm an opensource script.. google php mail generator.. or you can make your own.. its relatively easy, use $_POST or $_GET ($_POST is probably better lol) to get the data your user supplies.. and then put the data in some string to hold it all then pass it to the correct arguments of mail and viola you made your own mailer Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917022 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 Cheers Russell I tried a free script from internet... *feedback script* but it does not send the form to the email at all. Is ist some kind of issue with IE8 or something ?! thanks Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917041 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 Can anyone refer me to a working script !? Thank You Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917122 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 Did I ask for too much or something ?! :S Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917134 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 No you didn't but if you give us the code you used we can see what is/can be wrong. It's actually easy to make one: STEP 1:build a form <form action='' method='post'> Subject: <input type='text' name='subject'> Text: <input type='text' name='text'> <input type='submit' name='submit' value='send'> </form> STEP 2: create the PHP <?php if($_POST['submit']){ mail("somebody@something.com",$_POST['subject'],$_POST['text']); } ?> <html> .... for more info about mail function: Click here for more info about forms Click here Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917138 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 I got a document format of the application form, which I have to convert into "online application." The application form itself contains, boxes, circels, squers... which is to gather information from the user. I am ok in desining the layout in html/css but then PHP is where I have no clue with. So, am i supposed to use $_POST['...'] for everything eg. boxes, circles, squers !? Cheers Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917140 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 if you use a form with method='post' you're supposed to use $_POST[''] Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917141 Share on other sites More sharing options...
MatthewJ Posted September 12, 2009 Share Posted September 12, 2009 http://www.w3schools.com/PHP/php_mail.asp That is a very straight forward little tutorial on how to send mail with PHP, you just need to add your other fields... for that, you could google a simple html forms tutorial if you need help. If yo run into trouble, post the CODE you are using, not just how or why it didn't work. Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917143 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 @MetthewJ That's exact the same link I gave Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917144 Share on other sites More sharing options...
MatthewJ Posted September 12, 2009 Share Posted September 12, 2009 Yeah... noticed that after the post it is too darn early here! Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917146 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 Right right... Ok this is the one that I got from internet... but it will not send the email to me <?php $ip = $_POST['ip']; $httpagent = $_POST['httpagent']; $httpref = $_POST['$httpref']; $nameis = $_POST['nameis']; $visitormail = $_POST['visitormail']; $feedback = $_POST['feedback']; $rating = $_POST['rating']; $emailvalidation = $_POST['emailvalidation']; $British = $_POST['Brtish']; $Irish= $_POST['Irish']; $GypsyRoma = $_POST['GypsyRoma']; $EasternEurope = $_POST['EasternEurope']; $attn = $_POST['attn']; if (eregi('http:', $feedback)) { die ("Do NOT try that! ! "); } if((!$visitormail == "") && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { echo "<h2>Use Back - Enter valid e-mail</h2>\n"; $tellem = "<h2>Feedback was NOT submitted</h2>\n"; } if(empty($nameis) || empty($feedback) || empty($visitormail)) { echo "<h2>Use Back - fill in all fields</h2>\n"; } echo $tellem; if ($emailvalidation == "y") { $req1 = "Email format Validation \n" ; } if ($fieldvalidation == "y") { $req2 = "Required Form Field Validation \n"; } if ($htmlcontrol == "y") { $req3 = "More intergratd HTML (in form) \n"; } if ($phpform == "y") { $req4 = "Improved PHP form script generator \n"; } if ($htmlform == "y") { $req5 = "A complete HTML form generator \n"; } $req = $req1 . $req2 . $req3 . $req4 . $req5; if ($British == "y") { $q1 = "British \n"; } if ($Irish == "y") { $q2 = "Irish \n"; } if ($GypsyRoma == "y") { $q3 = "Gypsy and Roma \n"; } if ($EasternEurope == "y") { $q4 = "Eastern Europe \n"; } $q = $q1 . $q2 . $q3 . $q4; $todayis = date("l, F j, Y, g:i a") ; $attn = $attn; $subject = $attn; $feedback = stripcslashes($feedback); $message = " $todayis [EST] \n Attention: $attn (Rating: $rating) \n From: $nameis ($visitormail)\n Requested: $req \n Feedback: $feedback \n Additional Info : IP = $ip \n Browser = $httpagent \n Referral = $httpref "; $from = "From: $visitormail\r\n"; mail( "myemail@hotmail.com", "Whatever", "$message" ); $screenout = str_replace("\n", "<br/>", $message); ?> <p align="center"> <?php echo $screenout ?> </p> Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917147 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 I'm not sure the $message is supposed to be between the " ", I think you can just do mail("...","whatever",$message) Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917148 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 I tried ... but still. I am not able to receive the results to my email. it drives me nuts Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917151 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 are you sure you replaced myemail@hotmail.com" with your email would be stupid but I would be able to do something like that xD Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917152 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 hahha yes yes I have changed that to my email of course. Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917154 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 to begin what's the purpose off: $British = $_POST['Brtish']; $Irish= $_POST['Irish']; $GypsyRoma = $_POST['GypsyRoma']; $EasternEurope = $_POST['EasternEurope']; Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917155 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 Well as I said.. its an Application form, made in .DOC so I have to make it as an online form... and that part is where users could click the checkbox (square) to whichever ethnicity he/she belongs. Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917156 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 example: <td>Irish</td> <td><input type="checkbox" name="Irish" value="y" /></td> Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917157 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 I would make that different: <td>From where do you come?</td> <td><select name='fromwhere'> <option value='Irish'>Irish</option> <option value='Brittain'>Brittain</option> </select></td> And then you can call: $_POST['fromwhere'] and it will return the value you made. Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917160 Share on other sites More sharing options...
MatthewJ Posted September 12, 2009 Share Posted September 12, 2009 First... are you sure the server has send mail capability? try a very simple script to make sure... something like <?php mail("youremail@hotmail.com", "test email", "Just a test"); ?> Then double check that the emails are not just going to a spam folder(happens a lot with mail being sent to hotmail accounts with php) Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917162 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 ahh cool.. ok i will do that thanks BUT will that fix the issue with not being able to receive the results?? thanks MatthewJ Yes yes the server does have mail capability... I try that script in a bit Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917165 Share on other sites More sharing options...
BuCki Posted September 12, 2009 Author Share Posted September 12, 2009 I would make that different: <td>From where do you come?</td> <td><select name='fromwhere'> <option value='Irish'>Irish</option> <option value='Brittain'>Brittain</option> </select></td> ermm could I be using <input type="checkbox" INSTEAD of the drop down menu!? and if yes... how would the code/script be!? Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917167 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 12, 2009 Share Posted September 12, 2009 Why do you defenatly want to use a checkbox? If you want to I think your code was fine, but in that case users can check more then one value, you could also use radio buttons this has the same effect as a checkbox, but users can only check one button. Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917168 Share on other sites More sharing options...
MatthewJ Posted September 12, 2009 Share Posted September 12, 2009 Checkboxes should only be used if you are going to let someone select multiple items. Quote Link to comment https://forums.phpfreaks.com/topic/173952-online-application-form/#findComment-917169 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.