473,722 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with a form

Hi folks,

Can anyone help me with this form:

http://futurebydesign-music.com/_mem...ub_fbd_reg.php

I have followed to coding instructions aas closely as I can, but I am
getting errors about not filling in all the fields on the form correctly
when I test it. Is validating a form with radio buttons difficult?

I also wonder about my syntax for lines 185-192 & 268-282. It doesn't seem
that either of these ifelse functions is performing the test I want it to.

Maybe my coding is errant?

Regards,
CB.
Sep 29 '06 #1
2 1946
Hi,
If you can send your php code, I can help you to fix the error.

rgrds
Bye

Cerebral Believer ha escrito:
Hi folks,

Can anyone help me with this form:

http://futurebydesign-music.com/_mem...ub_fbd_reg.php

I have followed to coding instructions aas closely as I can, but I am
getting errors about not filling in all the fields on the form correctly
when I test it. Is validating a form with radio buttons difficult?

I also wonder about my syntax for lines 185-192 & 268-282. It doesn't seem
that either of these ifelse functions is performing the test I want it to.

Maybe my coding is errant?

Regards,
CB.
Sep 29 '06 #2
OK here is the code with a lot of HTML stripped out.

<?php
/* Script name: club_fbd_reg.ph p
* Description: Script that displays all the information passed from and
HTML form, checks it and displays it.
* This form needs to check that a username is already taken, and if not
write the users details to a database.
*/
?>

<html>
<head>

/* Loads of html ommitted, the main block of php code follows */

<tr>
<td class="formerro r" colspan="2">

<?php

$label_array = array ( 'first_name' ='First Name',
'last_name' ='Last Name',
'address_1' ='Address Line 1',
'address_2' ='Address Line 2',
'address_3' ='Address Line 3',
'town_city' ='Town/City',
'county_sp' ='County, State or Province',
'post_zip' ='Post Code/Zip Code',
'country' ='Country',
'email_1' ='Primary E-Mail Address',
'email_1v' ='Confirm Primary E-Mail Address',
'email_2' ='Alternate E-Mail Address',
'email_2v' ='Confirm Alternate E-Mail Address',
'int_code' ='International Code',
'area_code' ='Area Code',
'phone_num' ='Phone Number',
'extension' ='Extension',
'username' ='Desired Username',
'password' ='Password',
'club_fbdy' ='Join Club FBD?',
'club_fbdn' ='Join Club FBD?',
'mail_listy' ='Join Mailing List?',
'mail_listn' ='Join Mailing List?');
# Not sure how to handle the last four fields as they belong to two radio
boxes
# I was told I don't need the following line, but it is in the example in
the book I am using.
# foreach ($_POST as $field =$value)
/* CHECKS FOR BLANK FIELDS */
{
if ( $value == '' )
{
if (($field != 'address_2') or ($field != 'address_3') or ($field !=
'int_code') or ($field != 'extension') or ($field != 'club_fbdy') or ($field
!= 'club_fbdn') or ($field != 'mail_listy') or ($field != 'mail_listn'))
{
$blank_array[$field] = 'blank';
}
}
/* ******* */
/* CHECKS BAD FORMATTED DATA IN TEXT FIELDS */
/* LETTERS ONLY */
elseif ($field == 'first_name' or $field == 'last_name' or $field ==
'town_city' or $field == 'county_sp' or $field == 'country' )
{
if (!ereg("^[A-Za-z' \&\.-]{1,30}$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* I keep getting the error message that my fields are not all filled in,
but no fields are specified, and all teh fields appear to be filled in */
/* LETTERS AND NUMBERS - ADDRESSES */
elseif ($field == 'address_1' or $field == 'address_2' or $field ==
'address_3' )
{
if (!ereg("^[A-Za-z'0-9 -]{1,50}$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* LETTERS AND NUMBERS - PASWORD & USERNAME */
elseif ($field == 'username' or $field == 'password' )
{
if (!ereg("^[A-Za-z0-9]{1,15}$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* LETTERS AND NUMBERS ETC - E-MAIL ADDRESSES */
elseif ($field == 'email_1' or $field == 'email_1v' or $field ==
'email_2' or $field == 'email_2v' )
{
if (!ereg("^[A-Za-z0-9_@\.-]{1,50}$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* LETTERS AND NUMBERS - POST CODE */
elseif ($field == 'post_zip')
{
if (!ereg("^[A-Za-z0-9 -]......$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* NUMBERS ONLY - INTERNATIONAL CODE */
elseif ($field == 'int_code')
{
if (!ereg("[0-9]$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* NUMBERS ONLY - AREA CODE */
elseif ($field == 'area_code')
{
if (!ereg("[0-9]$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* NUMBERS ONLY - PHONE NUMBER */
elseif ($field == 'phone_num')
{
if (!ereg("[0-9]....$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* NUMBERS ONLY - EXTENSION */
elseif ($field == 'extension')
{
if (!ereg("[0-9]$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* CHECK E-MAIL ADDRESSES MATCH */
/* I added this but I don't think it is working */
if ($field == 'email_1v')
{
if ($_POST[$field] != $_POST['email_1'])
{
$mistyped_email[$field] = "bad";
}
}
/* CHECK E-MAIL ADDRESSES MATCH */
if ($field == 'email_2v')
{
if ($_POST[$field] != $_POST['email_2'])
{
$mistyped_email[$field] = "bad";
}
}
/* YES/NO FIELDS */
elseif ($field == 'club_fbdy' or $field == 'club_fbdn' or $field ==
'mail_listy' or $field == 'mail_listn' )
{
if (!ereg("[Yes|No]$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
/* SUBMIT/RESET FIELDS */
elseif ($field == 'Submit' or $field == 'Reset' )
{
if (!ereg("[Submit|Reset]$",$_POST[$field]) )
{
$bad_format[$field] = "bad";
}
}
}
/* ******* */
/* IF ANY FIELDS WERE NOT OK, DISPLAY AN ERROR MESSAGE AND FORM */
/* display message for missing information */
if (@sizeof($blank _array) 0 or @sizeof($bad_fo rmat) 0 or
@sizeof($mistyp ed_email) 0)
{
if (@sizeof($blank _array) 0)
{
echo "<b>You didn't fill in one or more required fields. You must
enter:</b><br/>";
/* display list of missing information */
foreach($blank_ array as $field =$value)
{
echo "&nbsp;&nbsp;&n bsp;{$label_arr ay[$field]}<br/>";
}
}
/* display message for bad information */
if (@sizeof($bad_f ormat) 0)
{
echo "<p/>One or more fields have information that appears to be
incorrect. Please correct the format for:</b><br/>";
/* display list of bad information */
foreach($bad_fo rmat as $field =$value)
{
echo "&nbsp;&nbsp;&n bsp;{$label_arr ay[$field]}<br/>";
}
}
/* display message e-mail fields that did not match */
/* not sure if this works */
if (@sizeof($misty ped_email) 0)
{
echo "<p/>One or more of the confirm e-mail address fields have
information that appears to be incorrect.
Please ensure you type your e-mail address exactly. Please
check:</b><br/>";
/* display list of bad information */
foreach($mistyp ed_email as $field =$value)
{
echo "&nbsp;&nbsp;&n bsp;{$label_arr ay[$field]}<br/>";
}
}
/* ******* */
/** redisplay form **/
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$address_1 = $_POST['address_1'];
$address_2 = $_POST['address_2'];
$address_3 = $_POST['address_3'];
$town_city = $_POST['town_city'];
$county_sp = $_POST['county_sp'];
$post_zip = $_POST['post_zip'];
$country = $_POST['country'];
$email_1 = $_POST['email_1'];
$email_1v = $_POST['email_1v'];
$email_2 = $_POST['email_2'];
$email_2v = $_POST['email_2v'];
$int_code = $_POST['int_code'];
$area_code = $_POST['area_code'];
$phone_num = $_POST['phone_num'];
$extension = $_POST['extension'];
$username = $_POST['username'];
$password = $_POST['password'];
$club_fbdy = $_POST['club_fbdy'];
$club_fbdn = $_POST['club_fbdn'];
$mail_listy = $_POST['mail_listy'];
$mail_listn = $_POST['mail_listn'];
echo "<p/><hr>
<form action='club_fb d_reg.php' method='POST'>
</td>
</tr>
<tr>
<td colspan='2'>
<p class='negsecti on'>
<b>Address Information</b></td>
</tr>
<tr>
<td>
{$label_array['first_name']}</td>
<td>
<input type='text' class='f_form' name='first_nam e' size='30'
value='$first_n ame' maxlength='30' title='First Name: valid characters: A-Z,
a-z, ', , -'/></td>
</tr>
<tr>

<td>
{$label_array['last_name']}</td>
<td>
<input type='text' class='f_form' name='last_name ' size='30'
maxlength='30' value='$last_na me' title='Last Name: valid characters: A-Z,
a-z, ', , -'/></td>
</tr>
<tr>
<td>
{$label_array['address_1']}<i(Include House/Flat Number)</i></td>
<td>
<input type='text' class='f_form' name='address_1 ' size='50'
maxlength='50' value='$address _1' title='Address 1: valid characters A-Z,
a-z, ', 0-9, ,-'/></td>
</tr>
<tr>
<td>
{$label_array['address_2']}</td>
<td>
<input type='text' class='f_form' name='address_2 ' size='50'
maxlength='50' value='$address _2' title='Address 2: valid characters A-Z,
a-z, ', 0-9, ,-'/></td>
</tr>
<tr>
<td>
{$label_array['address_3']}</td>
<td>
<input type='text' class='f_form' name='address_3 ' size='50'
maxlength='50' value='$address _3' title='Address 3: valid characters A-Z,
a-z, ', 0-9, ,-'/></td>
</tr>
<tr>
<td>
{$label_array['town_city']}</td>
<td>
<input type='text' class='f_form' name='town_city ' size='30'
maxlength='30' value='$town_ci ty' title='Town/City: valid characters: A-Z,
a-z, ', , -'/></td>
</tr>
<tr>
<td>
{$label_array['county_sp']}</td>
<td>
<input type='text' class='f_form' name='county_sp ' size='30'
maxlength='30' value='$county_ sp' title='County, State or Province: valid
characters: A-Z, a-z, ', , -'/></td>
</tr>
<tr>
<td>
{$label_array['post_zip']}</td>
<td>
<input type='text' class='f_form' name='post_zip' size='20'
maxlength='20' value='$post_zi p' title='Post/Zip Code: valid characters A-Z,
a-z, 0-9'/></td>
</tr>
<tr>
<td>
{$label_array['country']}</td>
<td>
<select size='1' class='f_form' name='country' size='30' maxlength='50'
value='$country '><option value=''>Please Select</option><option
value='Afghanis tan'>Afghanista n</option><option
value='Albania' >Albania</option><option
value='Algeria' >Algeria</option><option value='American Samoa'>American
Samoa</option><option value='Andorra' >Andorra</option><option
value='Angola'> Angola</option><option
value='Anguilla '>Anguilla</option><option
value='Antarcti ca'>Antarctica</option><option value='Antigua and
Barbuda'>Antigu a and Barbuda</option><option
value='Argentin a'>Argentina</option><option
value='Armenia' >Armenia</option><option value='Aruba'>A ruba</option><option
value='Australi a'>Australia</option><option
value='Austria' >Austria</option><option
value='Azerbaid jan'>Azerbaidja n</option><option
value='Bahamas' >Bahamas</option><option
value='Bahrain' >Bahrain</option><option
value='Banglade sh'>Bangladesh</option><option
value='Barbados '>Barbados</option><option
value='Belarus' >Belarus</option><option
value='Belgium' >Belgium</option><option
value='Belize'> Belize</option><option value='Benin'>B enin</option><option
value='Bermuda' >Bermuda</option><option
value='Bhutan'> Bhutan</option><option
value='Bolivia' >Bolivia</option><option
value='Bosnia-Herzegovina'>Bo snia-Herzegovina</option><option
value='Botswana '>Botswana</option><option value='Bouvet Island'>Bouvet
Island</option><option value='Brazil'> Brazil</option><option value='British
Indian Ocean Territory'>Brit ish Indian Ocean Territory</option><option
value='Brunei Darussalam'>Bru nei Darussalam</option><option
value='Bulgaria '>Bulgaria</option><option value='Burkina Faso'>Burkina
Faso</option><option value='Burundi' >Burundi</option><option
value='Cambodia '>Cambodia</option><option
value='Cameroon '>Cameroon</option><option
value='Canada'> Canada</option><option value='Cape Verde'>Cape
Verde</option><option value='Cayman Islands'>Cayman Islands</option><option
value='Central African Republic'>Centr al African Republic</option><option
value='Chad'>Ch ad</option><option value='Chile'>C hile</option><option
value='China'>C hina</option><option value='Christma s Island'>Christm as
Island</option><option value='Cocos (Keeling) Islands'>Cocos (Keeling)
Islands</option><option value='Colombia '>Colombia</option><option
value='Comoros' >Comoros</option><option value='Congo'>C ongo</option><option
value='Cook Islands'>Cook Islands</option><option value='Costa Rica'>Costa
Rica</option><option value='Croatia' >Croatia</option><option
value='Cuba'>Cu ba</option><option value='Cyprus'> Cyprus</option><option
value='Czech Republic'>Czech Republic</option><option
value='Denmark' >Denmark</option><option
value='Djibouti '>Djibouti</option><option
value='Dominica '>Dominica</option><option value='Dominica n
Republic'>Domin ican Republic</option><option value='East Timor'>East
Timor</option><option value='Ecuador' >Ecuador</option><option
value='Egypt'>E gypt</option><option value='El Salvador'>El
Salvador</option><option value='Equatori al Guinea'>Equator ial
Guinea</option><option value='Estonia' >Estonia</option><option
value='Ethiopia '>Ethiopia</option><option value='Falkland Islands'>Falkla nd
Islands</option><option value='Faroe Islands'>Faroe Islands</option><option
value='Fiji'>Fi ji</option><option value='Finland' >Finland</option><option
value='Former Czechoslovakia' >Former Czechoslovakia</option><option
value='Former USSR'>Former USSR</option><option
value='France'> France</option><option value='France (European
Territory)'>Fra nce (European Territory)</option><option value='French
Guyana'>French Guyana</option><option value='French Southern
Territories'>Fr ench Southern Territories</option><option
value='Gabon'>G abon</option><option value='Gambia'> Gambia</option><option
value='Georgia' >Georgia</option><option
value='Germany' >Germany</option><option value='Ghana'>G hana</option><option
value='Gibralta r'>Gibraltar</option><option value='Great Britain'>Great
Britain</option><option value='Greece'> Greece</option><option
value='Greenlan d'>Greenland</option><option
value='Grenada' >Grenada</option><option value='Guadelou pe
(French)'>Guade loupe (French)</option><option value='Guam (USA)'>Guam
(USA)</option><option value='Guatemal a'>Guatemala</option><option
value='Guinea'> Guinea</option><option value='Guinea Bissau'>Guinea
Bissau</option><option value='Guyana'> Guyana</option><option
value='Haiti'>H aiti</option><option value='Heard and McDonald Islands'>Heard
and McDonald Islands</option><option
value='Honduras '>Honduras</option><option value='Hong Kong'>Hong
Kong</option><option value='Hungary' >Hungary</option><option
value='Iceland' >Iceland</option><option value='India'>I ndia</option><option
value='Indonesi a'>Indonesia</option><option
value='Iran'>Ir an</option><option value='Iraq'>Ir aq</option><option
value='Ireland' >Ireland</option><option
value='Israel'> Israel</option><option value='Italy'>I taly</option><option
value='Ivory Coast (Cote D'Ivoire)'>Ivor y Coast (Cote
D'Ivoire)</option><option value='Jamaica' >Jamaica</option><option
value='Japan'>J apan</option><option value='Jordan'> Jordan</option><option
value='Kazakhst an'>Kazakhstan</option><option
value='Kenya'>K enya</option><option
value='Kiribati '>Kiribati</option><option
value='Kuwait'> Kuwait</option><option
value='Kyrgyzst an'>Kyrgyzstan</option><option
value='Laos'>La os</option><option value='Latvia'> Latvia</option><option
value='Lebanon' >Lebanon</option><option
value='Lesotho' >Lesotho</option><option
value='Liberia' >Liberia</option><option value='Libya'>L ibya</option><option
value='Liechten stein'>Liechten stein</option><option
value='Lithuani a'>Lithuania</option><option
value='Luxembou rg'>Luxembourg</option><option
value='Macau'>M acau</option><option
value='Macedoni a'>Macedonia</option><option
value='Madagasc ar'>Madagascar</option><option
value='Malawi'> Malawi</option><option
value='Malaysia '>Malaysia</option><option
value='Maldives '>Maldives</option><option value='Mali'>Ma li</option><option
value='Malta'>M alta</option><option value='Marshall Islands'>Marsha ll
Islands</option><option value='Martiniq ue (French)'>Marti nique
(French)</option><option value='Mauritan ia'>Mauritania</option><option
value='Mauritiu s'>Mauritius</option><option
value='Mayotte' >Mayotte</option><option
value='Mexico'> Mexico</option><option
value='Micrones ia'>Micronesia</option><option
value='Moldavia '>Moldavia</option><option
value='Monaco'> Monaco</option><option
value='Mongolia '>Mongolia</option><option
value='Montserr at'>Montserrat</option><option
value='Morocco' >Morocco</option><option
value='Mozambiq ue'>Mozambique</option><option
value='Myanmar' >Myanmar</option><option
value='Namibia' >Namibia</option><option value='Nauru'>N auru</option><option
value='Nepal'>N epal</option><option
value='Netherla nds'>Netherland s</option><option value='Netherla nds
Antilles'>Nethe rlands Antilles</option><option value='Neutral Zone'>Neutral
Zone</option><option value='New Caledonia (French)'>New Caledonia
(French)</option><option value='New Zealand'>New Zealand</option><option
value='Nicaragu a'>Nicaragua</option><option
value='Niger'>N iger</option><option value='Nigeria' ></option><option
value='Niue'>Ni ue</option><option value='Norfolk Island'>Norfolk
Island</option><option value='North Korea'>North Korea</option><option
value='Northern Mariana Islands'>Northe rn Mariana Islands</option><option
value='Norway'> Norway</option><option value='Oman'>Om an</option><option
value='Pakistan '>Pakistan</option><option
value='Palau'>P alau</option><option value='Panama'> Panama</option><option
value='Papua New Guinea'>Papua New Guinea</option><option
value='Paraguay '>Paraguay</option><option value='Peru'>Pe ru</option><option
value='Philippi nes'>Philippine s</option><option value='Pitcairn
Island'>Pitcair n Island</option><option
value='Poland'> Poland</option><option value='Polynesi a (French)'>Polyn esia
(French)</option><option value='Portugal '>Portugal</option><option
value='Puerto Rico'>Puerto Rico</option><option
value='Qatar'>Q atar</option><option value='Reunion (French)'>Reuni on
(French)</option><option value='Romania' >Romania</option><option
value='Russian Federation'>Rus sian Federation</option><option
value='Rwanda'> Rwanda</option><option value='S. Georgia &amp; S. Sandwich
Isls.'>S. Georgia &amp; S. Sandwich Isls.</option><option value='Saint
Helena'>Saint Helena</option><option value='Saint Kitts &amp; Nevis
Anguilla'>Saint Kitts &amp; Nevis Anguilla</option><option value='Saint
Lucia'>Saint Lucia</option><option value='Saint Pierre and Miquelon'>Saint
Pierre and Miquelon</option><option value='Saint Tome and Principe'>Saint
Tome and Principe</option><option value='Saint Vincent &amp;
Grenadines'>Sai nt Vincent &amp; Grenadines</option><option
value='Samoa'>S amoa</option><option value='San Marino'>San
Marino</option><option value='Saudi Arabia'>Saudi Arabia</option><option
value='Senegal' >Senegal</option><option
value='Seychell es'>Seychelles</option><option value='Sierra Leone'>Sierra
Leone</option><option value='Singapor e'>Singapore</option><option
value='Slovak Republic'>Slova k Republic</option><option
value='Slovenia '>Slovenia</option><option value='Solomon Islands'>Solomo n
Islands</option><option value='Somalia' >Somalia</option><option value='South
Africa'>South Africa</option><option value='South Korea'>South
Korea</option><option value='Spain'>S pain</option><option value='Sri
Lanka'>Sri Lanka</option><option value='Sudan'>S udan</option><option
value='Suriname '>Suriname</option><option value='Svalbard and Jan Mayen
Islands'>Svalba rd and Jan Mayen Islands</option><option
value='Swazilan d'>Swaziland</option><option
value='Sweden'> Sweden</option><option
value='Switzerl and'>Switzerlan d</option><option
value='Syria'>S yria</option><option
value='Tadjikis tan'>Tadjikista n</option><option
value='Taiwan'> Taiwan</option><option
value='Tanzania '>Tanzania</option><option
value='Thailand '>Thailand</option><option value='Togo'>To go</option><option
value='Tokelau' >Tokelau</option><option value='Tonga'>T onga</option><option
value='Trinidad and Tobago'>Trinida d and Tobago</option><option
value='Tunisia' >Tunisia</option><option
value='Turkey'> Turkey</option><option
value='Turkmeni stan'>Turkmenis tan</option><option value='Turks and Caicos
Islands'>Turks and Caicos Islands</option><option
value='Tuvalu'> Tuvalu</option><option value='Uganda'> Uganda</option><option
value='Ukraine' >Ukraine</option><option value='United Arab Emirates'>Unite d
Arab Emirates</option><option value='United Kingdom'>United
Kingdom</option><option value='United States'>United States</option><option
value='Uruguay' >Uruguay</option><option
value='Uzbekist an'>Uzbekistan</option><option
value='Vanuatu' >Vanuatu</option><option value='Vatican City State'>Vatican
City State</option><option value='Venezuel a'>Venezuela</option><option
value='Vietnam' >Vietnam</option><option value='Virgin Islands
(British)'>Virg in Islands (British)</option><option value='Virgin Islands
(USA)'>Virgin Islands (USA)</option><option value='Wallis and Futuna
Islands'>Wallis and Futuna Islands</option><option value='Western
Sahara'>Western Sahara</option><option value='Yemen'>Y emen</option><option
value='Yugoslav ia'>Yugoslavia</option><option
value='Zaire'>Z aire</option><option value='Zambia'> Zambia</option><option
value='Zimbabwe '>Zimbabwe</option><option
value='OTHER'>O THER</option></select></td>
</tr>
<tr>
<td colspan='2'>
<p class='negsecti on'>
<b>E-Mail Addresses</b></td>
</tr>
<tr>
<td>
<p align='left'/>{$label_arra y['email_1']}<p
align='right'/><i>{$label_arr ay['email_1v']}</i></td>
<td>
<input type='text' class='f_form' name='email_1' size='50'
maxlength='50' value='$email_1 ' title='E-mail address: valid characters A-Z,
a-z, 0-9,_@.-'/><p/>
<input type='text' class='f_form' name='email_1v' size='50'
maxlength='50' value='$email_1 v' title='E-mail address: valid characters
A-Z, a-z, 0-9,_@.-'/></td>
</tr>
<tr>
<td>
<p align='left'/>{$label_arra y['email_2']}<p
align='right'/><i>{$label_arr ay['email_2v']}</i></td>
<td>
<input type='text' class='f_form' name='email_2' size='50'
maxlength='50' value='$email_2 ' title='E-mail address: valid characters A-Z,
a-z, 0-9,_@.-'/><p/>
<input type='text' class='f_form' name='email_2v' size='50'
maxlength='50' value='$email_2 v' title='E-mail address: valid characters
A-Z, a-z, 0-9,_@.-'/></td>
</tr>
<tr>
<td colspan='2'>
<p class='negsecti on'>
<b>Phone Details</b></td>
</tr>
<tr>
<td>
{$label_array['int_code']}</td>
<td>
<input type='text' class='f_form' name='int_code' value='$int_cod e'
size='3' maxlength='3' title='Internat ional Code: valid characters 0-9, (3
digits)'/></td>
</tr>
<tr>
<td>
{$label_array['area_code']}</td>
<td>
<input type='text' class='f_form' name='area_code ' value='$area_co de'
size='5' maxlength='5' title='Area Code: valid characters 0-9, (5
digits)'/></td>
</tr>
<tr>
<td>
{$label_array['phone_num']}</td>
<td>
<input type='text' class='f_form' name='phone_num ' value='$phone_n um'
size='8' maxlength='8' title='Phone Number: valid characters 0-9, (8
digits)'/></td>
</tr>
<tr>
<td>
{$label_array['extension']}</td>
<td>
<input type='text' class='f_form' name='extension ' value='$extensi on'
size='4' maxlength='4' title='Phone Number: valid characters 0-9, (4
digits)'/></td>
</tr>
<tr>
<td colspan='2'>
<p class='negsecti on'>
<b>Member Information</b></td>
</tr>
<!-- {$label_array[' ']} -->
<tr>
<td>
{$label_array['username']}</td>
<td>
<input type='text' class='f_form' name='username' size='15'
maxlength='15' value='$usernam e' title='Username : valid characters A-Z, a-z,
0-9'/></td>
</tr>
<tr>
<td>
{$label_array['password']}</td>
<td>
<input type='password' class='f_form' name='password' value='$passwor d'
size='15' maxlength='15' title='Password : valid characters A-Z, a-z,
0-9'/></td>
</tr>
<tr>
<td>
{$label_array['club_fbdy']}</td>
<td>
Yes<input type='radio' class='f_form' checked='checke d' name='club_fbd'
value='Yes'/>/No<input type='radio' name='club_fbd' value='No''/></td>
</tr>
<tr>
<td>
{$label_array['mail_listy']}</td>
<td>
Yes<input type='radio' class='f_form' value='Yes' checked='checke d'
name='mail_list '/>/No<input type='radio' name='mail_list ' value='No''/></td>
</tr>
</table>
<p align='center'/><input type='submit' value='Submit'
name='Submit'/><input type='reset' value='Reset' name='Reset'/></form>

/* More html snipped */

</table>
<!-- #EndTemplate -->";
exit();
echo "Welcome";
}
?>

</body>

</html>
<we*******@gmai l.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Hi,
If you can send your php code, I can help you to fix the error.

rgrds
Bye

Cerebral Believer ha escrito:
>Hi folks,

Can anyone help me with this form:

http://futurebydesign-music.com/_mem...ub_fbd_reg.php

I have followed to coding instructions aas closely as I can, but I am
getting errors about not filling in all the fields on the form correctly
when I test it. Is validating a form with radio buttons difficult?

I also wonder about my syntax for lines 185-192 & 268-282. It doesn't
seem
that either of these ifelse functions is performing the test I want it
to.

Maybe my coding is errant?

Regards,
CB.

Sep 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
40753
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
5
4605
by: Tyler Style | last post by:
Hullo - looking for a little advice here. I have a form on a page in one domain submitting to a cgi in another domain. Weirdly, on some Windows XP systems, a form on the page fails to submit/post properly to the cgi and users get the message from IE that it "Cannot find server: The page cannot be displayed The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to...
19
3140
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form (nested), three list views, one tree control with up to 30,000 nodes, maybe 15 comboboxes (half of which have a large recordset as rowsource), 20 or so buttons and around 30 text boxes (not to mention the images, labels, etc and around 1000 lines...
5
4003
by: Scott | last post by:
I have a customer that had developed an Access97 application to track their business information. The application grew significantly and they used the Upsizing Wizard to move the tables to SQL 2000. Of course there were no modifications made to the queries and they noticed significant performance issues. They recently upgraded the application to Access XP expecting the newer version to provide performance benefits and now queries take...
10
2412
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
17
2485
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control 'Button19' of type 'Button' must be placed inside a form tag with runat=server Can the IDE not do what it is supposed to do. It seems that it is a fight to make it do anything or did I do something wrong? It would seem silly to have to create a...
3
1332
by: The One | last post by:
Have created a form to pop up with 2 option I then wish to write the text that is in the option button chose back to the original form using the code below but it gives me an exception error so could any please help me. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim frm As Form1 Dim text As String
8
6712
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and contains a few controls anchored to the sides of the form. "frmChild" inherits from "frmBase"... and the controls appear on the inherited form as expected. However things start going wrong when I place addition controls on the "frmChild" form. When I...
3
2755
by: google | last post by:
I'm developing an application for use within my company in Access 2003. I'm new to '03, the application I did for my former employer was in '97. The two applications have similar functionality (we're sales offices, and I'm doing things such as associate directories, commission calculations, order tracking, etc.). 2003 seems to have a few extra features, but I seem to continually run in to oddities that seem like they SHOULD work, but...
1
1928
by: Wes Brooks | last post by:
Hello expert, Please help me with the following problems. I have spent ages to resolve them but no luck. I have two forms. (1) "Document Reception Input Form" is the main form. The search field Document ID is unbound combo box. The table is Documents. (2) "Document Reception Subform" is the sub form in tabular form. The linked field is DocID. The table is DocumentReception.
0
8867
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9239
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9158
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3208
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.