gettopreacherman
Lieutenant


Joined: Jan 13, 2005
Posts: 262
|
Posted:
Tue Aug 30, 2005 4:58 am |
  |
Ok,
So here's the story. I'm trying to add an embedded module within the Your_Account that basically searches my own member db to verify that they are a member of the clan, if they are found, then it shows a link that takes them to a "bio edit" area where they can modify their bio information. So far, that works like a champ...however when I go to submit the changes, it can't find the op Switch and errors out saying _FILENOTFOUND...
The code for the form is as follows:
| Code: |
function editmem($member) {
global $user_prefix, $dbi, $module_name;
include("header.php");
OpenTable();
echo "<center><font class=\"title\"><b>Member Information</b></font></center>";
CloseTable();
echo "<br>";
$result = sql_query("select * FROM ".$prefix."_{DATABASE} WHERE username='$member'", $dbi);
if(sql_num_rows($result, $dbi) > 0) {
list($id,$name,$picture,$rank,$country,$location,$email,$birthdate,$duty,$realname,$favmap,$favweap,$username,$elite,$distinguished,$chamber,$meritorious,$level,$start,$phone,$address,$state,$zip,$shirt,$hat,$xfire) = sql_fetch_row($result, $dbi);
OpenTable();
echo "<center><font class=\"option\"><b>Update Member Information: <i>$name</i></b></font></center>"
."<form action=\"modules.php?name=$module_name\" method=\"post\">"
."<table border=\"0\">"
."<tr><td>Member ID:</td>"
."<td><b>$id</b></td></tr>"
."<tr><td>Member Name:</td>"
."<td><input type=\"text\" name=\"name\" value=\"$name\"></td></tr>"
."<tr><td>Resident Country:</td>"
."<td><input type=\"text\" name=\"country\" value=\"$country\"></td></tr>"
."<tr><td>Resident Location:</td>"
."<td><input type=\"text\" name=\"location\" value=\"$location\"></td></tr>"
."<tr><td>Member Email:</td>"
."<td><input type=\"text\" name=\"email\" value=\"$email\" size=\"20\" maxlength=\"20\"></td></tr>"
."<tr><td>Birthday: (numeric)</td>"
."<td><input type=\"text\" name=\"birthdate\" value=\"$birthdate\"></td></tr>"
."<tr><td>Member Real Name:</td>"
."<td><input type=\"text\" name=\"realname\" value=\"$realname\"></td></tr>"
."<tr><td>Favorite Map:</td>"
."<td><input type=\"text\" name=\"favmap\" value=\"$favmap\"></td></tr>"
."<tr><td>Favorite Weapon:</td>"
."<td><input type=\"text\" name=\"favweap\" value=\"$favweap\"></td></tr>"
."<tr><td>Site Login Name:</td>"
."<td><input type=\"text\" name=\"username\" value=\"$username\"></td></tr>"
."<tr><td>Phone Number:</td>"
."<td><input type=\"text\" name=\"phone\" value=\"$phone\"></td></tr>"
."<tr><td>Street Address:</td>"
."<td><input type=\"text\" name=\"address\" value=\"$address\"></td></tr>"
."<tr><td>State/Province:</td>"
."<td><input type=\"text\" name=\"state\" value=\"$state\"></td></tr>"
."<tr><td>Postal Code:</td>"
."<td><input type=\"text\" name=\"zip\" value=\"$zip\"></td></tr>"
."<tr><td>Shirt Size:</td>"
."<td><input type=\"text\" name=\"shirt\" value=\"$shirt\"></td></tr>"
."<tr><td>Hat size:</td>"
."<td><input type=\"text\" name=\"hat\" value=\"$hat\"></td></tr>"
."<tr><td>Xfire Login Name:</td>"
."<td><input type=\"text\" name=\"xfire\" value=\"$xfire\"></td></tr>"
."<input type=\"hidden\" name=\"op\" value=\"shoveit\">"
."<input type=\"hidden\" name=\"id\" value=\"$id\">"
."<tr><td><input type=\"submit\" value=\""._SAVECHANGES."\"></form></td></tr>"
."</table>";
CloseTable();
} else {
OpenTable();
echo "<center><b>"._USERNOEXIST."</b><br><br>"
.""._GOBACK."</center>";
CloseTable();
}
include("footer.php");
}
|
The switch in the file is as follows:
| Code: |
case "shoveit":
updatemember($name, $country, $location, $email, $birthdate, $realname, $favmap, $favweap, $username, $phone, $address, $state, $zip, $shirt, $hat, $xfire, $id);
break;
|
Function updatemember() is:
| Code: |
function updatemember($name,$country,$location,$email,$birthdate,$realname,$favmap,$favweap,$username,$phone,$address,$state,$zip,$shirt,$hat,$xfire,$id) {
global $prefix,$user_prefix, $dbi;
sql_query("UPDATE {TABLE} set Name='$name', Country='$country', Location='$location', Email='$email', BirthDate='$birthdate', RealName='$realname', FavMap='$favmap', FavWeap='$favweap', UserName='$username', Phone='$phone', Address='$address', State='$state', Zip='$zip', Shirt='$shirt', Hat='$hat', Xfire='$xfire' where ID='$id'", $dbi);
#Header("Location: modules.php?name=Your_Account");
}
After about three hours last night on this pile o poo...I'm at a loss...I have changed the op value to all kinds of things...I have tried to access the index.php file directly, I have tried to hard code the op query strings and id values...nothing...
If i hard code the URL and paste it in, it runs the updatemember function, but the values are empty so they update the table with Null values...so something is not right...
Ideas? Help to save the sanity of a PHPNuke fan...lol. Any ideas would be appreciated. |
|
|
|