From: Evan Prodromou Date: Sun, 1 Mar 2009 18:12:16 +0000 (-0800) Subject: check posted parameters X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6070d98aa6ed53cfafa9f4bcc6ecd24977b8866a;p=quix0rs-gnu-social.git check posted parameters --- diff --git a/install.php b/install.php index 3d76dace14..29d9094175 100644 --- a/install.php +++ b/install.php @@ -130,6 +130,36 @@ function handlePost() $password = $_POST['password']; $sitename = $_POST['sitename']; + if (empty($host)) { + updateStatus("No hostname specified.", true); + showForm(); + return; + } + + if (empty($database)) { + updateStatus("No database specified.", true); + showForm(); + return; + } + + if (empty($username)) { + updateStatus("No username specified.", true); + showForm(); + return; + } + + if (empty($password)) { + updateStatus("No password specified.", true); + showForm(); + return; + } + + if (empty($sitename)) { + updateStatus("No sitename specified.", true); + showForm(); + return; + } + updateStatus("Starting installation..."); updateStatus("Checking database..."); $conn = mysql_connect($host, $username, $password);