Location: PHPKode > projects > PortalXP - Teacher Edition > PortalXP/PortalXP/signup.php
<?php

$email = $HTTP_POST_VARS["email"];
require('admin/config.php');
require('admin/connect.php');
include('admin/outputlib.php');

// Query DB for districts
$sql = "select * from district";
$result = mysql_query($sql);	

// Query DB for schools
$sql2 = "select * from school";
$result2 = mysql_query($sql2);

// Query DB for e-mail addresses
$query = "select * from teacher where email = '$email' ";
$result3 = mysql_query($query);
if (mysql_num_rows($result3) > 0)
{
    echo "This e-mail address is already used.  Use the back button on your browser and use a different e-mail address.\n";
	exit;
}

?>

<HEAD>
<link REL="stylesheet" TYPE="text/css" HREF="portalxp.css">

<STYLE>
A:hover
{
    COLOR: #ff3333;
    TEXT-DECORATION: none
}
</STYLE>
</HEAD>

<div class='topname'>
PortalXP
</div>

<div class='topaddress'>
Linking teachers and students on the web
</div>

<div class='spacer'>
<img src="images/spacer.gif">
</div>

<div style="POSITION: absolute; TOP: 50px; LEFT: 0px; Z-INDEX: 25; WIDTH: 700px">
<table width='700px' BORDER="0" CELLSPACING="0" CELLPADDING="0">
<tr>
	<td colspan=4 bgcolor='#349601'>
	&nbsp;
	</td>
</tr>
<tr>
	<td width='150px' bgcolor='#85BA69' valign='top'>
	<div class='sidelink'>
	<hr>
	Why PortalXP?
	<hr>
	<a href="overview.php">Overview</a>
	<hr>
	Benefits
	<hr>
	Demo Teacher
	<hr>
	<a href="contactxp.php">Contact Us</a>
	<hr>
	<a href="signup.php">Sign-up</a>
	<hr>
	<a href="support.php">Tech Support</a>
	<hr>
	<a href="index.php">Home</a>
	<hr>
	</div>
	</td>
	<td colspan='3' width='350px' valign='top'>
	&nbsp;
	<br>
	<font color='red'>Enter information in all fields below.</font>
	<p>
	<form method="post" action="signupwrite.php">
	<table width=500px border=0>
	<tr>
	<td>Select District:
	<td>
	<select name="district_id">
	<option value='noname'>Select District</option>
	<?php
	while ($myrow = mysql_fetch_array($result)) {
	printf("<option value='%s'>%s</option>\n", $myrow["district_id"], $myrow["districtname"]);
	}
	?>
	</select> <a href="adddistrict.php">District Not on List?</a>
	<tr>
	<td>Select School:
	<td>
	<select name="school_id">
	<option value='noname'>Select School</option>
	<?php
	while ($myrow2 = mysql_fetch_array($result2)) {
	printf("<option value='%s'>%s</option>\n", $myrow2["school_id"], $myrow2["schoolname"]);
	}
	?>
	</select> <a href="addschool.php">School Not on List?</a>
	<tr>
	<td>First Name:
	<td><input type="text" id="text" name="firstname">
	<tr>
	<td>Last Name:
	<td><input type="text" id="text" name="lastname">
	<tr>
	<td>Title:
	<td>
	<select name="title">
	<option>Select One</option>
	<option value='Mr.'>Mr.</option>
	<option value='Mrs.'>Mrs.</option>
	<option value='Ms.'>Ms.</option>
	<option value='Miss'>Miss</option>
	</select>
	<tr>
	<td>Phone:
	<td><input type="text" id="text" name="phone">
	<tr>
	<td>E-Mail:
	<td><input type="text" id="text" name="email" value="<?php echo $email ?>">
	<tr>
	<td>Password:
	<td><input type="text" id="text" name="teacherpass">
	<tr>
	<td colspan=2>
	<font color="red">By submitting this information, you agree to the <a href="terms.php">terms and contiditions</a> of this website.</font>
	</table>
	<input type="Hidden" name="teacher_id" value="<?php echo $id ?>">
	<input type="Submit" name="submit" value="Enter Information">
	</form>
	</td>
</tr>
<tr>
	<td colspan=4 bgcolor='#349601'>
	&nbsp;
	</td>
</tr>
<tr>
	<td colspan=4>
	<center>
	©2002 Da Who Software - PortalXP Version <?php echo $versionnumber ?>
	</center>
	</td>
</tr>
</table>
</div>

Return current item: PortalXP - Teacher Edition