Daney11 Posted December 13, 2007 Share Posted December 13, 2007 Hey guys, Im using this bit of code to pull out all locations and values, and it works perfect. <?php echo '<select name="member_nation">'; echo '<option value="nonationA" selected="selected">Please Select...</option>'; ?> <?php foreach ($location as $key => $value) { echo "<option value=\"$key\">$value</option>\n"; } echo '</select>'; ?> However this peice of checking code keeps telling me to enter a vaild nation, even though i am. Any ideas? if (eregi ('^[[:alpha:]\.\'\-]{2,15}$', stripslashes(trim($key)))) { $member_nation = escape_data($key); } else { $member_nation = FALSE; $errors[] = 'Please Enter A Valid Nation'; } Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.