Reputation: 1
Please give some idea. how to solve the error?
echo "<td class='bold'>Race Category<span class='star'>*</span></td>";
$array_all=array('name'=>'race_category','value'=>$s_race_category,'type'=>'RACE_CATEGORY','style'=>"class='selectbox'",'javascript'=>'','default'=>'');
echo "<td>";
echo $this->model_students->getAll($array_all);
echo "</td>";
The error:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: s_race_category
Filename: templates/forms.php
Line Number: 46
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: s_programme
Filename: templates/forms.php
Line Number: 124
Upvotes: -3
Views: 29507
Reputation: 4153
The severity says "Notice", meaning they won't break your page but they indicate something else. In this case you probably haven't defined your variables before you use them.
try assigning a value to the variables like:
$s_race_category = "";
$s_programme = "";
You are seeing these notices because of the PHP error reporting level, you can read more about it here
Upvotes: 0