I'm looking for someone that knows how to setup a basic HTML layout that will use a php file or not in which there will be 10 Questions. The boxes for text will be of enough to put in a few sentences as needed to place answers in and once these answers are all filled in click Submit and it sends the questions along side the results to an email of my choice.
I've set up a few feedback forms from templates I've found online but editing them so far has drove me nuts as the form doesn't seem to be sending. If you know how to do this please PM me...you can just put in temp questions and a temp email I'll edit them later.
I only need a total of 10 Question slots
This is basically going to be used on a site that has full up to date php versions etc etc..so don't worry about that.
Thanks
Here is the code if someone can see what is wrong.
This is the html file named - Tier2Application.html
<tbody><tr> <td valign="top"> <label for="age">What is your age? </label> </td> <td valign="top"> <input type="text" name="age" maxlength="50" size="30"> </td> </tr>
<tr> <td valign="top" "=""> <label for="Time_Zone">What Time Zone/Country do you live in? </label> </td> <td valign="top"> <input type="text" name="Time_Zone" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top"> <label for="Extra_abilities">What other servers do you currently have extra abilities with ie: VIP, Donator, Admin etc etc? </label> </td> <td valign="top"> <textarea type="text" name="Extra_abilities" maxlength="1000" cols="25" rows="6"><textarea> </td>
</tr> <tr> <td valign="top"> <label for="position">Tell us why you think you should hold this position.</label> </td> <td valign="top"> <textarea type="text" name="position" maxlength="1000" cols="30" rows="6"><textarea> </td> </tr> <tr> <td valign="top"> <label for="dedicate">How much time do you dedicate to our Servers in a week?</label> </td> <td valign="top"> <input name="dedicate" maxlength="70" size="30"> </td> <tr> <td valign="top"> <label for="improve">Tell us how you could help us to improve our community and servers.</label> </td> <td valign="top"> <textarea type="text" name="improve" maxlength="1000" cols="30" rows="6"><textarea> </td> </tr> <tr> <td valign="top"> <label for="Opinion">What do you think of the servers at this time?</label> </td> <td valign="top"> <textarea type="text" name="Opinion" maxlength="1000" cols="30" rows="6"><textarea> </td> </tr> <tr> <td valign="top"> <label for="Duration">How long have you been a part of this function?</label> </td> <td valign="top"> <textarea type="text" name="Duration" maxlength="1000" cols="30" rows="6"><textarea> </td> </tr> <tr> <td valign="top"> <label for="Rep_Thread">Do you have a site? If so please provide URL.</label> </td> <td valign="top"> <textarea type="text" name="Rep_Thread" maxlength="1000" cols="30" rows="6"><textarea> </td> </tr> <tr> <td valign="top"> <label for="populate">What suggestions would you give to enhance the servers to help populate them more?</label> </td> <td valign="top"> <textarea type="text" name="populate" maxlength="1000" cols="30" rows="6"><textarea> </td> </tr>
// CHANGE THE TWO LINES BELOW $webmaster_email = "[email protected]";
$email_subject = "Tier2 Application";
function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.
"; echo $error."
"; echo "Please go back and fix these errors.
"; die(); }
// validation expected data exists if(!isset($_POST['age']) || !isset($_POST['Time_Zone']) || !isset($_POST['Extra_abilities']) || !isset($_POST['position']) || !isset($_POST['dedicate']) || !isset($_POST['improve']) || !isset($_POST['Opinion']) || !isset($_POST['Duration']) || !isset($_POST['Rep_Thread']) || !isset($_POST['populate'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); }
If you are willing to go to approx $200, then as mentioned in your other thread I think a refurbished Pixel 8 will be a great deal that will last you for years.
I recently recommended that to someone at work, he was on a strict £200 budget, which got him an excellent conditioned refurbished Pixel 8 here. He's since told me its the best phone he's ever had and feels its a massive upgrade over his old Samsung A series device.
I don't know the sites which deal in refurbished devices in the US, however I’m sure you will have some options like we do here. Failing that Ebay is also quite good in my experience.
If you wanted something a bit cheaper, then you could maybe go for an older Pixel 7, these will still get security updates until the end of 2027. Even after that you have good third party OS support from LineageOS.
It doesn't have to be a Pixel though, you can buy many older devices for a good deal that would be better than a new $100 phone and flash LineageOS to them: https://wiki.lineageos.org/devices/
I don't use one drive, but then I don't use any cloud storage, not even Icloud on my mac.
If I did use cloud storage, then I would not use One drive, not because there is anything wrong with it, but because I can use Icloud.
The only reason I see to use one drive is if your job requires you to have access to it
Not built in, which is not a bad thing. There are ways of adding cloud storage to it, Dropbox is the most well know that also have a client for Linux, but there are others.
Question
sava700
I'm looking for someone that knows how to setup a basic HTML layout that will use a php file or not in which there will be 10 Questions. The boxes for text will be of enough to put in a few sentences as needed to place answers in and once these answers are all filled in click Submit and it sends the questions along side the results to an email of my choice.
I've set up a few feedback forms from templates I've found online but editing them so far has drove me nuts as the form doesn't seem to be sending. If you know how to do this please PM me...you can just put in temp questions and a temp email I'll edit them later.
I only need a total of 10 Question slots
This is basically going to be used on a site that has full up to date php versions etc etc..so don't worry about that.
Thanks
Here is the code if someone can see what is wrong.
This is the html file named - Tier2Application.html
here is the php file named html_form_send.php
<?php
if(isset($_POST['email'])) {
// CHANGE THE TWO LINES BELOW
$webmaster_email = "[email protected]";
$email_subject = "Tier2 Application";
function died($error) {
// your error code can go here
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
echo "These errors appear below.
";
echo $error."
";
echo "Please go back and fix these errors.
";
die();
}
// validation expected data exists
if(!isset($_POST['age']) ||
!isset($_POST['Time_Zone']) ||
!isset($_POST['Extra_abilities']) ||
!isset($_POST['position']) ||
!isset($_POST['dedicate']) ||
!isset($_POST['improve']) ||
!isset($_POST['Opinion']) ||
!isset($_POST['Duration']) ||
!isset($_POST['Rep_Thread']) ||
!isset($_POST['populate'])) {
died('We are sorry, but there appears to be a problem with the form you submitted.');
}
$age = $_POST['age']; // required
$Time_Zone = $_POST['Time_Zone']; // required
$Extra_abilities = $_POST['Extra_abilities']; // required
$position = $_POST['position']; // required
$dedicate = $_POST['dedicate']; // required
$improve = $_POST['improve']; // required
$Opinion = $_POST['Opinion']; // required
$Duration = $_POST['Duration']; // required
$Rep_Thread = $_POST['Rep_Thread']; // required
$populate = $_POST['populate']; // required
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';[/size][/font]
[font="Verdana"][size="2"] }
if(strlen($error_message) > 0) {
died($error_message);
}
$email_message = "Form details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "First Name: ".clean_string($first_name)."\n";
$email_message .= "Last Name: ".clean_string($Time_Zone)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "position: ".clean_string($position)."\n";
$email_message .= "dedicate: ".clean_string($dedicate)."\n";
$email_message .= "improve: ".clean_string($improve)."\n";
$email_message .= "Opinion: ".clean_string($Opinion)."\n";
$email_message .= "Duration: ".clean_string($Duration)."\n";
$email_message .= "Rep_Thread: ".clean_string($Rep_Thread)."\n";
$email_message .= "populate: ".clean_string($populate)."\n";
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
<!-- place your own success html below -->
Thank you for the application. We will be in touch with you very soon.
<?php
die();
?>
[/CODE]
Be sure to remove this from the code above at the bottom cause for some stupid reason it keeps adding it to the code
/size /font font=verdana size=2 ALL THIS WITHOUT THE BRACKETS...damn stuff!!</textarea></td></tr></tbody></table></form>
Link to comment
https://www.neowin.net/forum/topic/1079759-help-making-a-qa-form/Share on other sites
12 answers to this question
Recommended Posts