All pastes #524977 Raw Edit

Unnamed

public php v1 · immutable
#524977 ·published 2007-05-31 07:05 UTC
rendered paste body
<?php//check to make sure the user didn't input bogus data$errors = NULL;foreach($_POST as $key => $value) {      if(!preg_match('/.+/')) {            $errors .= "You neglected to enter a value for field {$key}\n<br />";      }}//after all your user error checking is done do thisif(isset($errors)) {     echo $errors;     die();} else     echo "You've done something right for a change\n";}?>