Click here to Skip to main content
14,336,236 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am working on a project, using PHP and MySQL. I have a problem that is undefined index error, i tried my best to remove it by many techniques but nothing happened, so i came here to get the correct answer i hope anyone will get me the correct reply thanks in advance.

i am using two forms in one page that is some thing like this
please check the whole code lines for forms input tag (51 to 55) and (69 to 74)

the source code is:
if($query_run = mysql_query($query)){
while($query_array = mysql_fetch_assoc($query_run)){
$TeacherFirstName = $query_array['Tfirst_name'];
$TeacherLastName = $query_array['Tlast_name'];

$fullName = $TeacherFirstName.' '.$TeacherLastName;



echo '
Teacher Name
';
echo '
';
echo '<input type="text" name="TeacherName" value="' .htmlspecialchars($fullName). '" disabled="disabled" />';
echo '<input type="submit" value="Fill Teachers Form" />
';
}
}else{
echo 'Query Failed to be executed.....';
}
echo '</form>';
?>

if($query_run = mysql_query($query)){
		while($query_array = mysql_fetch_assoc($query_run)){
		$courseTitle = $query_array['CourseTitle'];
		$courseCode = $query_array['CourseCode'];
		?>	
        <form action="course-evaluation-form.php" method="post">        			
		<tr><td>Course Title</td><td><input type="text" size="25" name="CourseTitle" disabled="disabled" value="<?=$courseTitle;?>" >
         <input type="submit" value="Fill Course Form"  />
        </td><td>Course Code</td><td>
		<?php echo $courseCode; ?></td></tr>       
        </form>

?>
and the other two files code is simple short like this
include('core/init.php');
include('include/header.php');

$coursTitle = $_POST['courseTitle'];
echo $coursTitle;
?>
Please reply me must its urgent

What I have tried:

I have tried to solve the problem which is on line numbers (51 to 55) and (69 to 74)
by many techniques which were introduced on different forums, but i couldn't find what i need
Posted
Updated 17-Feb-16 10:09am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100