Jump to content

Online Application Form!?


BuCki

Recommended Posts

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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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)

 

 

Link to comment
Share on other sites

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!?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.