summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-01 10:12:16 -0800
committerEvan Prodromou <evan@controlyourself.ca>2009-03-04 05:42:06 -0800
commit6070d98aa6ed53cfafa9f4bcc6ecd24977b8866a (patch)
treed800b2e9694ed24af73d650471791567f88fe150 /install.php
parent18f7749995c2fb4281839df8f8aa2b0a0c545260 (diff)
check posted parameters
Diffstat (limited to 'install.php')
-rw-r--r--install.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/install.php b/install.php
index 3d76dace1..29d909417 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);