shadow_killer25 Active Member
Posts : 123 Reputation : 0 Join date : 2009-01-20
| Subject: Simple AC application form in PHP made by me Tue Mar 03, 2009 12:18 pm | |
| PHP Code - Code:
-
<?php $self = $_SERVER['PHP_SELF']; if (isset($_POST['submit'])) { $filename = "form.txt"; $open = fopen($filename, "a"); $name = $_POST['name']; $months = $_POST['month']; $skill = $_POST['skill']; $test = $_POST['test']; $anythingadd = $_POST['add']; $often = $_POST['often']; fwrite($open, "Name:\n$name\n"); fwrite($open, "How long have you been playing?\n$months\n"); fwrite($open, "Skill from 1-10\n$skill\n"); fwrite($open, "When can be tested\n$test\n"); fwrite($open, "Anything to add\n$anythingadd\n"); fwrite($open, "How often do you play\n$often\n\r"); fclose($open); echo "Thank you for submitting your form these are your answers<br>"; echo "$name<br>"; echo "$months<br>"; echo "$skill<br>"; echo "$test<br>"; echo "$anythingadd<br>"; echo "$often"; } ?>
Remember do not edit anything Here are the HTML code you can edit but not the names - Code:
-
<html> <head> <title>EC Application form</title> </head> <body> <form action="<?php $self ?>" method="POST"> Name:<br> <input type="text" name="name"><br> Time you have been playing:<br> <input type="text" name="month"><br> Your skill from 1-10:<br> <input type="text" name="skill"><br> When can you be tested?<br> <input type="text" name="test"><br> Anything to add?<br> <textarea name="add" cols="20"></textarea><br> How often do you play?<br> <input type="text" name="often"><br> <input type="reset" value="Reset"><input type="submit" name="submit" value="Submit"> </form> </body> </html>
preview http://sixzeal.co.cc/ac/form will be saved at http://sixzeal.co.cc/ac/form.txtsorry but there is no mail function | |
|
BenWasHere Ex EC
Posts : 401 Reputation : 15 Join date : 2009-01-18 Age : 30 Location : Christchurch, New Zealand
| Subject: Re: Simple AC application form in PHP made by me Wed Mar 04, 2009 8:58 pm | |
| | |
|
shadow_killer25 Active Member
Posts : 123 Reputation : 0 Join date : 2009-01-20
| Subject: Re: Simple AC application form in PHP made by me Thu Mar 05, 2009 1:05 am | |
| yup this will be the PHP code - Code:
-
<?php $self = $_SERVER['PHP_SELF']; if (isset($_POST['submit'])) { $filename = "applog.txt"; $open = fopen($filename, "a"); $name = $_POST['name']; $months = $_POST['month']; $skill = $_POST['skill']; $test = $_POST['test']; $anythingadd = $_POST['add']; $often = $_POST['often']; fwrite($open, "Name:\n$name\n"); fwrite($open, "How long have you been playing?\n$months\n"); fwrite($open, "Skill from 1-10\n$skill\n"); fwrite($open, "When can be tested\n$test\n"); fwrite($open, "Anything to add\n$anythingadd\n"); fwrite($open, "How often do you play\n$often\n\r"); fclose($open); echo "Thank you for submitting your form these are your answers<br>"; echo "$name<br>"; echo "$months<br>"; echo "$skill<br>"; echo "$test<br>"; echo "$anythingadd<br>"; echo "$often"; } ?>
changed the form.txt to applog.txt still learning mail function and trying to get it work | |
|
BenWasHere Ex EC
Posts : 401 Reputation : 15 Join date : 2009-01-18 Age : 30 Location : Christchurch, New Zealand
| Subject: Re: Simple AC application form in PHP made by me Thu Mar 05, 2009 5:06 am | |
| tyvm shadow | |
|
BenWasHere Ex EC
Posts : 401 Reputation : 15 Join date : 2009-01-18 Age : 30 Location : Christchurch, New Zealand
| Subject: Re: Simple AC application form in PHP made by me Thu Mar 05, 2009 5:42 am | |
| There is now a link on the main page of the website called "application logs"(its hiding just under the shoutBox) anyone can view it (for now) all credit goes to shadow! Cheers Ben | |
|
shadow_killer25 Active Member
Posts : 123 Reputation : 0 Join date : 2009-01-20
| Subject: Re: Simple AC application form in PHP made by me Thu Mar 05, 2009 11:25 am | |
| Well you can change the CSS for that and i'll try to get the PHP mail working | |
|
Sponsored content
| Subject: Re: Simple AC application form in PHP made by me | |
| |
|