I just confirmed that in fact, this Admin webform is not updating ANY value changes in any of the fields, let alone the Sales ID Number. Here is the complete page code:
[php]<?php
session_start();
if(!isset($_SESSION[‘admin_login’]) ||$_SESSION[‘admin_login’]=="")//session store admin name
{
header("Location: adminlogin.php");//login in AdminLogin.php
}
require_once("…/gen/includes/dbconnect.php");
$prid=$_GET[‘prid’];
$sql_user = “select * from salesperson where sp_id=’”.$prid."’";
$res_user = mysql_query($sql_user) or die(mysql_error().“11”);
$rec_user = mysql_fetch_assoc($res_user);
$sql = “select * from salesperson where sp_id=’”.$rec_user[‘sp_id’]."’";
$res = mysql_query($sql) or die(mysql_error().“11”);
$rec = mysql_fetch_assoc($res);
if($_POST[‘Change’]==“Change”)
{
$sql_edt = "update salesperson set
sp_name='".clean($_POST['sp_name'])."',
sp_address='".clean($_POST['sp_address'])."',
sp_email='".clean($_POST['sp_email'])."',
sp_phone_number='".clean($_POST['sp_phone_number'])."',
sp_ssn='".clean($_POST['sp_ssn'])."',
sp_payment_details='".clean($_POST['sp_payment_details'])."',
sp_diff_email='".clean($_POST['sp_diff_email'])."',
sp_bank_nm='".clean($_POST['sp_bank_nm'])."',
sp_bank_add='".clean($_POST['sp_bank_add'])."',
acct_nm_holder='".clean($_POST['acct_nm_holder'])."',
routing_number='".clean($_POST['routing_number'])."',
account_number='".clean($_POST['account_number'])."'
sp_issued_sales_id='".clean($_POST['sp_issued_sales_id'])."'
where sp_id='".$prid."'";
mysql_query($sql_edt);
//print($sql_edt);
header("Location: viewsalesperson.php");
exit();
}
if($_POST[‘Back’]==“Back”)
{
header(“Location: viewsalesperson.php”);
}
?>
RPS
<td bgcolor="#FFFFFF" width="93%" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> </td>
</tr>
<tr>
<td height="497" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="26" class="heading_black" align="center"> Sales
Person Entry Form</td>
</tr>
<tr>
<td height="383" align="center" valign="top"><table width="70%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E9E9E9">
<tr>
<td width="13%"> </td>
<td width="32%"> </td>
<td width="43%"> </td>
<td width="12%"> </td>
</tr>
<tr>
<td class="title"> </td>
<td class="title" height="27"> </td>
<td class="msg"><?php echo $msg;?></td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="27">Person ID :</td>
<td class="title"><?php echo $rec_user['sp_id'];?></td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">Name :</td>
<td><input type="text" name="sp_name" id="sp_name" class="textbox" value="<?php if(isset($_POST['sp_name'])){echo $_POST['sp_name'];}else{ echo $rec['sp_name'];}?>">
*</td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">User ID :</td>
<td><input type="text" name="user_id" id="user_id" class="textbox" value="<?php if(isset($_POST['user_id'])){echo $_POST['user_id'];}else{ echo $rec['user_id'];}?>" readonly="true">
*</td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">Address :</td>
<td><textarea name="sp_address" id="sp_address" class="textbox"><?php if(isset($_POST['sp_address'])){echo $_POST['sp_address'];}else{ echo $rec['sp_address'];}?></textarea>
* </td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">Email :</td>
<td> <input name="sp_email" id="sp_email" type="text" class="textbox" value="<?php if(isset($_POST['sp_email'])){echo $_POST['sp_email'];}else{ echo $rec['sp_email'];}?>">
*</td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">Phone Number :</td>
<td><input type="text" name="sp_phone_number" id="sp_phone_number" class="textbox" value="<?php if(isset($_POST['sp_phone_number'])){echo $_POST['sp_phone_number'];}else{ echo $rec['sp_phone_number'];}?>">
*</td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">SSN :</td>
<td><input type="text" name="sp_ssn" id="sp_ssn" class="textbox" value="<?php if(isset($_POST['sp_ssn'])){echo $_POST['sp_ssn'];}else{ echo $rec['sp_ssn'];}?>">
</td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">Payment Details :</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td height="40px" colspan="2" class="whitetxt" bgcolor="#006699">Mailed
Check(address same as above):
<input type="radio" name="sp_payment_details" value="MS" <?php if(isset($_POST['sp_payment_details'])){echo 'checked';}else if($rec['sp_payment_details']=="MS"){echo 'checked';}?> checked></td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td height="40px" colspan="2" class="whitetxt" bgcolor="#006699">Mailed
Check(Different address-input):
<input type="radio"name="sp_payment_details" value="MD" <?php if(isset($_POST['sp_payment_details'])){echo 'checked';}else if($rec['sp_payment_details']=="MD"){echo 'checked';}?>>
<input type="text" name="sp_diff_email" id="sp_diff_email" class="textbox" value="<?php if(isset($_POST['sp_diff_email'])){echo $_POST['sp_diff_email'];}else{ echo $rec['sp_diff_email'];}?>"></td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td height="40px" colspan="2" class="whitetxt" bgcolor="#006699">Paypal
Transfer using email address above:
<input type="radio" name="sp_payment_details" value="PT" <?php if(isset($_POST['sp_payment_details'])){echo 'checked';}else if($rec['sp_payment_details']=="PT"){echo 'checked';}?>></td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td height="40px" colspan="2" bgcolor="#006699" class="whitetxt">Online
transfer using bank account details :
<input type="radio" name="sp_payment_details" value="BD" <?php if(isset($_POST['sp_payment_details'])){echo 'checked';}else if($rec['sp_payment_details']=="BD"){echo 'checked';}?>>
(if yes fill the following)</td>
</tr>
<tr>
<td class="txt"> </td>
<td height="40px" bgcolor="#006699" ></td>
<td bgcolor="#006699" class="whitetxt"> <table width="100%" bgcolor="#666666">
<tr>
<td class="whitetxt">Bank Name :</td>
</tr>
<tr>
<td><input type="text" name="sp_bank_nm" id="sp_bank_nm" class="textbox" value="<?php if(isset($_POST['sp_bank_nm'])){echo $_POST['sp_bank_nm'];}else{ echo $rec['sp_bank_nm'];}?>">
</td>
</tr>
<tr>
<td class="whitetxt">Bank Address :</td>
</tr>
<tr>
<td><input type="text" name="sp_bank_add" id="sp_bank_add" class="textbox" value="<?php if(isset($_POST['sp_bank_add'])){echo $_POST['sp_bank_add'];}else{ echo $rec['sp_bank_add'];}?>"></td>
</tr>
<tr>
<td class="whitetxt">Account Name Holder :</td>
</tr>
<tr>
<td><input type="text" name="acct_nm_holder" id="acct_nm_holder" class="textbox" value="<?php if(isset($_POST['acct_nm_holder'])){echo $_POST['acct_nm_holder'];}else{ echo $rec['acct_nm_holder'];}?>"></td>
</tr>
<tr>
<td class="whitetxt">Routing Number :</td>
</tr>
<tr>
<td><input type="text" name="routing_number" id="routing_number" class="textbox" value="<?php if(isset($_POST['routing_number'])){echo $_POST['routing_number'];}else{ echo $rec['routing_number'];}?>"></td>
</tr>
<tr>
<td class="whitetxt">Account Number :</td>
</tr>
<tr>
<td><input type="text" name="account_number" id="account_number" class="textbox" value="<?php if(isset($_POST['account_number'])){echo $_POST['account_number'];}else{ echo $rec['account_number'];}?>"></td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td height="40px" bgcolor="#006699" class="whitetxt"></td>
<td bgcolor="#006699" class="whitetxt"> </td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td height="40px" colspan="2" class="heading_black">PLEASE
WRITE DOWN AND REMEMBER YOUR SALES ID NUMBER.</span>
This will be how we track which downloads will be
credited to you and pay you. <br><br>PLEASE WRITE YOUR
SALES ID NUMBER ON ANY CARDS YOU HAND OUT TO POTENTIAL
USERS. Remember to encourage the customer to
input your Sales ID Number.</td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="title" height="40px">Issued ID :</td>
<td><input type="text" name="sp_issued_sales_id" id="sp_issued_sales_id" class="textbox" value="<?php if(isset($_POST['sp_issued_sales_id'])){echo $_POST['sp_issued_sales_id'];}else{ echo $rec['sp_issued_sales_id'];}?>"></td>
<td> </td>
</tr>
<tr>
<td class="txt"> </td>
<td class="txt" height="27"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="title"> </td>
<td class="txt" height="27"><input type="submit" name="Back" value="Back" class="button"></td>
<td><input type="submit" name="Change" value="Change" class="button"></td>
<td> </td>
</tr>
<tr>
<td class="title"> </td>
<td class="title" height="27"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="title"> </td>
<td class="title" height="27"> </td>
<td class="msg"><?php echo $msg;?></td>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
[/php]