Forum Moderators: coopster

Message Too Old, No Replies

PHP mailto form problem w/ radio button

fields need to be validated

         

afrancke

8:47 pm on Jun 7, 2005 (gmt 0)



I am putting this form based on a template Ive used in the past but not for radio buttons... can anyone have a look at it and see what i need to fix on it so that the radio/checkbox fields are validated the same way the text fields are?

Thanks!

[edited by: jatar_k at 9:23 pm (utc) on June 7, 2005]
[edit reason] no urls thanks [/edit]

dreamcatcher

8:58 pm on Jun 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forum afrancke. :)

Personal URLs are not allowed on this forum I`m afraid. However I took a look at your code and a quick example is:

<INPUT NAME="workstatus" TYPE="radio" VALUE="">

Change this to either:

<INPUT NAME="workstatus" TYPE="radio" VALUE="1">
<INPUT NAME="workstatus" TYPE="radio" VALUE="sometext">

IN your code:

$workstatus = $_POST['workstatus'];

Then:

if (empty($workstatus))
{
//error message
}

Hope that helps.

dc