Location: PHPKode > projects > Gsys > admin/brother_edit.php
//Filename : brother_edit.php
//Description : Used to edit a brother's information from an administrative position - OR, in the future, for a brother to edit his own info
//modified from pledge_add.php by paroxon on 16 Aug 06
//Author :  darc
//Last modified :  2006.12.20

    include '../includes/auth_ec.php'; //authenticate
    include '../includes/db.php';			//db info


<head><title>Edit Brother Info</title></head>
<br /><br />
<p><a href="brother_man.php">Return Brother Administration</a></p>
<br /><br />


	$sql ="SELECT * FROM $table_name WHERE username = '$_POST[username]';";
	$result = mysql_query($sql,$connection) or die(mysql_error());
	$row =mysql_fetch_array($result);


<strong>Edit</strong><br /><br />
<em>Follow input formattings provided</em><br />
<em>* indicates a required field</em><br /><br />

<!--//Perform a mysql query on the username passed, get row.
//Populate form fields with row info.
//removed password and uname fields.
<br><p><strong><?php echo($uname);?></strong><br>

<!-- start form -->
<form method="post" action="brother_functions.php?cat=edit">
<input type="hidden" name="uname" value="<?php echo($uname);?>">
*First Name: <INPUT TYPE="text" NAME="f_name" SIZE="30" value="<?php echo($row['f_name']);?>"><br />
Middle Name: <INPUT TYPE="text" NAME="m_name" SIZE="30" value="<?php echo($row['m_name']);?>"><br />
*Last Name: <INPUT TYPE="text" NAME="l_name" SIZE="30" value="<?php echo($row['l_name']);?>"><br />
*E-mail:  <INPUT TYPE="text" NAME="email" SIZE="30" value="<?php echo($row['email']);?>"><br />
Nickname: <INPUT TYPE="text" NAME="nickname" SIZE="30" value="<?php echo($row['nickname']);?>"><br />
*Phone Number: <INPUT TYPE="text" NAME="phone" SIZE="30" value="XXX-XXX-XXXX" value="<?php echo($row['phone']);?>"><br />
Address: <INPUT TYPE="text" NAME="address" SIZE="30" value="<?php echo($row['address']);?>"><br />
Town:  <INPUT TYPE="text" NAME="town" SIZE="30" value="<?php echo($row['town']);?>"><br />
Province:  <INPUT TYPE="text" NAME="state" SIZE="4" value="<?php echo($row['state']);?>"><br />
Postal Code:  <INPUT TYPE="text" NAME="zip" SIZE="10" value="<?php echo($row['zip']);?>"><br />
SSN# (or other 9 digit ID#):  <INPUT TYPE="text" NAME="ssn" SIZE="11" value="<?php echo($row['id']);?>"><br />
Date of Birth:  <INPUT TYPE="text" NAME="dob" SIZE="11" value="<?php echo($row['dob']);?>"><br />
*Initiation Date: <INPUT TYPE="text" NAME="initiation_date" SIZE="11" value="<?php echo($row['initiation_date']);?>"><br />
Position: <INPUT TYPE="text" NAME="pos" SIZE="11" value="<?php echo($row['pos']);?>"><br />
On or Off Campus Residency: 
<input type="radio" name="on_off_campus" value="on" <?php if($row[on_off_campus]=="on"){echo("checked");}else{}?>>On Campus 
<input type="radio" name="on_off_campus" value="off"<?php if(!$row[on_off_campus]=="off"){echo("checked");}else{}?>> Off Campus 
<br /><br />
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Edit Info">

<p><a href="brother_man.php">Return to Brother Administration</a></p>
Return current item: Gsys