I am trying to update an infusion to work with PHP-Fusion 7 but am getting an undefined index error when I attempt to edit the profile. The weird thing is, the fields are still being displayed under the error messages. Here's the error I am getting:
Notice: Undefined index: user_Real Name_1 in /home/xxx/public_html/fusion7/infusions/custom_fields/profile_edit.php on line 9
and here is the contents on the profile_edit.php file:
<?php
$cats = dbquery("SELECT FROM ".$db_prefix."custom_fields_cats ORDER BY cat_order");
while($cat = mysql_fetch_object($cats))
{
$fields = dbquery("SELECT FROM ".$db_prefix."custom_fields WHERE field_cat = \"".$cat->cat_id."\" ORDER BY field_order");
if(dbrows($fields) > 0) echo "<table width=100% class='tbl-border'><tr class=tbl2><td colspan=2><b>".$cat->cat_name."</b></td></tr>";
while($field = mysql_fetch_object($fields))
{
$fieldVal = $userdata['user'.$field->field_name.''.$field->field_cat];
$fieldVal = str_replace("<br />", "", $fieldVal);
if($field->field_type==0) $input = "<input type=text name='".$field->field_id."' value='".$fieldVal."' class=textbox style='width:295px;'>";
else if($field->field_type==1) $input = "<textarea rows=4 style='width:295px;' name='".$field->field_id."' class=textbox>".$fieldVal."</textarea>";
else if($field->field_type==2) $input = "<textarea id='".$field->field_name."".$field->field_cat."' name='".$field->field_id."' rows='5' class='textbox' style='width:295px'>".$fieldVal."</textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('".$field->field_name."".$field->field_cat."', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('".$field->field_name."".$field->field_cat."', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('".$field->field_name."".$field->field_cat."', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('".$field->field_name."".$field->field_cat."', '', '');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('".$field->field_name."".$field->field_cat."', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('".$field->field_name."".$field->field_cat."', '
');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('".$field->field_name."".$field->field_cat."', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('".$field->field_name."_".$field->field_cat."', '[small]', '[/small]');\">";
echo "<tr><td>".$field->field_name.":".(($field->field_required == 1) ? "<font color=red>*</font>" : "")."</td>";
echo "<td>".$input."</td></tr>";
}
if(dbrows($fields) >0) echo "</table>";
tablebreak();
}
?>
Can anyone please help me fix this?