PHP数据输入(SQL)

I have a form that posts to a PHP page. This is a snippet of the page. The goal is to read out a SQL table and then you click on the text values and they are editable. You then edit them and submit and it updates the SQL table. I basically need a way to strip the letter from the beginning of the id. but the letter is important because it defines in what column the new information goes into. Also if there is a different language or method to do this, I am open to suggestions.

<script type="text/javascript">
function exchange(id){
    var ie=document.all&&!window.opera? document.all : 0
    var frmObj=ie? ie[id] : document.getElementById(id)
    var toObj=ie? ie[id+'b'] : document.getElementById(id+'b')
    toObj.style.width=frmObj.offsetWidth+7+'px'
    frmObj.style.display='none';
    toObj.style.display='inline';
    toObj.value=frmObj.innerHTML
}
</script>
<?php
$result = mysqli_query($con,"SELECT * FROM List") or die(mysql_error());
var_dump($_POST);

echo "<table id=list>
<tr id='list_header'>
<th class='list'>ID</th>
<th class='list'>Description</th>
<th class='list'>Winner</th>
</tr><form name='edit' action='inde.php?id=prizes' method='post'>";

while($row = mysqli_fetch_array($result))
{
    echo "<tr>";
    echo "<td class='list'><span id='n" . $row['Number'] . "' onclick='exchange(this.id)'>" . $row['Number'] . "</span><input name='n" . $row['Number'] . "b' id='n" . $row['Number'] . "b' class='replace' type='text' value='" . $row['Number'] . "' style='display:none;'></td>";
    echo "<td class='list'><span id='d" . $row['Number'] . "' onclick='exchange(this.id)'>" . $row['Description'] . "</span><input name='d" . $row['Number'] . "b' id='d" . $row['Number'] . "b' class='replace' type='text' value='" . $row['Description'] . "' style='display:none;'></td>";
    echo "<td class='list'><span id='w" . $row['Number'] . "' onclick='exchange(this.id)'>" . $row['Winner'] . "</span><input name='w" . $row['Number'] . "b' id='w" . $row['Number'] . "b' class='replace' type='text' value='" . $row['Winner'] . "' style='display:none;'></td>";
    echo "<td></td>";

    echo "</tr>";
}
echo "</table><input type='submit' value='Save Changes'></form>";
?>`

From what I understand you have a string id and you want to do the following:

if(strlen($id)>1){
    $important=substr($id, 0, 1); //that gets the important stuff
    $id = ($id, 1, strlen($id)); //that's id without the first char
}
else{
    $important=$id;
    $id=""; //empty string
}

You may want to try Ajax to send the modified values to the server one by one instead of all together at the end.