i need to strip away the $_GET[‘id’] value from the end of $k. example name=address158, 158 is the id.. so is there away to strlens 158 from ‘address’ by using $_GET[‘id’] as the reference?
foreach($_POST as $k=>$v){
@$select.=" `".mysql_real_escape_string($k)."` = '".mysql_real_escape_string($v)."',";
}
$select = rtrim($select,',');
$select = "UPDATE load_test SET".$select." WHERE Id=".$_GET['id'];
mysql_query($select);
Something like this, perhaps?
I’m assuming that the identifier is always at the end of the string.