Advertisement

05.04.2008 at 04:35PM PDT, ID: 23375422 | Points: 500
[x]
Attachment Details

How do I link a drop down list to a form in Dreamweaver?

Tags: Adobe, Dreamweaver CS3, PHP, MySQL, Dynamic drop down
I have two forms on one of my pages in Dreamweaver CS3 - a Find Teacher form (frm_FindTeacher) and an insert record form (frm_Teacher).  frm_FindTeacher simply has dynamic drop down list inside which gets the last name and first name of a teacher from a MySQL database.  What I need to do is display the rest of the information tied to those names in the form fields on frm_Teacher.  For example, the cell phone number of the teacher selected in the drop down list should display in the "Cell #" text field on the form.  Thank you!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
<?php require_once('Connections/LessonSync.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
}
 
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
 
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
	
  $logoutGoTo = "login.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php require_once('Connections/LessonSync.php'); ?>
<?php require_once('Connections/LessonSync.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
 
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO teacher (tFirst, tLast, tTelephone, tSpecialty1, tSpecialty2) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['tFirst'], "text"),
                       GetSQLValueString($_POST['tLast'], "text"),
                       GetSQLValueString($_POST['tTelephone'], "text"),
                       GetSQLValueString($_POST['tSpecialty1'], "text"),
                       GetSQLValueString($_POST['tSpecialty2'], "text"));
 
  mysql_select_db($database_LessonSync, $LessonSync);
  $Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
 
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
  $insertSQL = sprintf("INSERT INTO student (`first`, `last`, StreetAddress, City, `State`, ZIP, Hometelephone, WorkTelephone, dob, Instrument) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['first'], "text"),
                       GetSQLValueString($_POST['last'], "text"),
                       GetSQLValueString($_POST['StreetAddress'], "text"),
                       GetSQLValueString($_POST['City'], "text"),
                       GetSQLValueString($_POST['State'], "text"),
                       GetSQLValueString($_POST['ZIP'], "text"),
                       GetSQLValueString($_POST['Hometelephone'], "text"),
                       GetSQLValueString($_POST['WorkTelephone'], "text"),
                       GetSQLValueString($_POST['dob'], "date"),
                       GetSQLValueString($_POST['Instrument'], "text"));
 
  mysql_select_db($database_LessonSync, $LessonSync);
  $Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
 
if ((isset($_GET['teachID'])) && ($_GET['teachID'] != "")) {
  $deleteSQL = sprintf("DELETE FROM teacher WHERE teachID=%s",
                       GetSQLValueString($_GET['teachID'], "int"));
 
  mysql_select_db($database_LessonSync, $LessonSync);
  $Result1 = mysql_query($deleteSQL, $LessonSync) or die(mysql_error());
}
 
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form3")) {
  $insertSQL = sprintf("INSERT INTO student (`first`, `last`, StreetAddress, City, `State`, ZIP, Hometelephone, WorkTelephone, dob, Instrument, teacherID) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['first'], "text"),
                       GetSQLValueString($_POST['last'], "text"),
                       GetSQLValueString($_POST['StreetAddress'], "text"),
                       GetSQLValueString($_POST['City'], "text"),
                       GetSQLValueString($_POST['State'], "text"),
                       GetSQLValueString($_POST['ZIP'], "text"),
                       GetSQLValueString($_POST['Hometelephone'], "text"),
                       GetSQLValueString($_POST['WorkTelephone'], "text"),
                       GetSQLValueString($_POST['dob'], "date"),
                       GetSQLValueString($_POST['Instrument'], "text"),
                       GetSQLValueString($_POST['teacherID'], "text"));
 
  mysql_select_db($database_LessonSync, $LessonSync);
  $Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
 
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form3")) {
  $insertSQL = sprintf("INSERT INTO `user` (name, pass, teacherID, adminpriv) VALUES (%s, %s, %s, %s)",
                       GetSQLValueString($_POST['name'], "text"),
                       GetSQLValueString($_POST['pass'], "text"),
                       GetSQLValueString($_POST['teacherID'], "text"),
                       GetSQLValueString($_POST['adminpriv'], "text"));
 
  mysql_select_db($database_LessonSync, $LessonSync);
  $Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
 
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form7")) {
  $insertSQL = sprintf("INSERT INTO student (`first`, `last`, StreetAddress, City, `State`, ZIP, Hometelephone, WorkTelephone, dob, Instrument, teacherID, Stime, Etime, `Date`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['first'], "text"),
                       GetSQLValueString($_POST['last'], "text"),
                       GetSQLValueString($_POST['StreetAddress'], "text"),
                       GetSQLValueString($_POST['City'], "text"),
                       GetSQLValueString($_POST['State'], "text"),
                       GetSQLValueString($_POST['ZIP'], "text"),
                       GetSQLValueString($_POST['Hometelephone'], "text"),
                       GetSQLValueString($_POST['WorkTelephone'], "text"),
                       GetSQLValueString($_POST['dob'], "date"),
                       GetSQLValueString($_POST['Instrument'], "text"),
                       GetSQLValueString($_POST['teacherID'], "text"),
                       GetSQLValueString($_POST['Stime'], "text"),
                       GetSQLValueString($_POST['Etime'], "text"),
                       GetSQLValueString($_POST['Date'], "text"));
 
  mysql_select_db($database_LessonSync, $LessonSync);
  $Result1 = mysql_query($insertSQL, $LessonSync) or die(mysql_error());
}
 
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_Student = "SELECT * FROM student";
$rs_Student = mysql_query($query_rs_Student, $LessonSync) or die(mysql_error());
$row_rs_Student = mysql_fetch_assoc($rs_Student);
$totalRows_rs_Student = mysql_num_rows($rs_Student);
 
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_StudentList = "SELECT student.stuID,  CONCAT_WS(', ', student.`last`, student.`first`) AS student FROM student ORDER BY student.`last` ASC";
$rs_StudentList = mysql_query($query_rs_StudentList, $LessonSync) or die(mysql_error());
$row_rs_StudentList = mysql_fetch_assoc($rs_StudentList);
$totalRows_rs_StudentList = mysql_num_rows($rs_StudentList);
 
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_TeacherList = "SELECT teacher.teachID,  CONCAT_WS(', ', teacher.tLast, teacher.tFirst) AS teacher, teacher.tFirst, teacher.tLast, teacher.tTelephone, teacher.tSpecialty1, teacher.tSpecialty2, teacher.Address FROM teacher ORDER BY teacher.tLast ASC";
$rs_TeacherList = mysql_query($query_rs_TeacherList, $LessonSync) or die(mysql_error());
$row_rs_TeacherList = mysql_fetch_assoc($rs_TeacherList);
$totalRows_rs_TeacherList = mysql_num_rows($rs_TeacherList);
 
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_TeacherInfo = "SELECT teacher.teachID, teacher.tFirst, teacher.tLast, teacher.tTelephone, teacher.tSpecialty1, teacher.tSpecialty2, teacher.Address FROM teacher ORDER BY teacher.teachID ASC";
$rs_TeacherInfo = mysql_query($query_rs_TeacherInfo, $LessonSync) or die(mysql_error());
$row_rs_TeacherInfo = mysql_fetch_assoc($rs_TeacherInfo);
$totalRows_rs_TeacherInfo = mysql_num_rows($rs_TeacherInfo);
 
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_StudentInfo = "SELECT student.stuID, student.Instrument, student.dob, student.`first`, student.`last`, student.Hometelephone, student.WorkTelephone, student.StreetAddress, student.City, student.`State`, student.ZIP FROM student ORDER BY student.stuID ASC";
$rs_StudentInfo = mysql_query($query_rs_StudentInfo, $LessonSync) or die(mysql_error());
$row_rs_StudentInfo = mysql_fetch_assoc($rs_StudentInfo);
$totalRows_rs_StudentInfo = mysql_num_rows($rs_StudentInfo);
 
mysql_select_db($database_LessonSync, $LessonSync);
$query_rs_Tchr_TeacherList = "SELECT teacher.teachID, CONCAT_WS(', ', teacher.tLast, teacher.tFirst) AS teacher, teacher.tFirst, teacher.tLast, teacher.tTelephone, teacher.tSpecialty1, teacher.tSpecialty2, teacher.Address FROM teacher ORDER BY teacher.tLast ASC";
$rs_Tchr_TeacherList = mysql_query($query_rs_Tchr_TeacherList, $LessonSync) or die(mysql_error());
$row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList);
$totalRows_rs_Tchr_TeacherList = mysql_num_rows($rs_Tchr_TeacherList);
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #333333;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	background-color: #FFFFFF;
}
a:link {
	color: #FF3000;
	text-decoration: none;
}
a:visited {
	color: #CC6600;
	text-decoration: none;
}
a:hover {
	color: #999900;
	text-decoration: none;
}
a:active {
	color: #FF0000;
	text-decoration: none;
}
#wrapper {
	background-color: #FFFFFF;
	padding: 10px;
	width: 650px;
	margin-right: auto;
	margin-left: auto;
}
#heading {
}
-->
</style>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {color: #0000FF}
-->
</style>
</head>
 
<body>
<div id="wrapper">  
  <p><img src="Images/topbar.png" alt="logo" width="650" height="100" /><br />
  </p>
  <div id="TabbedPanels1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
      <li class="TabbedPanelsTab" tabindex="0">Students</li>
      <li class="TabbedPanelsTab" tabindex="0">Teachers</li>
      <li class="TabbedPanelsTab" tabindex="0">Users</li>
      <li class="TabbedPanelsTab" tabindex="0">Lessons</li>
      <li class="TabbedPanelsTab" tabindex="0">Make-Up Lesson</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
      <div class="TabbedPanelsContent">
        <strong>Students</strong>
        <form id="form4" name="form4" method="post" action="">
          <div align="right"><a href="<?php echo $logoutAction ?>">Log out</a></div>
        </form>
      <form id="Find Student" name="Find Student" method="post" action="">
          <label>
          
          Find Student
          <select name="list_FindStudent" id="list_FindStudent">
            <?php
do {  
?><option value="<?php echo $row_rs_StudentList['stuID']?>"><?php echo $row_rs_StudentList['student']?></option>
            <?php
} while ($row_rs_StudentList = mysql_fetch_assoc($rs_StudentList));
  $rows = mysql_num_rows($rs_StudentList);
  if($rows > 0) {
      mysql_data_seek($rs_StudentList, 0);
	  $row_rs_StudentList = mysql_fetch_assoc($rs_StudentList);
  }
?>
          </select>
</label>
      </form>
        
            <form action="<?php echo $editFormAction; ?>" method="post" name="form7" id="form7">
        <table align="center" cellpadding="5">
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">First Name</td>
            <td><input type="text" name="first" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Last Name</td>
            <td><input type="text" name="last" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Street Address</td>
            <td><input type="text" name="StreetAddress" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">City</td>
            <td><input type="text" name="City" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">State</td>
            <td><select name="State">
                <option value="New Jersey" <?php if (!(strcmp("New Jersey", ""))) {echo "SELECTED";} ?>>NJ</option>
              </select>
            </td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">ZIP/Postal Code</td>
            <td><input type="text" name="ZIP" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Home #</td>
            <td><input type="text" name="Hometelephone" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Work #</td>
            <td><input type="text" name="WorkTelephone" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">DoB</td>
            <td><input type="text" name="dob" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Instrument</td>
            <td><select name="Instrument">
                <option value="Bass Guitar" <?php if (!(strcmp("Bass Guitar", ""))) {echo "SELECTED";} ?>>Bass Guitar</option>
                <option value="Cello" <?php if (!(strcmp("Cello", ""))) {echo "SELECTED";} ?>>Cello</option>
                <option value="Clarinet" <?php if (!(strcmp("Clarinet", ""))) {echo "SELECTED";} ?>>Clarinet</option>
                <option value="Flute" <?php if (!(strcmp("Flute", ""))) {echo "SELECTED";} ?>>Flute</option>
                <option value="Guitar" <?php if (!(strcmp("Guitar", ""))) {echo "SELECTED";} ?>>Guitar</option>
                <option value="Piano" <?php if (!(strcmp("Piano", ""))) {echo "SELECTED";} ?>>Piano</option>
                <option value="Saxophone" <?php if (!(strcmp("Saxophone", ""))) {echo "SELECTED";} ?>>Saxophone</option>
                <option value="Trombone" <?php if (!(strcmp("Trombone", ""))) {echo "SELECTED";} ?>>Trombone</option>
                <option value="Trumpet" <?php if (!(strcmp("Trumpet", ""))) {echo "SELECTED";} ?>>Trumpet</option>
                <option value="Violin" <?php if (!(strcmp("Violin", ""))) {echo "SELECTED";} ?>>Violin</option>
                <option value="Voice" <?php if (!(strcmp("Voice", ""))) {echo "SELECTED";} ?>>Voice</option>
              </select>
            </td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Teacher</td>
            <td><select name="teacherID">
                <?php 
do {  
?>
                <option value="<?php echo $row_rs_TeacherList['teachID']?>" ><?php echo $row_rs_TeacherList['teacher']?></option>
                <?php
} while ($row_rs_TeacherList = mysql_fetch_assoc($rs_TeacherList));
?>
              </select>
            </td>
          </tr>
          <tr> </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Start Time</td>
            <td><select name="Stime">
                <option value="3:00 PM" <?php if (!(strcmp("3:00 PM", ""))) {echo "SELECTED";} ?>>3:00 PM</option>
                <option value="3:30 PM" <?php if (!(strcmp("3:30 PM", ""))) {echo "SELECTED";} ?>>3:30 PM</option>
              </select>
            </td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">End Time</td>
            <td><select name="Etime">
                <option value="3:00 PM" <?php if (!(strcmp("3:00 PM", ""))) {echo "SELECTED";} ?>>3:00 PM</option>
                <option value="3:30 PM" <?php if (!(strcmp("3:30 PM", ""))) {echo "SELECTED";} ?>>3:30 PM</option>
              </select>
            </td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Day</td>
            <td valign="baseline"><table>
                <tr>
                  <td><input type="radio" name="Date" value="m" />
                    Monday</td>
                </tr>
                <tr>
                  <td><input type="radio" name="Date" value="t" />
                    Tuesday</td>
                </tr>
                <tr>
                  <td><input type="radio" name="Date" value="w" />
                    Wednesday</td>
                </tr>
                <tr>
                  <td><input type="radio" name="Date" value="r" />
                    Thursday</td>
                </tr>
                <tr>
                  <td><input type="radio" name="Date" value="f" />
                    Friday</td>
                </tr>
                <tr>
                  <td><input type="radio" name="Date" value="s" />
                    Saturday</td>
                </tr>
            </table></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">&nbsp;</td>
            <td><input type="reset" name="btn_New2" id="btn_New2" value="New" />
              <input type="submit" value="Save" />
              <input type="submit" name="btn_DeleteStudent" id="btn_DeleteStudent" value="Delete" /></td>
          </tr>
        </table>
        <input type="hidden" name="MM_insert" value="form7" />
      </form>
      <p>&nbsp;</p>
      </div>
      <div class="TabbedPanelsContent">
      <strong>Teachers</strong>&nbsp;
      <form id="form2" name="form2" method="post" action="">
          <div align="right"><a href="<?php echo $logoutAction ?>" class="style2">Log out</a></div>
        </form>
        <form action="" method="get" name="frm_FindTeacher" id="frm_FindTeacher" >
          <label>Find Teacher
          <select name="list_FindTeacher" id="list_FindTeacher">
            <?php
do {  
?>
            <option value="<?php echo $row_rs_Tchr_TeacherList['teachID']?>"><?php echo $row_rs_Tchr_TeacherList['teacher']?></option>
            <?php
} while ($row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList));
  $rows = mysql_num_rows($rs_Tchr_TeacherList);
  if($rows > 0) {
      mysql_data_seek($rs_Tchr_TeacherList, 0);
	  $row_rs_Tchr_TeacherList = mysql_fetch_assoc($rs_Tchr_TeacherList);
  }
?>
          </select>
</label>
        </form>
        <form action="<?php echo $editFormAction; ?>" method="post" name="frm_Teacher" id="frm_Teacher">
          <p>&nbsp;</p>
          <table align="center" cellpadding="5">
            <tr valign="baseline">
              <td nowrap="nowrap" align="right"><span class="style1">First Name</span></td>
              <td><input name="tFirst" type="text" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right"><span class="style1">Last Name</span></td>
              <td><input name="tLast" type="text" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right"><span class="style1">Cell Phone</span></td>
              <td><input name="tTelephone" type="text" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right"><span class="style1">Instrument 1</span></td>
              <td><select name="tSpecialty1">
                <option value="Bass Guitar" <?php if (!(strcmp("Bass Guitar", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Bass Guitar</option>
                <option value="Cello" <?php if (!(strcmp("Cello", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Cello</option>
                <option value="Clarinet" <?php if (!(strcmp("Clarinet", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Clarinet</option>
                <option value="Flute" <?php if (!(strcmp("Flute", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Flute</option>
                <option value="Guitar" <?php if (!(strcmp("Guitar", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Guitar</option>
                <option value="Piano" <?php if (!(strcmp("Piano", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Piano</option>
                <option value="Saxophone" <?php if (!(strcmp("Saxophone", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Saxophone</option>
                <option value="Trombone" <?php if (!(strcmp("Trombone", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Trombone</option>
                <option value="Trumpet" <?php if (!(strcmp("Trumpet", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Trumpet</option>
                <option value="Violin" <?php if (!(strcmp("Violin", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Violin</option>
                <option value="Voice" <?php if (!(strcmp("Voice", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>Voice</option>
                <option value="value" <?php if (!(strcmp("value", $row_rs_TeacherInfo['tSpecialty1']))) {echo "selected=\"selected\"";} ?>>label</option>
                </select>              </td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right"><span class="style1">Instrument 2</span></td>
              <td><select name="tSpecialty2">
                  <option value="Bass Guitar" <?php if (!(strcmp("Bass Guitar", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Bass Guitar</option>
                  <option value="Cello" <?php if (!(strcmp("Cello", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Cello</option>
                  <option value="Clarinet" <?php if (!(strcmp("Clarinet", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Clarinet</option>
                  <option value="Flute" <?php if (!(strcmp("Flute", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Flute</option>
                  <option value="Guitar" <?php if (!(strcmp("Guitar", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Guitar</option>
                  <option value="Piano" <?php if (!(strcmp("Piano", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Piano</option>
                  <option value="Saxophone" <?php if (!(strcmp("Saxophone", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Saxophone</option>
                  <option value="Trombone" <?php if (!(strcmp("Trombone", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Trombone</option>
                  <option value="Trumpet" <?php if (!(strcmp("Trumpet", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Trumpet</option>
                  <option value="Violin" <?php if (!(strcmp("Violin", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Violin</option>
                  <option value="Voice" <?php if (!(strcmp("Voice", $row_rs_TeacherInfo['tSpecialty2']))) {echo "selected=\"selected\"";} ?>>Voice</option>
                </select>              </td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">&nbsp;</td>
              <td><input type="submit" value="Submit" /></td>
            </tr>
          </table>
          <input type="hidden" name="MM_insert2" value="New Teacher" />
          <table width="151" border="0" align="center">
            <tr>
              <td width="58" height="61"><label>
                  <div align="center">
                    <input type="button" name="btn_New" id="btn_New" value="New" />
                  </div>
                </label></td>
              <td width="83"><label>
                  <div align="center"></div>
                </label>
                  <label>
                  <input type="button" name="btn_Delete" id="btn_Delete" value="Delete" />
                  <div align="center"></div>
                </label></td>
            </tr>
          </table>
        </form>
      </div>
      <div class="TabbedPanelsContent">
        <label><strong>Users</strong><br />
        </label>
        <form id="form5" name="form4" method="post" action="">
          <div align="right"><a href="<?php echo $logoutAction ?>">Log out</a></div>
        </form>
        <label>
        <form action="<?php echo $editFormAction; ?>" method="post" name="form3" id="form3">
          <table align="center" cellpadding="5">
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">Username</td>
              <td><input type="text" name="name" value="" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">Password</td>
              <td><input type="text" name="pass" value="" size="32" /></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">Teacher:</td>
              <td><select name="teacherID">
                <?php
do {  
?>
                <option value="<?php echo $row_rs_TeacherList['teachID']?>"><?php echo $row_rs_TeacherList['teacher']?></option>
                <?php
} while ($row_rs_TeacherList = mysql_fetch_assoc($rs_TeacherList));
  $rows = mysql_num_rows($rs_TeacherList);
  if($rows > 0) {
      mysql_data_seek($rs_TeacherList, 0);
	  $row_rs_TeacherList = mysql_fetch_assoc($rs_TeacherList);
  }
?>
                </select>
              </td>
            </tr>
            <tr> </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">Administrator Privileges:</td>
              <td valign="baseline"><table>
                  <tr>
                    <td><input type="radio" name="adminpriv" value="y" <?php if (!(strcmp("n","y"))) {echo "CHECKED";} ?> />
                      Yes</td>
                  </tr>
                  <tr>
                    <td><input type="radio" name="adminpriv" value="n" <?php if (!(strcmp("n","No"))) {echo "CHECKED";} ?> />
                      No</td>
                  </tr>
              </table></td>
            </tr>
            <tr valign="baseline">
              <td nowrap="nowrap" align="right">&nbsp;</td>
              <td><input type="submit" value="Save" /></td>
            </tr>
          </table>
          <input type="hidden" name="MM_insert" value="form3" />
        </form>
        <p>&nbsp;</p>
        <br />
        <br />
        <br />
        <br />
        <br />
        </label>
      </div>
      <div class="TabbedPanelsContent">
        <strong>Lessons</strong>
        <form id="form6" name="form4" method="post" action="">
          <div align="right"><a href="<?php echo $logoutAction ?>">Log out</a></div>
        </form>
        <p><br />
        </p>
      </div>
      <div class="TabbedPanelsContent">
        <table width="650" border="0">
          <tr>
            <td colspan="2"><label>Student
                <select name="list_Student" id="list_Student">
                </select>
            </label></td>
          </tr>
          <tr>
            <td width="302"><label></label></td>
            <td width="338">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </div>
      <div class="TabbedPanelsContent">
        <table width="650" border="0">
          <tr>
            <td colspan="2"><label>Student
                <select name="list_Student2" id="list_Student2">
                </select>
            </label></td>
          </tr>
          <tr>
            <td colspan="2"><label>Teacher
                <select name="list_Teacher2" id="list_Teacher2">
                </select>
            </label></td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="2"><p>
              <label>
                <input type="radio" name="rd_ExtraTime" value="15Start" id="rd_ExtraTime_0" />
                Add 15 to Start</label>
              <br />
              <label>
                <input type="radio" name="rd_ExtraTime" value="15End" id="rd_ExtraTime_1" />
                Add 15 to End</label>
              <br />
              <label>
                <input type="radio" name="rd_ExtraTime" value="30Start" id="rd_ExtraTime_2" />
                Add 30 to Start</label>
              <br />
              <label>
                <input type="radio" name="rd_ExtraTime" value="30End" id="rd_ExtraTime_0" />
                Add 30 to End</label>
              <br />
            </p></td>
          </tr>
          <tr>
            <td colspan="2"><label>Reschedule?
                <input type="checkbox" name="cb_Reschedule" id="cb_Reschedule" />
            </label></td>
          </tr>
          <tr>
            <td height="28" colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
</body>
</html>
<?php
mysql_free_result($rs_Student);
 
mysql_free_result($rs_StudentList);
 
mysql_free_result($rs_TeacherList);
 
mysql_free_result($rs_TeacherInfo);
 
mysql_free_result($rs_StudentInfo);
 
mysql_free_result($rs_Tchr_TeacherList);
?>
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: hcmarks
Question Asked On: 05.04.2008
Participating Experts: 1
Points: 500
Views: 0
Translate:
Loading Advertisement...
05.04.2008 at 04:52PM PDT, ID: 21497448

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.04.2008 at 04:56PM PDT, ID: 21497460

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.04.2008 at 05:08PM PDT, ID: 21497486

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.04.2008 at 05:26PM PDT, ID: 21497516

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.04.2008 at 05:42PM PDT, ID: 21497548

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.04.2008 at 05:57PM PDT, ID: 21497577

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628