Location: PHPKode > projects > ZompLog > install/newuser.php
<?php ob_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Zomplog - Initiate Weblog</title>
<link href="../admin/images/docsstyle.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
	function focusit() {
	window.onload = focusit;
	<style type="text/css">
	#blogname, #name, #pwd, #pwd2, #submit {
		font-size: 2.3em;


<a name="top"></a>

<div id="header">
<div class="headercontent">
<div id="mainbox">
<div class="maincontent">

<div class="title">Step Two of Two - Initiate Weblog </div>


// check against hack attempts: if a user has already been created, no-one can register anymore through this page.
$query="SELECT * FROM $table_users";
$result=mysql_query($query, $link) or die("MySQL query $query failed. Error if any: ".mysql_error());
$numrows = mysql_num_rows($result);
exit ("<br />Zomplog has already been installed. <a href=\"../index.php\">Go to site</a>.<br /><br />");

/* create user-account --------------------------------------------------------------------------------------- */


	field_validator("login name", $_POST["login"], "alphanumeric", 4, 15);
	field_validator("password", $_POST["password"], "string", 4, 15);
	field_validator("confirmation password", $_POST["password2"], "string", 4, 15);
	if(strcmp($_POST["password"], $_POST["password2"])) {
		$messages[]="Your passwords did not match";

	$query="SELECT login FROM $table_users WHERE login='".$_POST["login"]."'";
	$result=mysql_query($query, $link) or die("MySQL query $query failed. Error if any: ".mysql_error());

	if( ($row=mysql_fetch_array($result)) ){
		$messages[]="Login ID \"".$_POST["login"]."\" already exists.  Try another.";

	$messages[]="Please enter a title for your weblog";

	if(empty($messages)) {


?><br />
<form action="<?php $_SERVER["PHP_SELF"] ?>" method="POST">
<p>Name of your weblog:<br />
  <input type="text" name="weblog_title" value="<?php print $_POST["weblog_title"] ?>" maxlength="40" id="blogname" />
  <br />
  <br />
Username:<br />
<input type="text" name="login" value="<?php print $_POST["login"] ?>" maxlength="15" id="name" />
<br />
<br />
Password:<br />
<input type="password" name="password" value="" maxlength="15" id="pwd" />
<br />
<br />
Confirm password:<br />
<input type="password" name="password2" value="" maxlength="15" id="pwd2" />
<br />
<br />
<input name="admin" type="hidden" id="admin" value="1" />
<input name="submit_user" type="submit" value="Submit &rsaquo;&rsaquo;" id="submit" />

<br />
Please remove the "install"-directory after you've finished the installation process.<br /><br />
If you want to be able to upload images, be sure to set the permissions of the folders "upload" and "thumbs" to 777. Read more about how to do this in the wiki page about <a href="http://zomp.nl/development/zomplog/wiki/SettingPermissions" target="_blank">setting permissions</a>. Enjoy Zomplog!<br />
<br />
<br />
<br />
Return current item: ZompLog