function problems
Posted: Mon Jan 11, 2010 1:45 pm
having a problem with my function for some reason.
i get an error on line 9
i get an error on line 9
Code: Select all
function skill_update($skill, $dbskill, $UIDs) {
$valuea = 1;
$valueb = 0;
if ($skill == 1){
$sqlCha1="Update skills SET $dbskill = ('$valuea') Where UserID= ('$UIDs')";
mysql_query($sqlCha1,$dbConn);
}
else{
$sqlCha2="Update skills SET $dbskill = ('$valueb') Where UserID= ('$UIDs')";
mysql_query($sqlCha2,$dbConn);
}
}
//variables
$dance=mysql_real_escape_string($_POST['Dancecheck']);
$poetry=mysql_real_escape_string($_POST['Poetrycheck']);
$film=mysql_real_escape_string($_POST['Filmcheck']);
$animation=mysql_real_escape_string($_POST['Animationcheck']);
$ID=mysql_real_escape_string($_POST['ID']);
//use
skill_update('$dance', 'dancer', '$ID');
skill_update('$poetry', 'peot', '$ID');
skill_update('$film', 'film', '$ID');
skill_update('$animation', 'anim', '$ID');