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 Link to comment https://forums.phpfreaks.com/topic/81477-solved-vaild-key/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.