Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain characters.
Example:
Code: [Select]//Validate Copay
$allow = array('$', '.');
if (!empty($copay) && strlen($copay) < 6 || strlen($copay) > 8) { // IF copay is not empty and not between 6 and 8 characters
$error .= 'COPAY has a maximum of 8 characters. An example of a maximum $0000.00, and a minimum $00.00.<br />';
$output_form = true;
}
if (!empty($copay) && !ctype_digit(str_replace($allow), '', $copay)) { // IF copay is not empty and contains illegal characters (Allow $ and .)
$error .= 'COPAY contains illegal characters.<br />';
$output_form = true;
}
With this example, my test comes back containing illegal characters. I've tried changing it here and there, but get the same results. Thank you!
Help with php code
Hello, can anyone tell me why this php word trap fails to work, and the trigger words get blow right past, and the comments get posted anyway?heres the php code im testing on a
Linking with Foreign Keys
I have been getting an erro when I try and link:
Multi Level Array Problem
hi all,For example I have array like below:$temp = array(array('north america', 'us', 'california'), array('north america', 'us', 'hawaii'), array('north america', 'canada', 'vancouver'),
Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database assigns an ID number. The front end displays each upload by ID number. I'm trying to set up the back
unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.
To add a field on the screen XK02.
Hi All,
want a code for uploading and downloading
i m trying to upload and download to my site..i need upload and download code ...i use a code for upload but that is not working actually..i don't know what is the problem.when i upload a file and
How to schedule the a job?
Hi,
insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text which will obviously be printed out client side at a later date. What my question is that is it
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a new user when I'm not logged in. It should redirect me back to the login page but I get this