Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain characters.
Example:
Code: //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!
Working with Global Variables
hi, I'm not really sure why the following code is returning a "Call to a member function getBanners() on a non-object" error message. Code: var $_model; function display
php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]
Is it possible to view php source code??
Hi AllI was just wondering if it's possible to view a websites php source code? I know that php is a server side scripting language and that it is processed at the server and the results are sent
Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the return button from my preview view. the information is lost in all the textarea's. Any clue what I
How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But, when the person comes to buy the ticket, I have to replay to my process page which ticket they
Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the data into database.Why can this happen? how to prevent this?
array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 pt grading scale)
What are the two different files you download to update kernel?
What are the two different files you download to update kernel?
Why does first ever HttpSendRequest take longer?
I promise this isn't as simple as it sounds. I'm wondering why the the first ever call to HttpSendRequest takes much longer than subsequent calls, even when the later requests are for a different URL.
single page with referrer to show correct page
I have a simple website with a couple of different pages. I would like to be able to in a div tag with a php require or even inside the same page be able to show whatever link is clicked on that part