Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Failed attempts at a validation function
- function displayError($fieldName, $errormsg) {
- global $errorCount;
- echo "Error for \"$fieldName\": $errorMsg<br />\n";
- ++$errorCount;
- }
- function validateNumbers($data, $fieldName) {
- global $errorCount;
- if (empty($data)) {
- displayError($fieldName, "This field is required");
- $retval = "";
- echo "empty";
- } else {
- $retval = trim($data);
- $retval = stripslashes($retval);
- echo "working";
- }
- return($retval);
- }
- This was my attempt at an overtime calculation but it never worked
- if ($hours > 40) {
- $salary = ([$wage * 40] + [$hours - 40 * ($wage * 1.5)]);
- }
- */
Add Comment
Please, Sign In to add comment