Jump to content

mfandel

Members
  • Posts

    14
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

mfandel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey.... thanks for all your help. It really pointed me in the right direction.... I finally found the correct session variable and it works like a charm. $result = mysql_query("SELECT SUM(reservation_pax) FROM reservations WHERE reservation_time = '8:00:00' AND reservation_date = '{$_SESSION['selectedDate']}' AND reservation_hidden ='0'") ; if($result === FALSE) { die(mysql_error()); // TODO: better error handling } while($row = mysql_fetch_array($result)) { echo $row['SUM(reservation_pax)']; } ?>
  2. Thank the syntax was perfect...no errors. Though it doesn't give me the date dynamically. I guess my poor hunch and research about sessions gave me the impression that if I copied that $_SESSION['selectedDate'] it would dynamically give me the the data for the date automatically as it was used early in the file, but no luck. I am going to have to do some research and dig into the original code to see how to setup using the selected date. It is a big deal breaker that I didn't consider... It works fine as long as I don't navigate to another date. If I do it shows me the counts for the manual date I entered on all dates.... big oops, so I have to figure out how to make it dynamic based on date selected. So I have to figure out a way to get it to read the date the user selected when page loaded. If you can point me in any direction or place to read up on attempting this let me know or even better if in the original code above you know or can see anything I can call that would give me the session. Thanks for all the help I am a lot farther along for sure.
  3. thanks for the clarification. WHat would be the correct way to replace the 2014-10-24 with the $_SESSION['selectedDate']
  4. That worked great! So what I have working is below... my final question is how to pass a variable for the selected date rather than having to enter the date manually. $result = mysql_query("SELECT SUM(reservation_pax) FROM reservations WHERE reservation_time = '8:00:00' AND reservation_date = '2014-10-27' AND reservation_hidden ='0'") ; if($result === FALSE) { die(mysql_error()); // TODO: better error handling } while($row = mysql_fetch_array($result)) { echo $row['SUM(reservation_pax)']; } ?> When I try to use the $session information I get a syntax error: $_SESSION['selectedDate'] $result = mysql_query("SELECT SUM(reservation_pax) FROM reservations WHERE reservation_time = '8:00:00' AND reservation_date = $_SESSION['selectedDate'] AND reservation_hidden ='0'") ; I don't know if relevant, but I have to drop the single quotes around the table names to get it to not give me an error.
  5. ok... thanks for the help... with a little more research I am getting close. I was able to get it to total and display... though I need to narrow by one more parameter. That is giving me the total guest count (reservation_pax) for all reservations. I need to do it by the given date or session. The page shows only reservation for the date selected, but script counts all days with reservations at 8:00. Here is what I got working from what you shared.... Just need help to narrow by session page is already creating for specific date being viewed. <?php $result = mysql_query("SELECT SUM(reservation_pax) FROM reservations WHERE reservation_time = '8:00' ") ; if($result === FALSE) { die(mysql_error()); // TODO: better error handling } while($row = mysql_fetch_array($result)) { echo $row['SUM(reservation_pax)']; } ?> <?php echo _guest_summary;?></td> <td></td> <?php if($_SESSION['wait'] == 0){ //echo "<td></td>"; } ?>
  6. I am having trouble getting the data to display: Here is what I have so far, but not working or displaying anything: <?php $query = 'SELECT SUM(`reservation_pax`) FROM `reservations` WHERE `reservation_time` = 8:00' ; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo $row['SUM(reservation_pax)']; } ?>
  7. Sorry for any confusion. I thought or meant them to be the same. I was just trying to clarify the table headings in mysql. Guest count is related to reservation_pax and time of reservation is reservation_time. Thanks for the input... I hate to be completely stupid and have been trying to research how I would add your suggestion to my php file. I know very little about php and mysql. Every way I have tried to add the suggestion which looks like what I need I get parse errors. So unsure how to implement. In my research I also tried this which gives me a parse error, but thought maybe this would work form your post and research. $guestsum2 += $row->reservation_pax WHERE reservation_time = '8:00'; Parse error: syntax error, unexpected '`', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in – Trying to research the error but haven't got much farther than how I am coding or including is not correct.
  8. after posting... I guess this might be a little vague. I apologize as I am not very familiar or savvy with php. I just need to be able to count guest based on of the column reservation_time. SO I guess to clarify what I am trying to do is add the total in reservation_pax for or based on a specific reservation_time in another table row. I have read several items, posts and php tutorials, but can't seem to get them applied in this file or to work. It seems fairly basic, but beyond my grasp and hoping someone can shed some light. THanks!
  9. This code works just fine to display a list of reservations for a given day and sums the guest and table counts just fine for the entire day. Sums all reservations returned. What I am trying to do or figure out is a way to get totals based on specific time intervals. For example how many guests and tables at 8:00, 9:00, 10:00, etc.... I can see where the sums are calculated, but need help adding a way to add a variable to look at the reservation_time and sum by hour rather than just daily total. $tablesum ++; $guestsum += $row->reservation_pax; <?php echo $guestsum;?> <?php echo _guest_summary;?> The full code that pulls in the data and then sums it up in total: <!-- Begin reservation table data --> <br/> <table class="global resv-table-small" cellpadding="0" cellspacing="0"> <tbody> <tr> <?php echo "<td class='noprint'> </td>"; echo "<td>Time</td>"; echo "<td>Guests/Type</td>"; echo "<td>Name</td>"; echo "<td>Special Instructions/Notes</td>"; echo "<td class='noprint'>Table</td>"; echo "<td class='noprint'>Status</td>"; echo "<td class='noprint'>Created</td>"; echo "<td class='noprint'>Details/Delete</td>"; echo "</tr>"; // Clear reservation variable $reservations =''; if ($_SESSION['page'] == 1) { $reservations = querySQL('all_reservations'); }else{ $reservations = querySQL('reservations'); } // reset total counters $tablesum = 0; $guestsum = 0; if ($reservations) { //start printing out reservation grid foreach($reservations as $row) { // reservation ID $id = $row->reservation_id; $_SESSION['reservation_guest_name'] = $row->reservation_guest_name; // check if reservation is tautologous $tautologous = querySQL('tautologous'); echo "<tr id='res-".$id."'>"; echo "<td"; // daylight coloring if ($row->reservation_time > $daylight_evening){ echo " class='evening noprint'"; }else if ($row->reservation_time > $daylight_noon){ echo " class='afternoon noprint'"; }else if ($row->reservation_time < $daylight_noon){ echo " class='morning noprint'"; } echo " style='width:10px !important; padding:0px;'> </td>"; echo "<td id='tb_time'"; // reservation after maitre message if ($row->reservation_timestamp > $maitre['maitre_timestamp'] && $maitre['maitre_comment_day']!='') { echo " class='tautologous' title='"._sentence_13."' "; } echo ">"; echo "<strong>".formatTime($row->reservation_time,$general['timeformat'])."</strong></td>"; echo "<td id='tb_pax'><strong class='big'>".$row->reservation_pax."</strong> <span class='noprint'>"; printType($row->reservation_hotelguest_yn); //echo "<img src='images/icons/user-silhouette.png' class='middle'/>"; echo "</span></td><td style='width:10%' id='tb_name'><span class='noprint'>".printTitle($row->reservation_title)."</span><strong> <a id='detlbuttontrigger' href='ajax/guest_detail.php?id=".$id."'"; // color guest name if tautologous if($tautologous>1){echo" class='tautologous tipsy' title='"._tautologous_booking."'";} echo ">".$row->reservation_guest_name."</a></strong>"; // old reservations symbol if( (strtotime($row->reservation_timestamp) + $general['old_days']*86400) <= time() ){ echo "<img src='images/icons/clock-bolt.png' class='help tipsyold middle smicon' title='"._sentence_11."' />"; } // recurring symbol if ($row->repeat_id !=0) { echo " <img src='images/icons/loop-alt.png' alt='"._recurring. "' title='"._recurring."' class='tipsy' border='0' >"; } echo"</td><td style='width:10%' id='tb_note'>"; if ($_SESSION['page'] == 1) { echo $row->outlet_name; }else{ echo $row->reservation_notes; } echo "</td>"; if($_SESSION['wait'] == 0){ echo "<td class='big tb_nr' style='width:85px;' id='tb_table'><img src='images/icons/table_II.png' class='tipsy leftside noprint' title='"._table."' /><div id='reservation_table-".$id."' class='inlineedit'>".$row->reservation_table."</div></td>"; } echo "<td class='noprint'><div>"; getStatusList($id, $row->reservation_status); echo "</div></td>"; echo "<td class='noprint'>"; echo "<small>".$row->reservation_booker_name." | ".humanize($row->reservation_timestamp)."</small>"; echo "</td>"; echo "<td class='noprint'>"; // MOVE BUTTON // echo "<a href=''><img src='images/icons/arrow.png' alt='move' class='help' title='"._move_reservation_to."'/></a>"; // WAITLIST ALLOW BUTTON if($_SESSION['wait'] == 1){ $leftspace = leftSpace(substr($row->reservation_time,0,5), $availability); if($leftspace >= $row->reservation_pax && $_SESSION['outlet_max_tables']-$tbl_availability[substr($row->reservation_time,0,5)] >= 1){ echo" <a href='#' name='".$id."' class='alwbtn'><img src='images/icons/check-alt.png' name='".$id."' alt='"._allow."' class='help' title='"._allow."'/></a> "; } } // EDIT/DETAIL BUTTON echo "<a href='?p=102&resID=".$id."'><img src='images/icons/pen-fill.png' alt='"._detail."' class='help' title='"._detail."'/></a> "; // DELETE BUTTON if ( current_user_can( 'Reservation-Delete' ) && $q!=3 ){ echo"<a href='#modalsecurity' name='".$row->repeat_id."' id='".$id."' class='delbtn'> <img src='images/icons/delete.png' alt='"._cancelled."' class='help' title='"._delete."'/></a>"; } echo"</td></tr>"; $tablesum ++; $guestsum += $row->reservation_pax; } } ?> </tbody> <tfoot> <tr style="border:1px #000;"> <td class=" noprint"></td><td></td> <td colspan="2" class="bold"><?php echo $guestsum;?> <?php echo _guest_summary;?></td> <td></td> <td colspan="2" class="bold"><?php echo $tablesum;?> <?php echo _tables_summary;?></td> <?php if($_SESSION['wait'] == 0){ //echo "<td></td>"; } ?> </tr> </tfoot> </table> <!-- End reservation table data -->
  10. Ok I think I have it. I was changing the value $day_number=1 to a different number. I wasn't changing the $first_day = 1. When I changed $first_day = 5 it seems to work. Does this seem like it is correct or going to cause me other issues?
  11. I am trying to dig into this and tracked back to some additional code that might be relevant // Bar Plot Guest by weekday/month $data_wk = array(); $label_wk = array(); $statistic = querySQL('statistic_weekday'); foreach ($statistic as $key => $value) { foreach($value as $paxsum){ $label_wk[] = $key; $data_wk[] = $paxsum; } }
  12. Problem: the php code is returning the wrong day of the week on a statistics report the software generates. So when you go run the statistics page and it queries the DB it returns a value but the wrong day label shows up. In my test case I have data only on Thursday of the month and when I run the report it shows up as data for Sunday. Here are what I assume are the two section of code from my research.. rather than posting the entire php file. I guess at least I think I narrowed down the code section...small victories. The code used to get the first day of the month is (which i have seen out there and compared and looks like it is correct): function get_first_day($day_number=1, $month=false, $year=false) { $month = ($month === false) ? strftime("%m"): $month; $year = ($year === false) ? strftime("%Y"): $year; $first_day = 1 + ((7+$day_number - strftime("%w", mktime(0,0,0,$month, 1, $year)))%7); return mktime(0,0,0,$month, $first_day, $year); } Before I go on I have also tried to set $day_number=1 to various values 0-6, but seems to have no effect. I read several post that setting that value was the problem, but made no difference for me. I thought maybe the "session" was causing the issue after trying to learn about them, so I tried to log out and log back in clear my cache and also change browsers after changing the value but that got me nowhere. The code I guess you would say that calls this??? to generate the output report that is not correct is: <table id="graph_weekday" class="data" style="display:none" cellpadding="0" cellspacing="0" width="100%"> <caption><?php echo _occupancy_per_week." / "._days;?></caption> <thead> <tr> <td class="no_input"> </td> <?php foreach ($label_wk as $value) { echo "<th>".strftime("%A", get_first_day($value, $_SESSION['statistic_month'], $_SESSION['selectedDate_year']))."</th>"; } ?> </tr> </thead> <tbody> <tr> <th><?php echo _days;?></th> <?php foreach ($data_wk as $value) { echo "<td>".$value."</td>"; } ?> </tr> </tbody> </table> } ?> So things seem to be working to pull the data, but the label is wrong. Though setting the value for $day_number= to something else doesn't seem to work. Is there something wrong with the.$value. which is being echoed and I need to apply the get_first_day to the value? Thanks for any help.
  13. Do I have to have an outside file. I thought I could have within the same file as I currently have setup. I did try what you mentioned though and setup a action and seperate file, but still no luck. I have been reading everywhere and trying different things, Here is my updated code.... that after countless hours still doesn't work. page can be found here: http://www.avsabonline.org/admin_form.php CODE: <?php $db_host = "localhost"; $db_user = "avsab_admin"; $db_pwd = "admin"; $db_name = "avsab_registration"; mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name); ?> <?php include 'states.php' ?> <br /> <?php function showOptionsDrop($array){ $string = ''; foreach($array as $k => $v){ $string .= '<option value="'.$k.'"'.$s.'>'.$v.'</option>'."\n"; } return $string; } ?> <?php error_reporting(E_ALL); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="http://avsabonline.org/avsabonline/administrator/templates/minted_one-point-five/css/template_css.css" type="text/css" /> <link rel="stylesheet" href="http://avsabonline.org/avsabonline/administrator/templates/minted_one-point-five/css/theme.css" type="text/css" /> <title>AVSAB Scientific Session</title> <style> body{font-family:arial;color:#333333;font-size:12px;} .space{padding-right:20px;padding-bottom:20px;} select{font-family:arial;color:#333333;width:100px;font-size:12px;} input{font-size:12px;border:1px solid #cccccc;background:#eeeeee;} a:link{color:#1E90FF;text-decoration:none;} a:visited{color:#1E90FF;text-decoration:none;} a:active{color:#1E90FF;text-decoration:none;} a:hover{color:#1E90FF;text-decoration:none;} </style> <link rel="stylesheet" type="text/css" href="reset.css"> <link rel="stylesheet" type="text/css" href="form_style.css"> <link rel="stylesheet" type="text/css" href="form_style2.css"> <script> function autotab(original,destination){ if (original.getAttribute&&original.value.length==original.getAttribute("maxlength")) destination.focus() } </script> </head> <body> <center> <div style="width:820px;"> <table style="width:720px;""> <tr> <td> <?php if (!isset($_POST['submit'])) { ?> <div id="container"> <form method="post" name="avsab"> <fieldset id="personal" class="repeat"> <legend>Personal Information</legend> <div style="float:left;"> <span class="oneField"> <label class="preField">Prefix <select name="prefix"><?php echo showOptionsDrop($prefix_arr); ?></select> <span class="reqMark"> </span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Degree / Suffix for badge <select name="degree"><?php echo showOptionsDrop($degree_arr); ?></select> <span class="reqMark"> </span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Other <input TYPE="text" NAME="otherdegree" size="20"></label> </span> </div> <br><br><br><br> <div style="float:left;"> <span class="oneField"> <label class="preField">Last (family) Name <input TYPE="text" NAME="lastname" size="36"> <span class="reqMark">*</span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">First (given) Name <input TYPE="text" NAME="firstname" size="36"> <span class="reqMark">*</span></label><br></span> </div> <br><br><br><br> <div style="float:left;"> <span class="oneField"> <label class="preField">If Student List College(s) Attended <input TYPE="text" NAME="college" size="40"> <span class="reqMark"> </span></label><br></span> </div> <div> <span class="oneField"> <label class="preField">Year of Graduation <input TYPE="text" style="text-align:left;" id="gradyear" NAME="gradyear" size="15" value=""></label> </span> </div> <br /><br /> <div style="float:left;"> <style>.radio_tag{font-size:12px;}.radio_tag input{border:none;}.other_tag{font-size:12px;}</style> <label class="preField" style="float:left;v">Dietary Preference</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="No Preference">No Preference</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="Vegetarian">Vegetarian</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="Vegan">Vegan</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="Other">Other</label> <label class="other_tag"><input TYPE="text" name="other_dietary_preference" size="20"></label> </div> </fieldset> <fieldset id="contact" class=""> <legend>Contact Information</legend> <span class="oneField"> <label class="preField">Address <input TYPE="text" NAME="address" size="120"> <span class="reqMark"> </span></label><br></span> <div style="float:left;"> <span class="oneField"> <label class="preField">City <input TYPE="text" NAME="city" size="50"> <span class="reqMark"> </span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">State/Province <select name="state"><?php echo showOptionsDrop($states_arr); ?></select></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Poastal Code <input TYPE="text" NAME="zipcode" size="10"> <span class="reqMark">*</span></label><br></span> </div> <br /><br /><br /><br /> <div style="float:left;"> <span class="oneField"> <label class="preField">Country <select name="country"><?php echo showOptionsDrop($country_arr); ?></select> <span class="reqMark"></span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Email <input TYPE="text" NAME="email" size="50"> <span class="reqMark">*</span></label><br></span> </div> <br /><br /><br /><br /> <div id="phone" style="float:left;"> <span class="oneField"> <label class="preField">Daytime Phone <input type="text" name="phone_first" size=4 onKeyup="autotab(this, document.avsab.phone_second)" maxlength=3> <input type="text" name="phone_second" size=4 onKeyup="autotab(this, document.avsab.phone_third)" maxlength=3> <input type="text" name="phone_third" size=5 maxlength=4> <span class="reqMark"></span></label><br></span> </div> <div id="phone" style="float:left;"> <span class="oneField"> <label class="preField">Fax <input type="text" name="fax_first" size=4 onKeyup="autotab(this, document.avsab.fax_second)" maxlength=3> <input type="text" name="fax_second" size=4 onKeyup="autotab(this, document.avsab.fax_third)" maxlength=3> <input type="text" name="fax_third" size=5 maxlength=4> <span class="reqMark"></span></label><br></span> </div> <br /><br /><br /><br /> <div style="padding-top:40px;"> <div style="float:right;"> <input type="hidden" name="year" value="2010"> <input type="submit" name="submit" value="Submit Registration"> </div> </div> </fieldset> </div><!--eof container--> </body> </html> <?php }else{ ?> <?php $phone_main = '('.$_POST['phone_first'].') '.$_POST['phone_second'].'-'.$_POST['phone_third']; $fax_main = '('.$_POST['fax_first'].') '.$_POST['fax_second'].'-'.$_POST['fax_third']; $prefix = mysql_real_escape_string($_POST['prefix']); $degree = mysql_real_escape_string($_POST['degree']); $otherdegree = mysql_real_escape_string($_POST['otherdegree']); $lastname = mysql_real_escape_string($_POST['lastname']); $firstname = mysql_real_escape_string($_POST['firstname']); $address = mysql_real_escape_string($_POST['address']); $city = mysql_real_escape_string($_POST['city']); $state = mysql_real_escape_string($_POST['state']); $zipcode = mysql_real_escape_string($_POST['zipcode']); $country = mysql_real_escape_string($_POST['country']); $email = mysql_real_escape_string($_POST['email']); $phone = $phone_main; $fax = $fax_main; $college = mysql_real_escape_string($_POST['college']); $gradyear = mysql_real_escape_string($_POST['gradyear']); $year = mysql_real_escape_string($_POST['year']); $dietary_preference = mysql_real_escape_string($_POST['dietary_preference']); $other_dietary_preference = mysql_real_escape_string($_POST['other_dietary_preference']); // Put the SQL query string together $query = "INSERT INTO `register` (prefix, degree, otherdegree, lastname, firstname, address, city, state, zipcode, country, email, phone, fax, college, gradyear, year, dietary_preference, other_dietary_preference) VALUES ('$prefix', '$degree', '$otherdegree', '$lastname', '$firstname', '$address', '$city', '$state', '$zipcode', '$country', '$email', '$phone', '$fax', '$college', '$gradyear', '$year', '$dietary_preference', '$other_dietary_preference')"; // Perform the query $queryResult = mysql_query($query); // Dump the result for debugging purposes echo '<br />The SQL query that was attempted was:<br />'; var_dump($query); echo '<br />The queryResult resource was:<br />'; var_dump($query); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>ACVB/AVSAB Behavior Symposium - July 10, 2009</title> <link rel="stylesheet" type="text/css" href="reset.css"> <link rel="stylesheet" type="text/css" href="form_style.css"> <link rel="stylesheet" type="text/css" href="form_style2.css"> <script> function autotab(original,destination){ if (original.getAttribute&&original.value.length==original.getAttribute("maxlength")) destination.focus() } </script> </head> <body> <div> Thank-You. The registrant has been submitted. <a href="http://avsabonline.org/avsabonline/administrator/addon3.php">Return to Annual Meeting Registrants.</a> </div> <? } ?> </table> </div> </center> </body> </html>
  14. I am trying to use a form that will post data to the MYSQL database. I don't get any errors, but the data is not appearing in my database. Any help is appreciated. It is a form we used last year, with just some update info. I am not very proficient with php/mysql. This was actually built for me but the developer is MIA. The strange thing is that it worked. Is it possible that my hosting provider has a setting which has changed that would make this now now work. I also tried adding: <?php error_reporting(E_ALL); ?> But I don't get any errors. It just seems to process the form, but then in phpmyadmin there is no data. I changed the database logins for security. front end can be viewed at: http://www.avsabonline.org/admin_form.php Syntax: [ Download ] [ Hide ] [ Select ] [ Contract ] Syntax: [ Download ] [ Show ] <?php $db_host = "localhost"; $db_user = "avsab_user"; $db_pwd = "pwd"; $db_name = "avsab_registration"; mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name); ?> <?php include 'states.php' ?> <br /> <?php function showOptionsDrop($array){ $string = ''; foreach($array as $k => $v){ $string .= '<option value="'.$k.'"'.$s.'>'.$v.'</option>'."\n"; } return $string; } $em = $_GET; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="http://avsabonline.org/avsabonline/administrator/templates/minted_one-point-five/css/template_css.css" type="text/css" /> <link rel="stylesheet" href="http://avsabonline.org/avsabonline/administrator/templates/minted_one-point-five/css/theme.css" type="text/css" /> <title>AVSAB Scientific Session Manual Add</title> <style> body{font-family:arial;color:#333333;font-size:12px;} .space{padding-right:20px;padding-bottom:20px;} select{font-family:arial;color:#333333;width:100px;font-size:12px;} input{font-size:12px;border:1px solid #cccccc;background:#eeeeee;} a:link{color:#1E90FF;text-decoration:none;} a:visited{color:#1E90FF;text-decoration:none;} a:active{color:#1E90FF;text-decoration:none;} a:hover{color:#1E90FF;text-decoration:none;} </style> <link rel="stylesheet" type="text/css" href="reset.css"> <link rel="stylesheet" type="text/css" href="form_style.css"> <link rel="stylesheet" type="text/css" href="form_style2.css"> <script> function autotab(original,destination){ if (original.getAttribute&&original.value.length==original.getAttribute("maxlength")) destination.focus() } </script> </head> <body> <center> <div style="width:820px;"> <table style="width:720px;""> <tr> <td> <?php if (!isset($_POST['submit'])) { ?> <div id="container"> <form method="post" name="avsab"> <fieldset id="personal" class="repeat"> <legend>Personal Information</legend> <div style="float:left;"> <span class="oneField"> <label class="preField">Prefix <select name="prefix"><?php echo showOptionsDrop($prefix_arr); ?></select> <span class="reqMark"> </span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Degree / Suffix for badge <select name="degree"><?php echo showOptionsDrop($degree_arr); ?></select> <span class="reqMark"> </span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Other <input TYPE="text" NAME="otherdegree" size="20"></label> </span> </div> <br><br><br><br> <div style="float:left;"> <span class="oneField"> <label class="preField">Last (family) Name <input TYPE="text" NAME="lastname" size="36"> <span class="reqMark">*</span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">First (given) Name <input TYPE="text" NAME="firstname" size="36"> <span class="reqMark">*</span></label><br></span> </div> <br><br><br><br> <div style="float:left;"> <span class="oneField"> <label class="preField">If Student List College(s) Attended <input TYPE="text" NAME="college" size="40"> <span class="reqMark"> </span></label><br></span> </div> <div> <span class="oneField"> <label class="preField">Year of Graduation <input TYPE="text" style="text-align:left;" id="gradyear" NAME="gradyear" size="15" value=""></label> </span> </div> <br /><br /> <div style="float:left;"> <style>.radio_tag{font-size:12px;}.radio_tag input{border:none;}.other_tag{font-size:12px;}</style> <label class="preField" style="float:left;v">Dietary Preference</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="No Preference">No Preference</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="Vegetarian">Vegetarian</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="Vegan">Vegan</label> <label class="radio_tag"><input type="radio" name="dietary_preference" value="Other">Other</label> <label class="other_tag"><input TYPE="text" name="other_dietary_preference" size="20"></label> </div> </fieldset> <fieldset id="contact" class=""> <legend>Contact Information</legend> <span class="oneField"> <label class="preField">Address <input TYPE="text" NAME="address" size="120"> <span class="reqMark"> </span></label><br></span> <div style="float:left;"> <span class="oneField"> <label class="preField">City <input TYPE="text" NAME="city" size="50"> <span class="reqMark"> </span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">State/Province <select name="state"><?php echo showOptionsDrop($states_arr); ?></select></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Poastal Code <input TYPE="text" NAME="zipcode" size="10"> <span class="reqMark">*</span></label><br></span> </div> <br /><br /><br /><br /> <div style="float:left;"> <span class="oneField"> <label class="preField">Country <select name="country"><?php echo showOptionsDrop($country_arr); ?></select> <span class="reqMark"></span></label><br></span> </div> <div style="float:left;"> <span class="oneField"> <label class="preField">Email <input TYPE="text" NAME="email" size="50" value="<?php echo $em ?>"> <span class="reqMark">*</span></label><br></span> </div> <br /><br /><br /><br /> <div id="phone" style="float:left;"> <span class="oneField"> <label class="preField">Daytime Phone <input type="text" name="phone_first" size=4 onKeyup="autotab(this, document.avsab.phone_second)" maxlength=3> <input type="text" name="phone_second" size=4 onKeyup="autotab(this, document.avsab.phone_third)" maxlength=3> <input type="text" name="phone_third" size=5 maxlength=4> <span class="reqMark"></span></label><br></span> </div> <div id="phone" style="float:left;"> <span class="oneField"> <label class="preField">Fax <input type="text" name="fax_first" size=4 onKeyup="autotab(this, document.avsab.fax_second)" maxlength=3> <input type="text" name="fax_second" size=4 onKeyup="autotab(this, document.avsab.fax_third)" maxlength=3> <input type="text" name="fax_third" size=5 maxlength=4> <span class="reqMark"></span></label><br></span> </div> <br /><br /><br /><br /> <div style="padding-top:40px;"> <div style="float:right;"> <input type="hidden" name="year" value="2010"> <input type="submit" name="submit" value="Submit Registration"> </div> </div> </fieldset> </div><!--eof container--> </body> </html> <?php }else{ ?> <?php $phone_main = '('.$_POST['phone_first'].') '.$_POST['phone_second'].'-'.$_POST['phone_third']; $fax_main = '('.$_POST['fax_first'].') '.$_POST['fax_second'].'-'.$_POST['fax_third']; $prefix = $_POST['prefix']; $degree = $_POST['degree']; $otherdegree = $_POST['otherdegree']; $lastname = $_POST['lastname']; $firstname = $_POST['firstname']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zipcode = $_POST['zipcode']; $country = $_POST['country']; $email = $_POST['email']; $phone = $phone_main; $fax = $fax_main; $college = $_POST['college']; $gradyear = $_POST['gradyear']; $year = $_POST['year']; $dietary_preference = $_POST['dietary_preference']; $other_dietary_preference = $_POST['other_dietary_preference']; mysql_query("INSERT INTO `register` (prefix,degree,otherdegree,lastname,firstname,address,city,state,zipcode,country,email,phone,fax,college,gradyear,year,dietary_preference,other_dietary_preference) VALUES ('$prefix','$degree','$otherdegree','$lastname','$firstname','$address','$city','$state','$zipcode','$country','$email','$phone','$fax','$college','$gradyear','$year','$dietary_preference','$other_dietary_preference')"); echo ""; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>ACVB/AVSAB Behavior Symposium - July 30, 2010</title> <link rel="stylesheet" type="text/css" href="reset.css"> <link rel="stylesheet" type="text/css" href="form_style.css"> <link rel="stylesheet" type="text/css" href="form_style2.css"> <script> function autotab(original,destination){ if (original.getAttribute&&original.value.length==original.getAttribute("maxlength")) destination.focus() } </script> </head> <body> <div> Thank-You. The registrant has been submitted. <a href="http://avsabonline.org/avsabonline/administrator/addon3.php">Return to Annual Meeting Registrants.</a> </div> <? } ?> </table> </div> </center> </body> </html>
×
×
  • 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.