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!
Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?After dealing with numerous very well qualified programmers to only turn down the project due to difficulty
Strange
I recently noticed some odd HTML appear in some of the websites I host. Not all of them are run on a CMS but the majority (but not all) are running through the same FTP account.I've searched
How can I uploading Transactional Data from Legacy to New SAP system
Hell Gurus,
Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?
IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoyingCode: <?php echo '<li class="newproducts"><a
cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a different way or make it work.When sending a file as part of form information included in a cURL
Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about because the control being searched for is nested within a container other than the webform.I came
Members Only
Hi all, for my website i have a members area only which on members can veiw, but at the moment anyone can veiw them pages. Is there any way in which i can stop them veiwing the page without
Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?This code seems to be causing it: <?PHP } else { echo " <div
Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and then decoded. For security and later readability.