From ce8911871339bdbe2d10011ff5dc4408514b6e1b Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 1 Mar 2009 10:12:16 -0800 Subject: check posted parameters --- install.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'install.php') diff --git a/install.php b/install.php index 18fc362b6..18a10664d 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); -- cgit v1.2.3-54-g00ecf