i am working on my master thesis and programming for this purpose a timetable planningsystem for my university. i need an interface with checkboxes to copy two variables from table a to table b by checking a box. the data for the first interface is done. it lists the data from the base table a and contains the checkboxes.
Code: Select all
....
//Datenausgabe
for ($i=0; $i<count($resultArray); $i++)
{
echo "<tr>";
echo "<td>";
echo $lecture_nr=$resultArray[$i][0];
echo "</td>";
echo "<td>";
echo $name_short=$resultArray[$i][1];
echo "</td>";
echo "<td>";
echo $name=$resultArray[$i][2];
echo "</td>";
echo "<td>";
echo $name_en=$resultArray[$i][3];
echo "</td>";
echo "<td>";
echo "<input type='checkbox' name='nr[]' value='$lecture_nr'>";
echo "</td>";
echo "</tr>";
}
echo "<tr>";
echo "<td colspan=2 align='right' bgcolor='#EEEEEE'>";
echo "<input type='submit' value='Daten kopieren'>";
echo "<input type='reset' value='Eingaben löschen'>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</form>";
}
else
{
$description = $_Post['name'];
foreach ($_REQUEST['nr'] as $course_nr)
{
$room_nr = '1';
$time_nr = '1';
$day_nr = '1';
if(!TimetablePlanning::copyLectureToCourse($link, $course_nr, $description, $room_nr, $time_nr, $day_nr))
{
handleError($link);
exit();
}
}
....now i want to copy also the lecture $name by declaring it as $description. how to do this ? is this problem solveable with checkboxes ?
sorry for my bad english in advance !
and also in advance thanks for help !
regards
juline
feyd | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]