I'm trying to get a button to work , I'm not allowed to use Javascript and here's my code:
<form id="form1" name="form1" method="post" action="course_man.php">
for($i=0; $i <= $numcourses; $i++){
echo '<div class="new'.$i.'" id="new'.$i.'"><label>'.$course_names[$i].'</label>
<input name="edit'.$i.'" type="submit" value="Edit" />
<input name="delete'.$i.'" type="submit" value="Delete" /><br /></div>';
$name= "'edit".$i."'";
if (isset($_POST[$name])){
echo '<input name="text" type="text" value="'.$course_names[$i].'" />';
}
}
?></form>
Now the buttons gets created and no errors are displayed, but the edit button doesnt create the textfield when clicked, what am I doing wrong?
form(and what's it'saction)?