Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (ISSET($_POST['searchBtn'])) {
- if (!EMPTY($_POST['reason']) || !EMPTY($_POST['regions']) || !EMPTY($_POST['print'])) {
- try {
- $sql = "INSERT INTO user(reason, regions, print) VALUES(:reason, :regions, :print)";
- $statement = $db->prepare($sql);
- $statement->execute(array(':reason'=>$reason, ':regions'=>$regions, ':print'=>$print));
- if($statement->rowCount()== 1) {
- $result = flashMessage("inserted successfully");
- }
- } catch(Exception $ex) {
- $result = flashMessage("insertion failed:".$ex->getMessage());
- }
- } else {
- $result = flashMessage("Please select all fields");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement