Jump to content

PHP form with radio buttons- please guide


Kate v.

Recommended Posts

hi hi

 

I've created a form, and the php code works perfectly, for the name, email and comment field. But I'm not sure how the code should look for the three radio buttons that are on my form.

 

 

Please help, i'd appreciate it!!

 

here is the code with the variables:

 

 

 

 

/* Data Variables */

 

$email = $_POST['email'];

$name = $_POST['name'];

$surname = $_POST['surname'];

$productcode = $_POST['productcode'];

$method = $_POST['method'];

 

 

 

$body = <<

 


 

Name: $name

 

Surname: $surname

 

Email: $email

 

Codes: $productcode

 

Credit: $credit

 

Transfer: $transfer

 

CHeque: $cheque

 

 

EOD;

 

 

$headers = "From: $email\r\n";

$headers .= "Content-type: text/html\r\n";

$success = mail($webMaster, $emailSubject, $body,

$headers);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...