if ($result) { header('Location: index.php?action=editabout'); $_SESSION['success'] = "The about info has been sucessfully Updated"; } else { header('Location: index.php?action=editabout'); $_SESSION['error'] = "sorry! there was an error while updating"; } } else { if (isset($_POST['editcontact'])) { $title = $_POST['title']; $description = $_POST['descriptions']; //$postid = isset($_GET['id'])? $_GET['id'] : ''; //var_dump($posttitle,$postid);die; $query = "UPDATE about SET title='{$title}', aboutinfo='{$description}' "; $article = new Article(); $result = $article->editabout($query); if ($result) { header('Location: index.php?action=editabout'); $_SESSION['success'] = "The about info has been sucessfully Updated"; } else { header('Location: index.php?action=editabout'); $_SESSION['error'] = "sorry! there was an error while updating"; } } else { if (isset($_POST['register'])) { if (!filter_var($_POST['username'], FILTER_SANITIZE_STRING)) { header('Location: ../index.php?action=register'); $_SESSION['error'] = "sorry! the Name contains only Characters!"; } else { if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { header('Location: ../index.php?action=register');