I created a site with the help of HTML and PHP for myself to maintain database.
On my site, I have a form that has 3 radio buttons (1 for "Request for appointment", 2 for "Request for information", 3 for other purposes).
Everything is ok except for radio buttons.
My HTML code for the form:
HTML Code:
<FORM Method= "POST" action= "do_sendform.php" name= "Contact">
<p align= "center"> <font face= "Bell Gothic Std Black"> Reason for contact: </font> </p>
<p align= "center">
<input type= "radio" name= "DemandYou" value= "Demand meeting you"> <font face= "Bell Gothic Std Black"> Application for appointment</font>
<input type= "radio" name= "Intelligence" value= "Intelligence"> <font face= "Bell Gothic Std Black"> Inquiry </font>
<input type= "radio" name= "Other" value= "Other"> <font face= "Bell Gothic Std Black"> Other: </font> <input type= "text" name= "Other"> </p>
<p align= "center"> <font face= "Bell Gothic Std Black"> Your First & Last Name: </font> <br>
<INPUT Type= "text" name= "sender_name" size= 30>
</p>
<p align= "center"> <font face= "Bell Gothic Std Black"> Your email address: </font> <br>
<INPUT Type= "text" name= "sender_email" size= 30>
</p>
<p align= "center"> <font face= "Bell Gothic Std Black"> Message: </font> <br>
<textarea name= "message" cols= "63" rows= "8"> </textarea>
</p>
<p align= "center"> <font face= "Bell Gothic Std Black"> <INPUT type= "submit" value= "SEND"> </font> </p>
</FORM>
and the PHP code
PHP Code:
<?php
$msg .= "Sender E-Mail: \t $sender_email \n";
$msg .= "Message: \t $message \n \n";
$recipient = "xyz@gmail.com";
$mailheaders = "Need fragrance <> \n";
$mailheaders .= 'Reply-to: $sender_email \n \n ";
$subject = "subject: $contact \n \n";
Mail ($recipient, $subject, $msg, $mailheaders);
echo "<html> <head>";
echo "<title> Need fragrance - Contacts </title> </head> <body>;
echo "<h1 align=center> THANKS, $sender_name </h1>";
echo "<p align=center>";
echo "Your mail has been sent. </p>";
echo "</body> </html>";
?>
I tried all the tests with the radio buttons but depending on the selected radio button, the subject of the email sent is changed to one of the 3 titles listed above.
Bookmarks