This is probably a very simple question to answer, but I am not sure if this is the correct code and where i need to put it.
What I want to do is issue my customers with a password that they have to put in the password text area of my survey form.ie. "humptydumpty" If they enter it incorrectly they will not be able to submit the form, and will be informed to retry password. do I need to make textarea3 a variable ie $textarea3 and an if statement if $textarea3 == "humptydumty" submit else echo "please retry password"
If this is action is correct could you let me know how to right the code correctly, cos I still haven't got the hang of the {} () stuff. Thanks.
Part of my HTML code is as follows, and my PHP is below.
<label>Password
<input type="password" name="textfield3" />
</label>
</p>
<p align="center">
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
<p class="style1"> </p>
<?php
$Questiona = $_POST['Questiona'] ;
$Questionb = $_POST['Questionb'] ;
$Questionc = $_POST['Questionc'] ;
$Questiond = $_POST['Questiond'] ;
$Questione = $_POST['Questione'] ;
$textfield = $_POST['textfield'] ;
$textfield2 = $_POST['textfield2'] ;
$textfield3 = $_POST['textfield3'] ;
$message = "Questiona: $Questiona.\n Questionb: $Questionb.\n Questionc: $Questionc.\n Questiond: $Questiond.\n Questione: $Questione.\n textfield: $textfield.\n textfield2: $textfield2.\n textfield3: $textfield3";
mail( "
shonah@shonah.fslife.co.uk", "Feedback Form Results",
$message, "From: $textfield2" );
header( "Location:
http://www.mywebsitename.com/thankyou.php" );
?>