[UPHPU] Form Help

Jonathan Grotegut jgrotegut at gmail.com
Fri Jun 24 09:41:43 MDT 2005

I'm not sure exactly how to do this so hopefully there is someone out
there that can help me out.  I have the following page (will be adding
security soon):


What I want to do is when someone clicks on the Edit button (green
check mark) it takes them to a page that is prefilled with the
information from the "member" that was selected.

I am guessing I would have to do some type of form to allow for the
"member" info to be passed to the page to modify it but I am not sure
how to best do this, or is there a better way?

Here is the code for the page with Database info removed:

$connection = mysql_connect ("blah", "blah", "blah");
if ($connection == false){
  echo mysql_errno().": ".mysql_error()."<BR>";

$query = "select * from name ORDER BY Name";
$result = mysql_db_query ("lgzwywj_wowroster", $query);

if ($result){
  echo "<table class=sortable width=100% cellpadding=0 cellspacing=0
border=1px id=roster>";
  echo "<tr><th width=15% align=center>Member Rank</th><th width=15%
align=center>Member Name</th><th width=15% align=center>Member
Class</th><th width=15% align=center>Member Race</th><th width=15%
align=center>Member Level</th><th width=15% align=center>Edit</th><th
width=15% align=center>Delete</th></tr>";

  $numOfRows = mysql_num_rows ($result);
  for ($i = 0; $i < $numOfRows; $i++){
    $memberrank = mysql_result ($result, $i, "Rank");
    $membername = mysql_result ($result, $i, "Name");
    $memberclass = mysql_result ($result, $i, "Class");
  	$memberrace = mysql_result ($result, $i, "Race");
  	$memberlevel = mysql_result ($result, $i, "Level");
    echo "<tr><td align=center>$memberrank</td><td
align=center>$membername</td><td align=center>$memberclass</td><td
align=center>$memberrace</td><td align=center>$memberlevel</td><td
align=center><a href=editmember.php><img src=greencheck.gif 
border=0></a></td><td align=center><a href=deletemember.php><img
src=redx.gif  border=0></a></td></tr>";

  echo "</table>";
  echo mysql_errno().": ".mysql_error()."<BR>";

mysql_close ();


Any help or suggestions are greatly appreciated, Thanks in advance.


More information about the UPHPU mailing list