The Gender field I want to be able to send them the right message if they enter 'M' for Male or 'F' for Female I want to be able to say something like 'Welcome 'Mr or Mrs' First Name and Last Name' in an echo statement.
Here is the code I have thus far.
I have this in the body of my welcome.php page
<?php if($Gender=="M") echo(" Welcom Mr.=\"Fname"\"Lname"\"); if($Gender=="F") echo(" Welcome Mrs.=\"Fname"\"Lname"\"); ?>
This is my index.html
this is the code I have with the body
<form action="welcome.php" method="post"> <h2><span class="required_notification">* Denotes Required Field</span> </h2> <p>First Name: <input type="text" name="Fname" maxlength="50" placeholder="First Name" required /> * </p> <p> Last Name <input type="text" name="Lname" maxlength="75" placeholder="Last Name" required /> *<br> <br> Sex (Enter 'M' for Male or 'F' for Female): <input type="text" name="Gender" maxlength="1" placeholder="'M' or 'F'" required /> * </p> <p> </p> <input type="submit" name="formSubmit" value="Submit" /> </form>
Nevertheless, it is not working. Please keep in mind I just started on this and I am not sure if Iknow what I doing. Well, then it is apparent I don't know what I am doing. Could someone please help me and point me in the right direction? Thank you in advance.