PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
// Check the address 1 field.
if (eregi ("^їa-z0-9]*її]]*їa-z0-9]*її]]*їa-z0-9]*$", $_POSTї'f_add1'])) {
$e = TRUE;
} else {
$e = FALSE;
$messageї] = "Please enter an address1 that consists only of letters and numbers.";
}
?>
basically I want them to enter anything they want as long as its alpha numeric and/or has a period
Are you going to be accepting foreign orders? A lot of foreign addresses or PO boxes don't follow your format. Also what if someone has an address like "123 main street NE". You might want to just check to make sure they filled something out.
yep thats why I posted Griff, once I started thinking about what's going in that field my expression could be 10 miles long and right now you're correct its not a practicaly use.
we will be accepting foreign orders.
I was just wondering if there was a good way to check to make sure the field only contains letters, numbers, spaces, and periods.
I'm just looking for a way to make my forms a little more secure, just checking to see if the form is filled in leaves you open to alot of possibilities.