You are here: Re: Problems with a form « All PHP « IT news, forums, messages
Re: Problems with a form

Posted by Cerebral Believer on 10/11/51 11:59

OK here is the code with a lot of HTML stripped out.

<?php
/* Script name: club_fbd_reg.php
* 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="formerror" 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_format) > 0 or
@sizeof($mistyped_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;&nbsp;{$label_array[$field]}<br/>";
}
}
/* display message for bad information */
if (@sizeof($bad_format) > 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_format as $field => $value)
{
echo "&nbsp;&nbsp;&nbsp;{$label_array[$field]}<br/>";
}
}
/* display message e-mail fields that did not match */
/* not sure if this works */
if (@sizeof($mistyped_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($mistyped_email as $field => $value)
{
echo "&nbsp;&nbsp;&nbsp;{$label_array[$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_fbd_reg.php' method='POST'>
</td>
</tr>
<tr>
<td colspan='2'>
<p class='negsection'>
<b>Address Information</b></td>
</tr>
<tr>
<td>
{$label_array['first_name']}</td>
<td>
<input type='text' class='f_form' name='first_name' size='30'
value='$first_name' maxlength='30' title='First Name: valid characters: A-Z,
a-z, &#39;, , -'/></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_name' title='Last Name: valid characters: A-Z,
a-z, &#39;, , -'/></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, &#39;, 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, &#39;, 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, &#39;, 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_city' title='Town/City: valid characters: A-Z,
a-z, &#39;, , -'/></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, &#39;, , -'/></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_zip' 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='Afghanistan'>Afghanistan</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='Antarctica'>Antarctica</option><option value='Antigua and
Barbuda'>Antigua and Barbuda</option><option
value='Argentina'>Argentina</option><option
value='Armenia'>Armenia</option><option value='Aruba'>Aruba</option><option
value='Australia'>Australia</option><option
value='Austria'>Austria</option><option
value='Azerbaidjan'>Azerbaidjan</option><option
value='Bahamas'>Bahamas</option><option
value='Bahrain'>Bahrain</option><option
value='Bangladesh'>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'>Benin</option><option
value='Bermuda'>Bermuda</option><option
value='Bhutan'>Bhutan</option><option
value='Bolivia'>Bolivia</option><option
value='Bosnia-Herzegovina'>Bosnia-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'>British Indian Ocean Territory</option><option
value='Brunei Darussalam'>Brunei 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'>Central African Republic</option><option
value='Chad'>Chad</option><option value='Chile'>Chile</option><option
value='China'>China</option><option value='Christmas Island'>Christmas
Island</option><option value='Cocos (Keeling) Islands'>Cocos (Keeling)
Islands</option><option value='Colombia'>Colombia</option><option
value='Comoros'>Comoros</option><option value='Congo'>Congo</option><option
value='Cook Islands'>Cook Islands</option><option value='Costa Rica'>Costa
Rica</option><option value='Croatia'>Croatia</option><option
value='Cuba'>Cuba</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='Dominican
Republic'>Dominican Republic</option><option value='East Timor'>East
Timor</option><option value='Ecuador'>Ecuador</option><option
value='Egypt'>Egypt</option><option value='El Salvador'>El
Salvador</option><option value='Equatorial Guinea'>Equatorial
Guinea</option><option value='Estonia'>Estonia</option><option
value='Ethiopia'>Ethiopia</option><option value='Falkland Islands'>Falkland
Islands</option><option value='Faroe Islands'>Faroe Islands</option><option
value='Fiji'>Fiji</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)'>France (European Territory)</option><option value='French
Guyana'>French Guyana</option><option value='French Southern
Territories'>French Southern Territories</option><option
value='Gabon'>Gabon</option><option value='Gambia'>Gambia</option><option
value='Georgia'>Georgia</option><option
value='Germany'>Germany</option><option value='Ghana'>Ghana</option><option
value='Gibraltar'>Gibraltar</option><option value='Great Britain'>Great
Britain</option><option value='Greece'>Greece</option><option
value='Greenland'>Greenland</option><option
value='Grenada'>Grenada</option><option value='Guadeloupe
(French)'>Guadeloupe (French)</option><option value='Guam (USA)'>Guam
(USA)</option><option value='Guatemala'>Guatemala</option><option
value='Guinea'>Guinea</option><option value='Guinea Bissau'>Guinea
Bissau</option><option value='Guyana'>Guyana</option><option
value='Haiti'>Haiti</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'>India</option><option
value='Indonesia'>Indonesia</option><option
value='Iran'>Iran</option><option value='Iraq'>Iraq</option><option
value='Ireland'>Ireland</option><option
value='Israel'>Israel</option><option value='Italy'>Italy</option><option
value='Ivory Coast (Cote D'Ivoire)'>Ivory Coast (Cote
D'Ivoire)</option><option value='Jamaica'>Jamaica</option><option
value='Japan'>Japan</option><option value='Jordan'>Jordan</option><option
value='Kazakhstan'>Kazakhstan</option><option
value='Kenya'>Kenya</option><option
value='Kiribati'>Kiribati</option><option
value='Kuwait'>Kuwait</option><option
value='Kyrgyzstan'>Kyrgyzstan</option><option
value='Laos'>Laos</option><option value='Latvia'>Latvia</option><option
value='Lebanon'>Lebanon</option><option
value='Lesotho'>Lesotho</option><option
value='Liberia'>Liberia</option><option value='Libya'>Libya</option><option
value='Liechtenstein'>Liechtenstein</option><option
value='Lithuania'>Lithuania</option><option
value='Luxembourg'>Luxembourg</option><option
value='Macau'>Macau</option><option
value='Macedonia'>Macedonia</option><option
value='Madagascar'>Madagascar</option><option
value='Malawi'>Malawi</option><option
value='Malaysia'>Malaysia</option><option
value='Maldives'>Maldives</option><option value='Mali'>Mali</option><option
value='Malta'>Malta</option><option value='Marshall Islands'>Marshall
Islands</option><option value='Martinique (French)'>Martinique
(French)</option><option value='Mauritania'>Mauritania</option><option
value='Mauritius'>Mauritius</option><option
value='Mayotte'>Mayotte</option><option
value='Mexico'>Mexico</option><option
value='Micronesia'>Micronesia</option><option
value='Moldavia'>Moldavia</option><option
value='Monaco'>Monaco</option><option
value='Mongolia'>Mongolia</option><option
value='Montserrat'>Montserrat</option><option
value='Morocco'>Morocco</option><option
value='Mozambique'>Mozambique</option><option
value='Myanmar'>Myanmar</option><option
value='Namibia'>Namibia</option><option value='Nauru'>Nauru</option><option
value='Nepal'>Nepal</option><option
value='Netherlands'>Netherlands</option><option value='Netherlands
Antilles'>Netherlands 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='Nicaragua'>Nicaragua</option><option
value='Niger'>Niger</option><option value='Nigeria'></option><option
value='Niue'>Niue</option><option value='Norfolk Island'>Norfolk
Island</option><option value='North Korea'>North Korea</option><option
value='Northern Mariana Islands'>Northern Mariana Islands</option><option
value='Norway'>Norway</option><option value='Oman'>Oman</option><option
value='Pakistan'>Pakistan</option><option
value='Palau'>Palau</option><option value='Panama'>Panama</option><option
value='Papua New Guinea'>Papua New Guinea</option><option
value='Paraguay'>Paraguay</option><option value='Peru'>Peru</option><option
value='Philippines'>Philippines</option><option value='Pitcairn
Island'>Pitcairn Island</option><option
value='Poland'>Poland</option><option value='Polynesia (French)'>Polynesia
(French)</option><option value='Portugal'>Portugal</option><option
value='Puerto Rico'>Puerto Rico</option><option
value='Qatar'>Qatar</option><option value='Reunion (French)'>Reunion
(French)</option><option value='Romania'>Romania</option><option
value='Russian Federation'>Russian 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'>Saint Vincent &amp; Grenadines</option><option
value='Samoa'>Samoa</option><option value='San Marino'>San
Marino</option><option value='Saudi Arabia'>Saudi Arabia</option><option
value='Senegal'>Senegal</option><option
value='Seychelles'>Seychelles</option><option value='Sierra Leone'>Sierra
Leone</option><option value='Singapore'>Singapore</option><option
value='Slovak Republic'>Slovak Republic</option><option
value='Slovenia'>Slovenia</option><option value='Solomon Islands'>Solomon
Islands</option><option value='Somalia'>Somalia</option><option value='South
Africa'>South Africa</option><option value='South Korea'>South
Korea</option><option value='Spain'>Spain</option><option value='Sri
Lanka'>Sri Lanka</option><option value='Sudan'>Sudan</option><option
value='Suriname'>Suriname</option><option value='Svalbard and Jan Mayen
Islands'>Svalbard and Jan Mayen Islands</option><option
value='Swaziland'>Swaziland</option><option
value='Sweden'>Sweden</option><option
value='Switzerland'>Switzerland</option><option
value='Syria'>Syria</option><option
value='Tadjikistan'>Tadjikistan</option><option
value='Taiwan'>Taiwan</option><option
value='Tanzania'>Tanzania</option><option
value='Thailand'>Thailand</option><option value='Togo'>Togo</option><option
value='Tokelau'>Tokelau</option><option value='Tonga'>Tonga</option><option
value='Trinidad and Tobago'>Trinidad and Tobago</option><option
value='Tunisia'>Tunisia</option><option
value='Turkey'>Turkey</option><option
value='Turkmenistan'>Turkmenistan</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'>United
Arab Emirates</option><option value='United Kingdom'>United
Kingdom</option><option value='United States'>United States</option><option
value='Uruguay'>Uruguay</option><option
value='Uzbekistan'>Uzbekistan</option><option
value='Vanuatu'>Vanuatu</option><option value='Vatican City State'>Vatican
City State</option><option value='Venezuela'>Venezuela</option><option
value='Vietnam'>Vietnam</option><option value='Virgin Islands
(British)'>Virgin 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'>Yemen</option><option
value='Yugoslavia'>Yugoslavia</option><option
value='Zaire'>Zaire</option><option value='Zambia'>Zambia</option><option
value='Zimbabwe'>Zimbabwe</option><option
value='OTHER'>OTHER</option></select></td>
</tr>
<tr>
<td colspan='2'>
<p class='negsection'>
<b>E-Mail Addresses</b></td>
</tr>
<tr>
<td>
<p align='left'/>{$label_array['email_1']}<p
align='right'/><i>{$label_array['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_1v' title='E-mail address: valid characters
A-Z, a-z, 0-9,_@.-'/></td>
</tr>
<tr>
<td>
<p align='left'/>{$label_array['email_2']}<p
align='right'/><i>{$label_array['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_2v' title='E-mail address: valid characters
A-Z, a-z, 0-9,_@.-'/></td>
</tr>
<tr>
<td colspan='2'>
<p class='negsection'>
<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_code'
size='3' maxlength='3' title='International 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_code'
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_num'
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='$extension'
size='4' maxlength='4' title='Phone Number: valid characters 0-9, (4
digits)'/></td>
</tr>
<tr>
<td colspan='2'>
<p class='negsection'>
<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='$username' 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='$password'
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='checked' 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='checked'
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>


<webmanagr@gmail.com> wrote in message
news:1159551082.011352.122360@i42g2000cwa.googlegroups.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/_member/club_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.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация