summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-01 10:12:16 -0800
committerEvan Prodromou <evan@controlyourself.ca>2009-03-01 10:12:16 -0800
commitce8911871339bdbe2d10011ff5dc4408514b6e1b (patch)
tree39cb94b2d534258ae3257397de2b3aa31258a805
parentfc44c9a7f456a146a20884c56676baf7343dd923 (diff)
check posted parameters
-rw-r--r--install.php30
1 files changed, 30 insertions, 0 deletions
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);