Jump to content

Beasley

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by Beasley

  1. no i dont think so.. here i shall paste the whole code of the whole php file displayed in the jpg.. <?php // $Id: day.php 1571 2010-11-02 15:10:18Z cimorrison $ require_once "defaultincludes.inc"; require_once "mincals.inc"; require_once "theme.inc"; // Get non-standard form variables $timetohighlight = get_form_var('timetohighlight', 'int'); $debug_flag = get_form_var('debug_flag', 'int'); if (empty($debug_flag)) { $debug_flag = 0; } // Check the user is authorised for this page checkAuthorised(); // form the room parameter for use in query strings. We want to preserve room information // if possible when switching between views if (empty($room)) { $room_param = ""; } else { $room_param = "&room=$room"; } // print the page header print_header($day, $month, $year, $area, isset($room) ? $room : ""); $format = "Gi"; if ( $enable_periods ) { $format = "i"; $resolution = 60; $morningstarts = 12; $morningstarts_minutes = 0; $eveningends = 12; $eveningends_minutes = count($periods)-1; } // ensure that $morningstarts_minutes defaults to zero if not set if ( empty( $morningstarts_minutes ) ) { $morningstarts_minutes=0; } // Define the start and end of each day in a way which is not affected by // daylight saving... // dst_change: // -1 => no change // 0 => entering DST // 1 => leaving DST $dst_change = is_dst($month,$day,$year); $am7=mktime($morningstarts,$morningstarts_minutes,0, $month,$day,$year,is_dst($month,$day,$year,$morningstarts)); $pm7=mktime($eveningends,$eveningends_minutes,0, $month,$day,$year,is_dst($month,$day,$year,$eveningends)); ?> <div class="screenonly"> <div id="dwm_header"> <?php $sql = "select id, area_name from $tbl_area order by area_name"; $res = sql_query($sql); // Show all available areas // but only if there's more than one of them, otherwise there's no point if ($res && (sql_count($res)>1)) { echo "<div id=\"dwm_areas\">\n"; echo "<h3>".get_vocab("areas")."</h3>"; // need to show either a select box or a normal html list, // depending on the settings in config.inc.php if ($area_list_format == "select") { echo make_area_select_html('day.php', $area, $year, $month, $day); } else { // show the standard html list echo ("<ul>\n"); for ($i = 0; ($row = sql_row_keyed($res, $i)); $i++) { echo "<li><a href=\"day.php?year=$year&month=$month&day=$day&area=".$row['id']."\">"; echo "<span" . (($row['id'] == $area) ? ' class="current"' : '') . ">"; echo htmlspecialchars($row['area_name']) . "</span></a></li>\n"; } echo ("</ul>\n"); } echo "</div>\n"; } // Draw the three month calendars minicals($year, $month, $day, $area, $room, 'day'); echo "</div>"; ?> </div> <?php //y? are year, month and day of yesterday //t? are year, month and day of tomorrow // find the last non-hidden day $d = $day; do { $d--; $i= mktime(12,0,0,$month,$d,$year); } while (is_hidden_day(date("w", $i)) && ($d > $day - 7)); // break the loop if all days are hidden $yy = date("Y",$i); $ym = date("m",$i); $yd = date("d",$i); // find the next non-hidden day $d = $day; do { $d++; $i= mktime(12,0,0,$month,$d,$year); } while (is_hidden_day(date("w", $i)) && ($d < $day + 7)); // break the loop if all days are hidden $ty = date("Y",$i); $tm = date("m",$i); $td = date("d",$i); //We want to build an array containing all the data we want to show //and then spit it out. //Get all appointments for today in the area that we care about //Note: The predicate clause 'start_time <= ...' is an equivalent but simpler //form of the original which had 3 BETWEEN parts. It selects all entries which //occur on or cross the current day. $sql = "SELECT R.id AS room_id, start_time, end_time, name, repeat_id, E.id AS entry_id, type, E.description AS entry_description, status, E.create_by AS entry_create_by FROM $tbl_entry E, $tbl_room R WHERE E.room_id = R.id AND area_id = $area AND start_time <= $pm7 AND end_time > $am7 ORDER BY start_time"; $res = sql_query($sql); if (! $res) { fatal_error(0, sql_error()); } $today = array(); for ($i = 0; ($row = sql_row_keyed($res, $i)); $i++) { // Each row we've got here is an appointment. // row['room_id'] = Room ID // row['start_time'] = start time // row['end_time'] = end time // row['name'] = short description // row['repeat_id'] = repeat type // row['entry_id'] = id of this booking // row['type'] = type (internal/external) // row['entry_description'] = description // row['entry_create_by'] = Creator/owner of entry // row['status'] = Status code of the entry map_add_booking($row, $today[$row['room_id']][$day], $am7, $pm7, $format); } if ($debug_flag) { echo "<p>DEBUG:<pre>\n"; echo "\$dst_change = $dst_change\n"; echo "\$am7 = $am7 or " . date($format,$am7) . "\n"; echo "\$pm7 = $pm7 or " . date($format,$pm7) . "\n"; if (gettype($today) == "array") { while (list($w_k, $w_v) = each($today)) { while (list($t_k, $t_v) = each($w_v)) { while (list($k_k, $k_v) = each($t_v)) { echo "d[$w_k][$t_k][$k_k] = '$k_v'\n"; } } } } else { echo "today is not an array!\n"; } echo "</pre><p>\n"; } // We need to know what all the rooms area called, so we can show them all // pull the data from the db and store it. Convienently we can print the room // headings and capacities at the same time $sql = "SELECT room_name, capacity, id, description FROM $tbl_room WHERE area_id=$area ORDER BY sort_key"; $res = sql_query($sql); // It might be that there are no rooms defined for this area. // If there are none then show an error and don't bother doing anything // else if (! $res) { fatal_error(0, sql_error()); } if (sql_count($res) == 0) { echo "<h1>".get_vocab("no_rooms_for_area")."</h1>"; sql_free($res); } else { // Show current date and timezone echo "<div id=\"dwm\">\n"; echo "<h2>" . utf8_strftime("%A %d %B %Y", $am7) . "</h2>\n"; if ($display_timezone) { echo "<div class=\"timezone\">"; echo get_vocab("timezone") . ": " . date('T', $am7) . " (UTC" . date('O', $am7) . ")"; echo "</div>\n"; } echo "</div>\n"; // Generate Go to day before and after links $before_after_links_html = " <div class=\"screenonly\"> <div class=\"date_nav\"> <div class=\"date_before\"> <a href=\"day.php?year=$yy&month=$ym&day=$yd&area=$area$room_param\"><< ". get_vocab("daybefore") ." </a> </div> <div class=\"date_now\"> <a href=\"day.php?area=$area$room_param\">" . get_vocab("gototoday") . "</a> </div> <div class=\"date_after\"> <a href=\"day.php?year=$ty&month=$tm&day=$td&area=$area$room_param\">". get_vocab("dayafter") . " >> </a> </div> </div> </div>\n"; // and output them print $before_after_links_html; // Include the active cell content management routines. // Must be included before the beginnning of the main table. if ($javascript_cursor) // If authorized in config.inc.php, include the javascript cursor management. { echo "<script type=\"text/javascript\" src=\"xbLib.js\"></script>\n"; echo "<script type=\"text/javascript\">\n"; echo "//<![CDATA[\n"; echo "InitActiveCell(" . ($show_plus_link ? "true" : "false") . ", " . "true, " . ((FALSE != $row_labels_both_sides) ? "true" : "false") . ", " . "\"$highlight_method\", " . "\"" . get_vocab("click_to_reserve") . "\"" . ");\n"; echo "//]]>\n"; echo "</script>\n"; } // START DISPLAYING THE MAIN TABLE echo "<table class=\"dwm_main\" id=\"day_main\">\n"; ( $dst_change != -1 ) ? $j = 1 : $j = 0; // TABLE HEADER echo "<thead>\n"; $header = "<tr>\n"; // We can display the table in two ways if ($times_along_top) { // with times along the top and rooms down the side $start_first_slot = ($morningstarts*60) + $morningstarts_minutes; // minutes $start_last_slot = ($eveningends*60) + $eveningends_minutes; // minutes $start_difference = ($start_last_slot - $start_first_slot) * 60; // seconds $n_slots = ($start_difference/$resolution) + 1; $column_width = (int)(95 / $n_slots); $header .= "<th class=\"first_last\">" . get_vocab("room") . ":</th>"; for ( $t = mktime($morningstarts, $morningstarts_minutes, 0, $month, $day+$j, $year); $t <= mktime($eveningends, $eveningends_minutes, 0, $month, $day+$j, $year); $t += $resolution ) { $header .= "<th style=\"width: $column_width%\">"; if ( $enable_periods ) { // convert timestamps to HHMM format without leading zeros $time_t = date($format, $t); // and get a stripped version of the time for use with periods $time_t_stripped = preg_replace( "/^0/", "", $time_t ); $header .= $periods[$time_t_stripped]; } else { $header .= utf8_strftime(hour_min_format(),$t); } $header .= "</th>\n"; } // next: line to display times on right side if ( FALSE != $row_labels_both_sides ) { $header .= "<th class=\"first_last\">" . get_vocab("room") . ":</th>"; } } // end "times_along_top" view (for the header) else { // the standard view, with rooms along the top and times down the side $header .= "<th class=\"first_last\">" . ($enable_periods ? get_vocab("period") : get_vocab("time")) . ":</th>"; $column_width = (int)(95 / sql_count($res)); for ($i = 0; ($row = sql_row_keyed($res, $i)); $i++) { $header .= "<th style=\"width: $column_width%\"> <a href=\"week.php?year=$year&month=$month&day=$day&area=$area&room=".$row['id']."\" title=\"" . get_vocab("viewweek") . " &#10;&#10;".$row['description']."\">" . htmlspecialchars($row['room_name']) . ($row['capacity'] > 0 ? "(".$row['capacity'].")" : "") . "</a></th>"; $rooms[] = $row['id']; } // next line to display times on right side if ( FALSE != $row_labels_both_sides ) { $header .= "<th class=\"first_last\">" . ( $enable_periods ? get_vocab("period") : get_vocab("time") ) . ":</th>"; } } // end standard view (for the header) $header .= "</tr>\n"; echo $header; echo "</thead>\n"; // Now repeat the header in a footer if required if ($column_labels_both_ends) { echo "<tfoot>\n"; echo $header; echo "</tfoot>\n"; } // TABLE BODY LISTING BOOKINGS echo "<tbody>\n"; // This is the main bit of the display // We loop through time and then the rooms we just got // if the today is a day which includes a DST change then use // the day after to generate timesteps through the day as this // will ensure a constant time step // URL for highlighting a time. Don't use REQUEST_URI or you will get // the timetohighlight parameter duplicated each time you click. $hilite_url="day.php?year=$year&month=$month&day=$day&area=$area$room_param&timetohighlight"; $row_class = "even_row"; // We can display the table in two ways if ($times_along_top) { // with times along the top and rooms down the side for ($i = 0; ($row = sql_row_keyed($res, $i)); $i++, $row_class = ($row_class == "even_row")?"odd_row":"even_row") { echo "<tr>\n"; $room_id = $row['id']; $room_cell_link = "week.php?year=$year&month=$month&day=$day&area=$area&room=$room_id"; draw_room_cell($row, $room_cell_link); for ( $t = mktime($morningstarts, $morningstarts_minutes, 0, $month, $day+$j, $year); $t <= mktime($eveningends, $eveningends_minutes, 0, $month, $day+$j, $year); $t += $resolution ) { // convert timestamps to HHMM format without leading zeros $time_t = date($format, $t); // and get a stripped version of the time for use with periods $time_t_stripped = preg_replace( "/^0/", "", $time_t ); // calculate hour and minute (needed for links) $hour = date("H",$t); $minute = date("i",$t); // set up the query strings to be used for the link in the cell $query_strings = array(); $query_strings['new_periods'] = "area=$area&room=$room_id&period=$time_t_stripped&year=$year&month=$month&day=$day"; $query_strings['new_times'] = "area=$area&room=$room_id&hour=$hour&minute=$minute&year=$year&month=$month&day=$day"; $query_strings['booking'] = "area=$area&day=$day&month=$month&year=$year"; // and then draw the cell if (!isset($today[$room_id][$day][$time_t])) { $today[$room_id][$day][$time_t] = array(); // to avoid an undefined index NOTICE error } $cell_class = $row_class; draw_cell($today[$room_id][$day][$time_t], $query_strings, $cell_class); } // end for (looping through the times) if ( FALSE != $row_labels_both_sides ) { draw_room_cell($row, $room_cell_link); } echo "</tr>\n"; } // end for (looping through the rooms) } // end "times_along_top" view (for the body) else { // the standard view, with rooms along the top and times down the side for ( $t = mktime($morningstarts, $morningstarts_minutes, 0, $month, $day+$j, $year); $t <= mktime($eveningends, $eveningends_minutes, 0, $month, $day+$j, $year); $t += $resolution, $row_class = ($row_class == "even_row")?"odd_row":"even_row" ) { // convert timestamps to HHMM format without leading zeros $time_t = date($format, $t); // and get a stripped version of the time for use with periods $time_t_stripped = preg_replace( "/^0/", "", $time_t ); // calculate hour and minute (needed for links) $hour = date("H",$t); $minute = date("i",$t); // Show the time linked to the URL for highlighting that time echo "<tr>"; draw_time_cell($t, $time_t, $time_t_stripped, $hilite_url); // Loop through the list of rooms we have for this area while (list($key, $room_id) = each($rooms)) { // set up the query strings to be used for the link in the cell $query_strings = array(); $query_strings['new_periods'] = "area=$area&room=$room_id&period=$time_t_stripped&year=$year&month=$month&day=$day"; $query_strings['new_times'] = "area=$area&room=$room_id&hour=$hour&minute=$minute&year=$year&month=$month&day=$day"; $query_strings['booking'] = "area=$area&day=$day&month=$month&year=$year"; // and then draw the cell if (!isset($today[$room_id][$day][$time_t])) { $today[$room_id][$day][$time_t] = array(); // to avoid an undefined index NOTICE error } if (isset($timetohighlight) && ($time_t == $timetohighlight)) { $cell_class = "row_highlight"; } else { $cell_class = $row_class; } draw_cell($today[$room_id][$day][$time_t], $query_strings, $cell_class); } // next lines to display times on right side if ( FALSE != $row_labels_both_sides ) { draw_time_cell($t, $time_t, $time_t_stripped, $hilite_url); } echo "</tr>\n"; reset($rooms); } } // end standard view (for the body) echo "</tbody>\n"; echo "</table>\n"; print $before_after_links_html; show_colour_key(); } require_once "trailer.inc"; ?>
  2. * * o View Profile o Personal Message (Online) fetch variable from sql database « on: Today at 12:05:12 PM » * Quote I have this booking system. Now in the green it displays the student. and when i hover over it, it displays the tutor.. i want it to be able to display the tutor in the same box as the student without having to hover. inside the table ($tbl_entry), student = "name" tutor= "description" The coding where it fits in i believe is: $sql = "SELECT R.id AS room_id, start_time, end_time, name, repeat_id, E.id AS entry_id, type, E.description AS entry_description, status, E.create_by AS entry_create_by FROM $tbl_entry E, $tbl_room R WHERE E.room_id = R.id AND area_id = $area AND start_time <= $pm7 AND end_time > $am7 ORDER BY start_time"; thanks anyone who can help [attachment deleted by admin]
  3. ok i tried checkbox and it still only submits the last selected value... ?
  4. ok first lot, is the checkbox guaranteed to submit all ? and second off.. sorry i forgot to add it in.. Paid Until:<br><input type="text" name="paid" size=20> that would be the paid field.. so if they submit a date then it stays green but if they submit no it submit red. i dont know if this is possible... cheers denno...
  5. there is also another thing i could do with if you wouldnt mind while testing.. i need the paid field to submit font color="green" and if the client specifies no for it to show up font color="red" would this be possible all i could think of would be something like: if submit value="no" font color="red" else font color="green" i dont know if this would work and i dont know what the php coding would be for it... cheers
  6. sure, thanks denno: <html> <br> <title>Tutor database</title> <p><h3>Add Tutor to database</h3> <form name="Add Tutor" action="insert2.php" method="post"> First Name:<br><input type="text" name="firstname"><p> Last Name:<br><input type="text" name="lastname"><p> Date of Birth:<br> e.g. DD/MM/YYYY<br><input type="text" name="dob"><p> Address:<br> <textarea name="address" cols="30" rows="6"> </textarea><p> Postcode:<br><input type="text" name="postcode"><p> Telephone:<br> <input type="text" name="telephone" value=""><p> Mobile:<br> <input type="text" name="mobile" value=""><p> Email:<br> <input type="text" name="email"><p> Prefered Age Of Tuition: <select name="age"> <option value="Child">Child</option> <option value="Adult">Adult</option> <option value="No Preference">No Preference</option> </select><p> Main Instrument To Teach: <select name="instrument"> <option value="Guitar">Guitar</option> <option value="Guitar">Bass</option> <option value="Piano">Piano</option> <option value="Singing">Singing</option> <option value="Drums">Drums</option> <option value="Banjo">Banjo</option> <option value="Mandolin">Mandolin</option> <option value="Ukuele">Ukuele</option> <option value="Violin">Violin</option> <option value="Viola">Viola</option> <option value="Trumpet">Trumpet</option> <option value="Trombone">Trombone</option> <option value="Clarinet">Clarinet</option> <option value="Flute">Flute</option> <option value="Oboe">Oboe</option> <option value="Saxophone">Saxophone</option> <option value="Cello">Cello</option> <option value="Other">Other</option> </select> Level: <select name="level"> <option value="Beginner">Beginner</option> <option value="Intermediate">Intermediate</option> <option value="Advanced">Advanced</option> <option value="Specilist">Specilist</option> </select><P> Instrument 2: <select name="instrument2"> <option value="N/A">N/A</option> <option value="Guitar">Guitar</option> <option value="Guitar">Bass</option> <option value="Piano">Piano</option> <option value="Singing">Singing</option> <option value="Drums">Drums</option> <option value="Banjo">Banjo</option> <option value="Mandolin">Mandolin</option> <option value="Ukuele">Ukuele</option> <option value="Violin">Violin</option> <option value="Viola">Viola</option> <option value="Trumpet">Trumpet</option> <option value="Trombone">Trombone</option> <option value="Clarinet">Clarinet</option> <option value="Flute">Flute</option> <option value="Oboe">Oboe</option> <option value="Saxophone">Saxophone</option> <option value="Cello">Cello</option> <option value="Other">Other</option> </select> Level: <select name="level2"> <option value="N/A">N/A</option> <option value="Beginner">Beginner</option> <option value="Intermediate">Intermediate</option> <option value="Advanced">Advanced</option> <option value="Specilist">Specilist</option> </select><P> Instrument 3: <select name="instrument3"> <option value="N/A">N/A</option> <option value="Guitar">Guitar</option> <option value="Guitar">Bass</option> <option value="Piano">Piano</option> <option value="Singing">Singing</option> <option value="Drums">Drums</option> <option value="Banjo">Banjo</option> <option value="Mandolin">Mandolin</option> <option value="Ukuele">Ukuele</option> <option value="Violin">Violin</option> <option value="Viola">Viola</option> <option value="Trumpet">Trumpet</option> <option value="Trombone">Trombone</option> <option value="Clarinet">Clarinet</option> <option value="Flute">Flute</option> <option value="Oboe">Oboe</option> <option value="Saxophone">Saxophone</option> <option value="Cello">Cello</option> <option value="Other">Other</option> </select> Level: <select name="level3"> <option value="N/A">N/A</option> <option value="Beginner">Beginner</option> <option value="Intermediate">Intermediate</option> <option value="Advanced">Advanced</option> <option value="Specilist">Specilist</option> </select><P> Hours Of Availability:<br> <select name="availability" multiple="multiple" size="9"> <option value="Monday - Period 1">Monday - Period 1</option> <option value="Monday - Period 2">Monday - Period 2</option> <option value="Monday - Period 3">Monday - Period 3</option> <option value="Monday - Period 4">Monday - Period 4</option> <option value="Monday - Period 5">Monday - Period 5</option> <option value="Monday - Period 6">Monday - Period 6</option> <option value="Monday - Period 7">Monday - Period 7</option> <option value="Monday - Period 8">Monday - Period 8</option> <option value="Monday - Period 9">Monday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Tuesday - Period 1">Tuesday - Period 1</option> <option value="Tuesday - Period 2">Tuesday - Period 2</option> <option value="Tuesday - Period 3">Tuesday - Period 3</option> <option value="Tuesday - Period 4">Tuesday - Period 4</option> <option value="Tuesday - Period 5">Tuesday - Period 5</option> <option value="Tuesday - Period 6">Tuesday - Period 6</option> <option value="Tuesday - Period 7">Tuesday - Period 7</option> <option value="Tuesday - Period 8">Tuesday - Period 8</option> <option value="Tuesday - Period 9">Tuesday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Wednesday - Period 1">Wednesday - Period 1</option> <option value="Wednesday - Period 2">Wednesday - Period 2</option> <option value="Wednesday - Period 3">Wednesday - Period 3</option> <option value="Wednesday - Period 4">Wednesday - Period 4</option> <option value="Wednesday - Period 5">Wednesday - Period 5</option> <option value="Wednesday - Period 6">Wednesday - Period 6</option> <option value="Wednesday - Period 7">Wednesday - Period 7</option> <option value="Wednesday - Period 8">Wednesday - Period 8</option> <option value="Wednesday - Period 9">Wednesday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Thursday - Period 1">Thursday - Period 1</option> <option value="Thursday - Period 2">Thursday - Period 2</option> <option value="Thursday - Period 3">Thursday - Period 3</option> <option value="Thursday - Period 4">Thursday - Period 4</option> <option value="Thursday - Period 5">Thursday - Period 5</option> <option value="Thursday - Period 6">Thursday - Period 6</option> <option value="Thursday - Period 7">Thursday - Period 7</option> <option value="Thursday - Period 8">Thursday - Period 8</option> <option value="Thursday - Period 9">Thursday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Friday - Period 1">Friday - Period 1</option> <option value="Friday - Period 2">Friday - Period 2</option> <option value="Friday - Period 3">Friday - Period 3</option> <option value="Friday - Period 4">Friday - Period 4</option> <option value="Friday - Period 5">Friday - Period 5</option> <option value="Friday - Period 6">Friday - Period 6</option> <option value="Friday - Period 7">Friday - Period 7</option> <option value="Friday - Period 8">Friday - Period 8</option> <option value="Friday - Period 9">Friday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Saturday - Period 1">Saturday - Period 1</option> <option value="Saturday - Period 2">Saturday - Period 2</option> <option value="Saturday - Period 3">Saturday - Period 3</option> <option value="Saturday - Period 4">Saturday - Period 4</option> <option value="Saturday - Period 5">Saturday - Period 5</option> <option value="Saturday - Period 6">Saturday - Period 6</option> <option value="Saturday - Period 7">Saturday - Period 7</option> <option value="Saturday - Period 8">Saturday - Period 8</option> <option value="Saturday - Period 9">Saturday - Period 9</option> </select> <br>Press + Hold Ctrl For Multiple</p> Notes:<br> <textarea name="notes" cols="70" rows="6">N/A </textarea><p> <input type="hidden" name="date"> Date CRB Issued:<br><input type="text" name="crbiss" size=20> Date CRB Expired:<br><input type="text" name="crbexp" size=20> <input type="submit" value="Add"/> </form> </html>
  7. sure.. it sends to insert2.php which contains.. <?php $date = date("F j, Y"); header("Location:tutoradd.php"); $con = mysql_connect("localhost", "123", "123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("a9387329_mrbs", $con); $sql="INSERT INTO mrbs_tutor (firstname, lastname, dob, address, postcode, telephone, mobile, email, age, instrument, level, instrument2, level2, instrument3, level3, availability, notes, date, crbiss, crbexp) VALUES ('$_POST[firstname]', '$_POST[lastname]', '$_POST[dob]', '$_POST[address]', '$_POST[postcode]', '$_POST[telephone]', '$_POST[mobile]', '$_POST[email]', '$_POST[age]', '$_POST[instrument]', '$_POST[level]', '$_POST[instrument2]', '$_POST[level2]', '$_POST[instrument3]', '$_POST[level3]', '$_POST[availability]', '$_POST[notes]', '$date', '$_POST[crbiss]', '$_POST[crbexp]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Tutor added"; mysql_close($con) ?>
  8. Hi i would like to submit the following code to my database as a mutiple selection box. when i submit i just get the last selected value for example if i hold ctrl and press 1 2 3 4 i am only receiving 4 on my database. any ideas? thanks in advance for any help! Hours Of Availability:<br> <select name="availability" multiple="multiple" size="9"> <option value="Monday - Period 1">Monday - Period 1</option> <option value="Monday - Period 2">Monday - Period 2</option> <option value="Monday - Period 3">Monday - Period 3</option> <option value="Monday - Period 4">Monday - Period 4</option> <option value="Monday - Period 5">Monday - Period 5</option> <option value="Monday - Period 6">Monday - Period 6</option> <option value="Monday - Period 7">Monday - Period 7</option> <option value="Monday - Period 8">Monday - Period 8</option> <option value="Monday - Period 9">Monday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Tuesday - Period 1">Tuesday - Period 1</option> <option value="Tuesday - Period 2">Tuesday - Period 2</option> <option value="Tuesday - Period 3">Tuesday - Period 3</option> <option value="Tuesday - Period 4">Tuesday - Period 4</option> <option value="Tuesday - Period 5">Tuesday - Period 5</option> <option value="Tuesday - Period 6">Tuesday - Period 6</option> <option value="Tuesday - Period 7">Tuesday - Period 7</option> <option value="Tuesday - Period 8">Tuesday - Period 8</option> <option value="Tuesday - Period 9">Tuesday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Wednesday - Period 1">Wednesday - Period 1</option> <option value="Wednesday - Period 2">Wednesday - Period 2</option> <option value="Wednesday - Period 3">Wednesday - Period 3</option> <option value="Wednesday - Period 4">Wednesday - Period 4</option> <option value="Wednesday - Period 5">Wednesday - Period 5</option> <option value="Wednesday - Period 6">Wednesday - Period 6</option> <option value="Wednesday - Period 7">Wednesday - Period 7</option> <option value="Wednesday - Period 8">Wednesday - Period 8</option> <option value="Wednesday - Period 9">Wednesday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Thursday - Period 1">Thursday - Period 1</option> <option value="Thursday - Period 2">Thursday - Period 2</option> <option value="Thursday - Period 3">Thursday - Period 3</option> <option value="Thursday - Period 4">Thursday - Period 4</option> <option value="Thursday - Period 5">Thursday - Period 5</option> <option value="Thursday - Period 6">Thursday - Period 6</option> <option value="Thursday - Period 7">Thursday - Period 7</option> <option value="Thursday - Period 8">Thursday - Period 8</option> <option value="Thursday - Period 9">Thursday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Friday - Period 1">Friday - Period 1</option> <option value="Friday - Period 2">Friday - Period 2</option> <option value="Friday - Period 3">Friday - Period 3</option> <option value="Friday - Period 4">Friday - Period 4</option> <option value="Friday - Period 5">Friday - Period 5</option> <option value="Friday - Period 6">Friday - Period 6</option> <option value="Friday - Period 7">Friday - Period 7</option> <option value="Friday - Period 8">Friday - Period 8</option> <option value="Friday - Period 9">Friday - Period 9</option> </select> <select name="availability" multiple="multiple" size="9"> <option value="Saturday - Period 1">Saturday - Period 1</option> <option value="Saturday - Period 2">Saturday - Period 2</option> <option value="Saturday - Period 3">Saturday - Period 3</option> <option value="Saturday - Period 4">Saturday - Period 4</option> <option value="Saturday - Period 5">Saturday - Period 5</option> <option value="Saturday - Period 6">Saturday - Period 6</option> <option value="Saturday - Period 7">Saturday - Period 7</option> <option value="Saturday - Period 8">Saturday - Period 8</option> <option value="Saturday - Period 9">Saturday - Period 9</option> </select> <br>Press + Hold Ctrl For Multiple</p>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.