function updatemodels(){
$sql = "UPDATE Sitemodels SET name=' .$_REQUEST[name] . ',
age=' . $_REQUEST[age] . ', friendid=' .$_REQUEST[friendid] . ', month=' .$_REQUEST[month] . ', year=' .$_REQUEST[year] . ' WHERE modelid=' .$_REQUEST[modelid] . ';";
$result = mysql_query($sql);
echo "Thank you! Information updated.\n";
modellists();
}
Yes, you've mixed up your " and your '.
You are writing $sql in a string within "" but then you're still using the period to add in your other strings.
You should write it like this:
function updatemodels(){
$sql = "UPDATE Sitemodels SET name='".$_REQUEST[name]."',
age=".$_REQUEST[age].", friendid=".$_REQUEST[friendid].", month=".$_REQUEST[month].", year=".$_REQUEST[year]." WHERE modelid=".$_REQUEST[modelid];
$result = mysql_query($sql);
echo "Thank you! Information updated.\n";
modellists();
}
I've made the gross assumption that the 'name' field is a string field and therefore will need ' on either side of the value, while the others are all numeric and therefore need no quote marks.