Code: Select all
<?php
// Connect to database
include_once "scripts/connect_to_mysql.php";
$sql = mysql_query("INSERT INTO membersa (username, password, firstname, lastname, bio_body, city, zip)
VALUES(/'$username/',/'$password/',/'$firstname/',/'$lastname/',/'$bio_body/',/'$city/',/'$zip/')")
or die (mysql_error());
$id = mysql_insert_id();
// Create directory(folder) to hold each user's files(pics, MP3s, etc.)
mkdir("members/$id", 0755);
exit();
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="regester.php" method="post" enctype="multipart/form-data">
<p>
<label>First Name
<input type="text" name="firstname" id="firstname" class="formFields" size="32" maxlength="20" />
</label>
</p>
<p>
<label>Last Name
<input type="text" name="lastname" id="lastname" class="formFields" size="32" maxlength="20" />
</label>
</p>
<p>
<label>Email
<input name="email" type="text" class="formFields" id="email" size="32" maxlength="48" />
</label>
</p>
<p>
<label>Bio
<textarea name="bio_body" id="bio_body" cols="45" rows="5"class="formFields" size="35" maxlength="255" /></textarea>
</label>
</p>
<p>
<label>City
<input type="text" name="city" id="city" class="formFields" size="32" maxlength="20" />
</label>
</p>
<p>
<label>Zip Code
<input type="text" name="zip" id="zip" class="formField size="32" maxlength="20" />
</label>
</p>
<p>
<label>User Id
<input type="text" name="username" id="username" class="formFields" size="32" maxlength="20" />
</label>
</p>
<p>
<label>Password
<input type="text" name="password" id="password" class="formFields" size="32" maxlength="20" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Sign Up!" />
</label>
</p>
<p> </p>
</form>
</body>
</HTML>