Dirt_Diver
01-21-2009, 09:46 PM
I was wondering if someone could help me build an admin update page.
I don't know how to even begin with this.
I don't have many fields that I need to update but I would like to have the ability to update some information on my database.
I have the form but I don't even know how to code this.
All I know is I need to use the update function but I don't even know if my form is right.
I guess what I want or how I think it should be set up is a field for me to enter the current team name and then a field for me to enter the updated name.
anyway here is my form, have I even started doing this right?
<form name="form2" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p align="left">Old DPC Username:
<input name="OldUser" type="text" id="OldUser">
<br>
New DPC Username:
<input name="NewUser" type="text" id="NewUser">
<br>
Change username:
<input name="UpdateUser" type="text" id="UpdateUser">
<br>
To Team:
<select name="team_request" id="team_request">
<option value="NULL" selected>Please choose a team. </option>
<option value="Australia">Australia</option>
<option value="Canada_I">Canada I</option>
<option value="Canada_II">Canada II</option>
<option value="Canada_III">Canada III</option>
<option value="Germany">Germany</option>
<option value="Iceland">Iceland</option>
<option value="Islanders">Islanders</option>
<option value="Mystery">Mystery</option>
<option value="Poland">Poland</option>
<option value="UK">UK</option>
<option value="USA_Equestrian">USA Equestrian</option>
<option value="USA_Midwest">USA Midwest</option>
<option value="USA_Northeast">USA NorthEast</option>
<option value="USA_Northwest">USA NorthWest</option>
<option value="USA_Southeast">USA SouthEast</option>
<option value="USA_Southwest">USA SouthWest</option>
</select>
</p>
<p>
<input type="submit" name="submit" value="Update">
</p>
</form>
I don't know how to even begin with this.
I don't have many fields that I need to update but I would like to have the ability to update some information on my database.
I have the form but I don't even know how to code this.
All I know is I need to use the update function but I don't even know if my form is right.
I guess what I want or how I think it should be set up is a field for me to enter the current team name and then a field for me to enter the updated name.
anyway here is my form, have I even started doing this right?
<form name="form2" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p align="left">Old DPC Username:
<input name="OldUser" type="text" id="OldUser">
<br>
New DPC Username:
<input name="NewUser" type="text" id="NewUser">
<br>
Change username:
<input name="UpdateUser" type="text" id="UpdateUser">
<br>
To Team:
<select name="team_request" id="team_request">
<option value="NULL" selected>Please choose a team. </option>
<option value="Australia">Australia</option>
<option value="Canada_I">Canada I</option>
<option value="Canada_II">Canada II</option>
<option value="Canada_III">Canada III</option>
<option value="Germany">Germany</option>
<option value="Iceland">Iceland</option>
<option value="Islanders">Islanders</option>
<option value="Mystery">Mystery</option>
<option value="Poland">Poland</option>
<option value="UK">UK</option>
<option value="USA_Equestrian">USA Equestrian</option>
<option value="USA_Midwest">USA Midwest</option>
<option value="USA_Northeast">USA NorthEast</option>
<option value="USA_Northwest">USA NorthWest</option>
<option value="USA_Southeast">USA SouthEast</option>
<option value="USA_Southwest">USA SouthWest</option>
</select>
</p>
<p>
<input type="submit" name="submit" value="Update">
</p>
</form>