Jump to content

dca_steve

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by dca_steve

  1. Hi all - thanks for the replies. Still haven't gotten it to work, I get the same errors. I've tried various combinations including the following: Tried this first.... <option value="2011" <?php if($_POST['report_year'] == 2011) { echo 'selected="selected"'; } ?>>2011</option> Then this.... <option value="2011" <?php if($_POST['report_year'] == 2011) { echo "selected='selected'"; } ?>>2011</option> Then this.... <option value="2011" <?php if($_POST['report_year'] == 2011) echo 'selected="selected"'; ?>>2011</option> Lastly this.... <option value="2011" <?php if($_POST['report_year'] == 2011) echo "selected='selected'"; ?>>2011</option> Not sure where to go from here!
  2. Hi everyone....can't seem to figure this one out. I don't see what is wrong with line 220....I've tried removing the spaces thereby running everything together, tried removing some of the spaces (i.e. the space between "2011" and <?php) among various other combinations of spacing, still get these errors.....don't see any unclosed/unresolved ending tags..... 220 attributes construct error [XHTML 1.0 Strict] 220 Couldn't find end of Start Tag option line 220 [XHTML 1.0 Strict] 220 Opening and Ending tag mismatch: select line 218 and option [XHTML 1.0 Strict] 222 Opening and Ending tag mismatch: div line 216 and select [XHTML 1.0 Strict] Here is the code: 216 <div class="content_onecolumn"> 217 <label for="report_year" class="long"><span style="font-weight:bold">1.</span> Report for Year:</label> 218 <select name="report_year" id="report_year" class="selectTwo"> 219 <option value="" selected="selected">*Select the Year*</option> 220 <option value="2011" <?php if($_POST['report_year'] == 2011) echo 'selected';?>>2011</option> 221 </select> 222 </div> Any ideas? Thanks - Steve Any ideas?
  3. xyph - jackpot, sort of! The double line break resulted in this in my email: If yes, please identify the Accrediting Agency: Accreditation Commission for Acupuncture and Oriental Medicine Accreditation Commission for Midwifery Education Accrediting Bureau of Health Education Schools Accrediting Commission of Career Schools and Colleges Accrediting Council for Continuing Education and Training Soooo....that's better! Thanks - gonna still mess around with it to get rid of that extra space...
  4. Here's the top part (btw gotta go to lunch will be back in an hour or so)...thanks for checking this out for me xyph, you've been a huge help! <?php //session_start(); require('captcha/captcha.php'); include('mysql_connect.php'); $captcha_passed = 0; $date_submitted = date('n/j/Y g:i:s A'); $report_year_form = addslashes($_POST['report_year']); $institution_name_form = addslashes($_POST['institution_name']); $institution_code_form = addslashes($_POST['institution_code']); $street_address_form = addslashes($_POST['street_address']); $city_form = addslashes($_POST['city']); $state_form = addslashes($_POST['state']); $zip_code_form = addslashes($_POST['zip_code']); $branch_locations_form = addslashes($_POST['branch_locations']); $satellite_locations_form = addslashes($_POST['satellite_locations']); $current_asmnts_form = addslashes($_POST['current_asmnts']); $disp_action_form = addslashes($_POST['disp_action']); $inst_recognized_form = addslashes($_POST['inst_recognized']); //$accred_agency_form = implode($_POST['accred_agency'],"\n"); $accred_agency_form = implode("\n", $_POST['accred_agency']); $accred_agency_form_db = implode(",",$_POST['accred_agency']); $accred_specialized_form = addslashes($_POST['accred_specialized']); $higher_aid_form = addslashes($_POST['higher_aid']); $veteran_ed_form = addslashes($_POST['veteran_ed']); $cal_aid_form = addslashes($_POST['cal_aid']); $add_fin_aid_form = addslashes($_POST['add_fin_aid']); $fin_aid_program_form = addslashes($_POST['fin_aid_program']); $doc_degrees_form = addslashes($_POST['doc_degrees']); $enroll_doctorate_form = addslashes($_POST['enroll_doctorate']); $mas_degrees_form = addslashes($_POST['mas_degrees']); $enroll_master_form = addslashes($_POST['enroll_master']); $bac_degrees_form = addslashes($_POST['bac_degrees']); $enroll_bachelor_form = addslashes($_POST['enroll_bachelor']); $asc_degrees_form = addslashes($_POST['asc_degrees']); $enroll_associate_form = addslashes($_POST['enroll_associate']); $dip_cert_form = addslashes($_POST['dip_cert']); $enroll_cert_form = addslashes($_POST['enroll_cert']); $inst_catalog_form = addslashes($_POST['inst_catalog']); $link_catalog_form = addslashes($_POST['link_catalog']); $user_email = $_REQUEST['user_email']; $accred_agency_form_array = explode(",",$accred_agency_form_db); if(isset($_POST['Submit2'])){ if($_SESSION['captchacode'] == $_POST['captcha']){ //set query $query= 'Insert into report_profile_dev Set date_submitted = "'.$date_submitted.'", ip_address = "'.$_SERVER['REMOTE_ADDR'].'", report_year = "'.$report_year_form.'", institution_name = "'.$institution_name_form.'", institution_code = "'.$institution_code_form.'", street_address = "'.$street_address_form.'", city = "'.$city_form.'", state = "'.$state_form.'", zip_code = "'.$zip_code_form.'", branch_locations = "'.$branch_locations_form.'", satellite_locations = "'.$satellite_locations_form.'", current_asmnts = "'.$current_asmnts_form.'", disp_action = "'.$disp_action_form.'", inst_recognized = "'.$inst_recognized_form.'", accred_agency = "'.$accred_agency_form.'", accred_specialized = "'.$accred_specialized_form.'", higher_aid = "'.$higher_aid_form.'", veteran_ed = "'.$veteran_ed_form.'", cal_aid = "'.$cal_aid_form.'", add_fin_aid = "'.$add_fin_aid_form.'", fin_aid_program = "'.$fin_aid_program_form.'", doc_degrees = "'.$doc_degrees_form.'", enroll_doctorate = "'.$enroll_doctorate_form.'", mas_degrees = "'.$mas_degrees_form.'", enroll_master = "'.$enroll_master_form.'", bac_degrees = "'.$bac_degrees_form.'", enroll_bachelor = "'.$enroll_bachelor_form.'", asc_degrees = "'.$asc_degrees_form.'", enroll_associate = "'.$enroll_associate_form.'", dip_cert = "'.$dip_cert_form.'", enroll_cert = "'.$enroll_cert_form.'", inst_catalog = "'.$inst_catalog_form.'", link_catalog = "'.$link_catalog_form.'"'; $result = mysql_query($query); echo "<pre>Raw output: ********* $accred_agency_form ********* Raw array dump:"; print_r($_POST['accred_agency']); echo "</pre>"; //echo $query; $to = $_POST['user_email']; $header = "From: Annual Report Institution Data <do_not_reply_to_this@dca.ca.gov>\r\n"; $header .= "Bcc: test.mail@dca.ca.gov\r\n"; $subject = "Annual Report Institution Data"; $body = "ANNUAL REPORT INSTITUTION DATA \n\n\n\n"; $body .= "Reporting Year: ".$report_year_form."\n\n"; $body .= "Institution Name: ".$institution_name_form."\n\n"; $body .= "Institution Code: ".$institution_code_form."\n\n"; $body .= "Street Address: ".$street_address_form."\n\n"; $body .= "City: ".$city_form."\n\n"; $body .= "State: ".$state_form."\n\n"; $body .= "ZIP Code: ".$zip_code_form."\n\n"; $body .= "Number of Branch Locations: ".$branch_locations_form."\n\n"; $body .= "Number of Satellite Locations: ".$satellite_locations_form."\n\n"; $body .= "Is this institution current with all assessments to the Student Tuition Recovery Fund?: ".$current_asmnts_form." \n\n"; $body .= "Is your institution approved by an accrediting agency recognized by the United States Department of Education? Please include only full institutional approval, not programmatic approval: ".$inst_recognized_form." \n\n"; $body .= "If yes, please identify the Accrediting Agency:\n ".$accred_agency_form." \n\n"; $body .= "If your institution has specialized accreditation from a recognized United States Department of Education approved specialized/programmatic accreditor, please list the accreditation: ".$accred_specialized_form." \n\n"; $body .= "Has any accreditation agency taken any formal disciplinary action against this institution?: ".$disp_action_form." \n\n"; $body .= "Does your institution participate in federal financial aid programs under Title IV of the Federal Higher Education Act?: ".$higher_aid_form." \n\n"; $body .= "Does your institution participate in federal veteran's financial aid education programs?: ".$veteran_ed_form." \n\n"; $body .= "Does your institution participate in California financial aid programs, such as the Cal Grant program?: ".$cal_aid_form." \n\n"; $body .= "Does your institution participate in, or offer any additional financial aid program?: ".$add_fin_aid_form." \n\n"; $body .= "Additional financial aid program: ".$fin_aid_program_form." \n\n"; $body .= "Number of Doctorate Degrees Offered: ".$doc_degrees_form." \n\n"; $body .= "Number of Students enrolled in Doctorate level programs at this Institution: ".$enroll_doctorate_form." \n\n"; $body .= "Number of Master Degrees Offered: ".$mas_degrees_form." \n\n"; $body .= "Number of Students enrolled in Master level programs at this institution: ".$enroll_master_form." \n\n"; $body .= "Number of Bachelor Degrees Offered: ".$bac_degrees_form." \n\n"; $body .= "Number of Students enrolled in Bachelor level programs at this institution: ".$enroll_bachelor_form." \n\n"; $body .= "Number of Associate Degrees Offered: ".$asc_degrees_form." \n\n"; $body .= "Number of Students enrolled in Associate level programs at this institution: ".$enroll_associate_form." \n\n"; $body .= "Number of Diploma or Certificate Programs Offered: ".$dip_cert_form." \n\n"; $body .= "Number of Students enrolled in Diploma or Certificate programs at this institution: ".$enroll_cert_form." \n\n"; $body .= "Link to your institutional catalog if it appears on your website: ".$inst_catalog_form." \n\n"; $body .= "Method by which you are providing your catalog: ".$link_catalog_form." \n\n"; mail($to, $subject, $body, $header); $captcha_passed = 1; session_destroy(); } } ?>
  5. No to both of your questions....just added this: $header = "Content-type: text/plain; charset=iso-8859-1\r\n"; ...and that didn't help. Will continue to try different things!
  6. xyph - you rock, thanks. So I did what you said and got this....looks good huh? Raw output: ********* Accreditation Commission for Acupuncture and Oriental Medicine Accreditation Commission for Midwifery Education Accrediting Bureau of Health Education Schools Accrediting Commission of Career Schools and Colleges ********* Raw array dump:Array ( [0] => Accreditation Commission for Acupuncture and Oriental Medicine [1] => Accreditation Commission for Midwifery Education [2] => Accrediting Bureau of Health Education Schools [3] => Accrediting Commission of Career Schools and Colleges ) So since it still looks incorrect in my email, the culprit may 'client-side behavior' you are talking about?
  7. Just realized that it doesn't matter how many items I select from the drop down, it does put in a line break, but just one. So for instance if I select 3 items, it runs the first 2 together, then puts in a line break and correctly places the 3rd item next. If I select 6 items, it runs the first 5 together, puts in a break, then places the 6th item correctly, etc. It seems to think the only place a line break should be is immediately before the very last item selected. Not sure how to correct this....
  8. xyph - thanks for the quick reply. As far as using windows/UNIX breaks, I've been trying everything to solve this and that's what I've been using now. Earlier tried just \n and that wasn't working. Just did an echo $accred_agency_form; on the array and got this: Accreditation Commission for Acupuncture and Oriental Medicine Accrediting Bureau of Health Education Schools American Board of Funeral Service Education Committee on Accreditation Assume I should be seeing this instead.... Accreditation Commission for Acupuncture and Oriental Medicine Accrediting Bureau of Health Education Schools American Board of Funeral Service Education Committee on Accreditation Not sure what to do from here?
  9. Hi all - I have a form where I'm gathering info from a drop-down list, and placing what the user selects into an array (the user can select more than one item from the drop-down). I then want to take the selections from the array, and put them into an email with line breaks between each item the user selected. This is working except the first 2 entries are always run together, with no line break. Here's a portion of what my generated email looks like: ****** If yes, please identify the Accrediting Agency: Accreditation Commission for Acupuncture and Oriental Medicine Accrediting Bureau of Health Education Schools American Podiatric Medical Association Council on Podiatric Medical Education ****** This should look like this instead: ***** If yes, please identify the Accrediting Agency: Accreditation Commission for Acupuncture and Oriental Medicine Accrediting Bureau of Health Education Schools American Podiatric Medical Association Council on Podiatric Medical Education ***** Not sure why the first 2 items are run together. Here is how I define the array: $accred_agency_form = implode("\r\n", $_POST['accred_agency']); And how it looks as far as being put into the body of the email: $body .= "If yes, please identify the Accrediting Agency:\n".$accred_agency_form." \n\n"; Any ideas? Thanks!
  10. Thanks Muddy_Funster - will remember that in the future!
  11. batwimp - awesome, that was it!! Thanks! completely missed that, was sure it was my PHP!
  12. Hi all - I have a simple PHP app, which I've run thru my Dreamweaver validation and a few PHP syntax validators and it comes out clean. Works perfectly in Firefox but shows a blank page in I.E. and I'm not sure why. The functionality is simple - the page shows a disclaimer, and when the user hits 'OK" it should hide the disclaimer and then display other content. Here's the URL: https://www.dca.ca.gov/webapps/bppe/annual_report.php Any ideas as to what is wrong? Thanks! Here's the code: <?php if(isset($_POST['OK'])){ ?> <h3 class="center"><a href="#a">A</a> <a href="#b">B</a> <a href="#c">C</a> <a href="#d">D</a> <a href="#e">E</a> <a href="#f">F</a> <a href="#g">G</a> <a href="#h">H</a> <a href="#i">I</a> <a href="#j">J</a> <a href="#k">K</a> <a href="#l">L</a> <a href="#m">M</a> <a href="#n">N</a> <a href="#O">O</a> <a href="#p">P</a> <a href="#q">Q</a> <a href="#r">R</a> <a href="#s">S</a> <a href="#t">T</a> <a href="#u">U</a> <a href="#v">V</a> <a href="#w">W</a> <a href="#x">X</a> <a href="#y">Y</a> <a href="#z">Z</a></h3> <h3><a name="a">A</a>:</h3> <h3><a name="b">B</a>:</h3> <h3><a name="c">C</a>:</h3> <h3><a name="d">D</a>:</h3> <h3><a name="e">E</a>:</h3> <h3><a name="f">F</a>:</h3> <h3><a name="g">G</a>:</h3> <h3><a name="h">H</a>:</h3> <h3><a name="i">I</a>:</h3> <h3><a name="j">J</a>:</h3> <h3><a name="k">K</a>:</h3> <h3><a name="l">L</a>:</h3> <h3><a name="m">M</a>:</h3> <h3><a name="n">N</a>:</h3> <h3><a name="o">O</a>:</h3> <h3><a name="p">P</a>:</h3> <h3><a name="q">Q</a>:</h3> <h3><a name="r">R</a>:</h3> <h3><a name="s">S</a>:</h3> <h3><a name="t">T</a>:</h3> <h3><a name="u">U</a>:</h3> <h3><a name="v">V</a>:</h3> <h3><a name="w">W</a>:</h3> <h3><a name="x">X</a>:</h3> <h3><a name="y">Y</a>:</h3> <h3><a name="z">Z</a>:</h3> <?php }else{ ?> <form method="post" action="annual_report.php"> <fieldset> <strong><p><strong>An Annual Report must be filed with the Bureau for Private Postsecondary Education (Bureau) by each approved institution pursuant to California Education Code (CEC) section 94934. The Institution reports the required aggregate information for all locations (main and all branches). In addition to the Annual Report, each Institution is required to submit a Performance Fact Sheet and the school catalog.</strong></p> <p><strong>The Bureau <span style="text-decoration:underline">publishes the</span> information provided in the links below <span style="text-decoration:underline">as it was submitted</span> by the institution, and does not endorse, recommend, or favor any institution whose information is published or provided</strong>.</p> <p><strong>Disclaimer of Liability</strong> <br /> The California Department of Consumer Affairs, Bureau for Private Postsecondary Education shall not be held liable for any inaccurate, altered, delayed, omitted, or misleading information, or any improper or incorrect use of the information published or provided herein, and assumes no responsibility for anyone's use of the information on any theory of liability. </p> <p><strong>Disclaimer: Links</strong> <br /> The Department of Consumer Affairs, Bureau for Private Postsecondary Education is not responsible for the contents of any off-site pages that reference, or that are referenced by, this website. The user specifically acknowledges that the Department of Consumer Affairs, Bureau for Private Postsecondary Education is not liable for any defamatory, offensive, misleading or illegal conduct of other users, links, or third parties and that the risk of injury from the foregoing rests entirely with the user. <br /> Links from this site to other sites, do not constitute an endorsement by the Department of Consumer Affairs, and are for convenience only. It is the responsibility of the user to evaluate the content and usefulness of information obtained from other sites. <br /> When you use a link to connect to another site, you are no longer on the Department of Consumer Affairs', and/or its constituent Boards’ or Bureaus’ web sites and are subject to the privacy policies and other practices of the new site. The Department of Consumer Affairs and/or its Board or Bureaus has no control over and is not responsible for the information, practices or content of these or any other sites and your participation in promotions or services of any kind with any third party found on or though this site, or your correspondence or business dealings of any kind with any third party found on or through this site are solely between you and that third party.<br /> The Department of Consumer Affairs and/or its Boards or Bureaus does not, by way of its links to other sites, endorse, adopt, recommend, promote or support products, positions, statements made or taken by parties controlling the other sites.</p> <p><strong>Choice of Law </strong><br /> Construction of the disclaimers above and resolution of disputes thereof are governed by the laws of the State of California.</p></strong> <div class="content_onecolumn"> <input type="submit" name="OK" value="OK" class="inputSubmit" /> </div> </fieldset> </form> <?php } ?>
  13. xyph - thanks, those are some good ideas. I'll look into it, that might just work!
  14. I guess it doesn't have to go away, and I completely agree with what you say....but knowing my client they will then question the message once they've submitted the form again....they'll wonder if the message is relative to the data they just submitted, or if it is the same message from the first time they submitted. They'll say how do i know the data got submitted the second time since the message on the form never disappeared from the first time. I'm personally fine with it, but I know my client won't like it! Which brings me full circle back to were I was before, not sure of a solution where the user is given verification that data was submitted but then brought back to a clean form with no messages on it....
  15. Thx Nightslyr for your quick reply. I'm not at all strong with PHP so I'm not exactly sure how to do that, is there an example somewhere? When does that message disappear....in other words, upon successful submittal, that 'message' displays.....at what point does it disappear....I guess in an ideal situation, a message displays, the user can get rid of the message, or it disappears somehow, then the user continues to enter in more data.....can it do that? Thanks!
  16. Hi all - I have a PHP form which allows users to submit data multiple times - in other words then can submit multiple records into the database using the same form over and over again. So currently how it works is once they've entered data and hit submit, the form refreshes and all fields get emptied, allowing the user to again enter more info. My client wants some sort of confirmation that data has been entered. I originally thought a simple pop-up/alert box saying 'Your data has been successfully entered' would do the trick since the user could then click 'ok', closing the pop-up to go about entering more data. However I hear a lot of disagreement on using javascript pop-ups due to pop-up blockers, javascript being turned off, etc. What alternatives exist to notify the user that their data has been submitted, while also allowing them to then continue entering more data? Thx! Steve
  17. That makes sense - I'll give it a shot, thanks!
  18. Hi all - I have an HTML form, and it allows a user to enter data into a bunch of fields, and at the very end they need to enter in a captcha so the data can then be submitted to a database. After submitting the data, the form reloads with blank fields so the user can enter more data, and I have the captcha functionality disappear, which is what I want it to do b/c the user could enter/submit data dozens of times and I don't want them having to enter in a captcha every time. Anyway, my problems occurs once the user tries to submit more data the second time around....the captcha reappears. I'm attempting to hide the captcha via javascript, but I guess I shouldn't do that? Here's my code: <?php session_start(); require('../captcha/captcha.php'); $captcha_passed = 0; $display_captcha = 'display:block'; $ip_address = $_SERVER['REMOTE_ADDR']; $date_submitted = date('n/j/Y g:i:s A'); $report_year = $_SESSION['report_year']; $institution_name = $_SESSION['institution_name']; $institution_code = $_SESSION['institution_code']; $street_address = $_SESSION['street_address']; $city = $_SESSION['city']; $state = $_SESSION['state']; $zip_code = $_SESSION['zip_code']; $branch_address = $_REQUEST['branch_address']; $branch_city = $_REQUEST['branch_city']; $branch_state = $_REQUEST['branch_state']; $branch_zip = $_REQUEST['branch_zip']; if(isset($_POST['Submit'])){ if($_SESSION['captchacode'] == $_POST['captcha']) { include('mysql_connect.php'); //set query $query="insert into branch_locations_dev(ip_address, date_submitted, report_year, institution_code, branch_address, branch_city, branch_state, branch_zip) values('".addslashes($ip_address)."','".addslashes($date_submitted)."','".addslashes($report_year)."','".addslashes($institution_code)."','".addslashes($branch_address)."','".addslashes($branch_city)."','".addslashes($branch_state)."','".addslashes($branch_zip)."')"; $result = mysql_query($query); if($result){ $_POST=array(); } else { die( 'Invalid form submission' ); } $captcha_passed = 1; $display_captcha = 'display:none'; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > <!-- DO NOT CHANGE THE ABOVE DOCTYPE --> <!-- *********************************** --> <!-- State of California master template --> <!-- Version 1.10 --> <!-- Last Updated January 4, 2007 --> <!-- *********************************** --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" > <head> <!-- **************************************************************** --> <!-- Begin Document Title - Customize to fit your needs --> <title>Annual Report - Bureau for Private Postsecondary Education</title> <!-- End Document Title --> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <!-- Begin Meta Information - Customize to fit your needs --> <meta name="Author" content="State of California" /> <meta name="Description" content="A website for the State of California, Department of Consumer Affairs, Bureau for Private Postsecondary Education" /> <meta name="Keywords" content="students, schools, bppve, bppe, education, vocational, postsecondary, educational programs, school closure" /> <!-- End Meta Information --> <!-- **************************************************************** --> <script type="text/javascript" src="javascript/navigation.js"></script> <script type="text/javascript" src="javascript/department.js"></script> <script type="text/javascript" src="javascript/search_gss.js"></script> <!-- **************************************************************** --> <script type="text/javascript"> <!-- function validateBranches(theform){ if(theform.branch_address.value=="") { alert('Please indicate the Street Address.'); theform.branch_address.focus(); return false; } if(theform.branch_city.value=="") { alert('Please indicate the City.'); theform.branch_city.focus(); return false; } if(theform.branch_state.value=="") { alert('Please indicate the State.'); theform.branch_state.focus(); return false; } if(theform.branch_zip.value=="") { alert('Please indicate the Zip Code.'); theform.branch_zip.focus(); return false; } } function displayCaptcha(){ document.getElementById('captcha_box').style.display = 'none'; } //--> </script> <!-- Begin Style Information --> <style type="text/css"> <!-- /* ***** The master style sheet - DO NOT CHANGE ***** */ @import url("css/bppe.css"); @import url("css/form.css"); .content_onecolumn { float:left; left: 10px; width: 80%; padding: 8px; margin-left: 0; padding-top: 0; padding-right: 0; padding-bottom: 0; padding-left: 0; } --> </style> <!-- End Style Information --> <!-- **************************************************************** --> <!-- Begin JavaScript Variable to Set Active Tab --> <!-- Change the "defaultMainList" value to match the name of the --> <!-- page as listed in the navigation include unordered list --> <script type="text/javascript"> <!-- var defaultMainList = "Home"; // --> </script> <!-- End JavaScript Variable to Set Active Tab --> <!-- **************************************************************** --> </head> <body> <?php include("ssi/heading.php"); ?> <div id="main_content_1"> <div id="main_content_2"> <!-- ********** Left column begins ********** --> <div id="left_column"> <!-- **************************************************************** --> <!-- Begin Left Column Content - Put your right column content here --> <!-- Begin Column Top --> <?php include("ssi/lnav.php"); ?> <!-- End Column Bottom --> <!-- End Left Column Content --> <!-- **************************************************************** --> </div> </div> <!-- ********** Left column ends ********** --> <!-- ********** Right column begins ********** --> <div id="right_column"> <div class="column_inner"> <!-- **************************************************************** --> <!-- Begin Right Column Content - Put your right column content here --> <h3>Right Column</h3> <!-- End Right Column Content --> <!-- **************************************************************** --> </div> </div> <!-- ********** Right column ends ********** --> <!-- ********** Middle column begins ********** --> <div id="middle_column"> <div class="column_inner"> <a name="middle_column"></a> <!-- **************************************************************** --> <!-- Begin Amber Alert - Uncomment to turn on --> <!-- <div id="amber_alert_on"> <a href="http://www.chp.ca.gov/html/amber-en.html"><img src="images/ca_master/amber_alert_on.gif" alt="Amber Alert is on. Please visit CHP's website for more information" width="580" height="57"/></a> </div> --> <!-- End Amber Alert --> <!-- **************************************************************** --> <!-- **************************************************************** --> <!-- Begin Middle Column Content - Put your primary page content here --> <h2>Annual Report</h2> <?php if(isset($_POST['Submit']) && $captcha_passed || $display_captcha == ''){ $display_captcha = 'display:none'; ?> <script type="text/javascript">displayCaptcha();</script> <?php }else{ ?> <?php if(isset($_POST['Submit']) && !$captcha_passed){ ?> <p style="font-weight:bold;color:red;font-size:16px">Please re-enter the CAPTCHA code.</p> <?php }else{ ?> <?php } ?> <div id="branches_info"> <form id="BranchesInfo" method="post" action="report_branches_test.php" onsubmit="return validateBranches(this);"> <fieldset> <p><strong>Institution Information</strong></p> <div> Report for Year: <?php echo $report_year ?><br /> Institution Name: <?php echo $institution_name ?><br /> Institution Code: <?php echo $institution_code ?><br /> <!--Street Address: <?php echo $street_address ?><br /> City: <?php echo $city ?><br /> State: <?php echo $state ?><br /> Zip Code: <?php echo $zip_code ?><br />--> </div> <p> </p> <p><strong>Branch Location</strong></p> <label for="branch_address" class="long">Street Address:</label> <input maxlength="50" type="text" name="branch_address" id="branch_address" value="<?php echo htmlentities($_POST['branch_address']);?>" /><br /> <div class="cleaner"></div> <label for="branch_city" class="long">City:</label> <input maxlength="20" type="text" name="branch_city" id="branch_city" value="<?php echo htmlentities($_POST['branch_city']);?>" /><br /> <div class="cleaner"></div> <label for="branch_state" class="long">State:</label> <select name="branch_state" id="branch_state" class="selectTwo"> <option value="" selected="selected">*Select your State*</option> <option value="NON" <?php if($_POST['branch_state'] == NON) echo 'selected';?>>Non US Resident</option> <option value="AL" <?php if($_POST['branch_state'] == AL) echo 'selected';?>> Alabama</option> <option value="AK" <?php if($_POST['branch_state'] == AK) echo 'selected';?>> Alaska</option> <option value="AZ" <?php if($_POST['branch_state'] == AZ) echo 'selected';?>> Arizona</option> <option value="AR" <?php if($_POST['branch_state'] == AR) echo 'selected';?>> Arkansas</option> <option value="CA" <?php if($_POST['branch_state'] == CA) echo 'selected';?>> California</option> <option value="CO" <?php if($_POST['branch_state'] == CO) echo 'selected';?>> Colorado</option> <option value="CT" <?php if($_POST['branch_state'] == CT) echo 'selected';?>> Connecticut</option> <option value="DE" <?php if($_POST['branch_state'] == DE) echo 'selected';?>> Delaware</option> <option value="FL" <?php if($_POST['branch_state'] == FL) echo 'selected';?>> Florida</option> <option value="GA" <?php if($_POST['branch_state'] == GA) echo 'selected';?>> Georgia</option> <option value="HI" <?php if($_POST['branch_state'] == HI) echo 'selected';?>> Hawaii</option> <option value="ID" <?php if($_POST['branch_state'] == ID) echo 'selected';?>> Idaho</option> <option value="IL" <?php if($_POST['branch_state'] == IL) echo 'selected';?>> Illinois</option> <option value="IN" <?php if($_POST['branch_state'] == IN) echo 'selected';?>> Indiana</option> <option value="IA" <?php if($_POST['branch_state'] == IA) echo 'selected';?>> Iowa</option> <option value="KS" <?php if($_POST['branch_state'] == KS) echo 'selected';?>> Kansas</option> <option value="KY" <?php if($_POST['branch_state'] == KY) echo 'selected';?>> Kentucky</option> <option value="LA" <?php if($_POST['branch_state'] == LA) echo 'selected';?>> Louisiana</option> <option value="ME" <?php if($_POST['branch_state'] == ME) echo 'selected';?>> Maine</option> <option value="MD" <?php if($_POST['branch_state'] == MD) echo 'selected';?>> Maryland</option> <option value="MA" <?php if($_POST['branch_state'] == MA) echo 'selected';?>> Massachussetts</option> <option value="MI" <?php if($_POST['branch_state'] == MI) echo 'selected';?>> Michigan</option> <option value="MN" <?php if($_POST['branch_state'] == MN) echo 'selected';?>> Minnesota</option> <option value="MS" <?php if($_POST['branch_state'] == MS) echo 'selected';?>> Mississippi</option> <option value="MO" <?php if($_POST['branch_state'] == MO) echo 'selected';?>> Missouri</option> <option value="MT" <?php if($_POST['branch_state'] == MT) echo 'selected';?>> Montana</option> <option value="NE" <?php if($_POST['branch_state'] == NE) echo 'selected';?>> Nebraska</option> <option value="NV" <?php if($_POST['branch_state'] == NV) echo 'selected';?>> Nevada</option> <option value="NH" <?php if($_POST['branch_state'] == NH) echo 'selected';?>> New Hampshire</option> <option value="NJ" <?php if($_POST['branch_state'] == NJ) echo 'selected';?>> New Jersey</option> <option value="NM" <?php if($_POST['branch_state'] == NM) echo 'selected';?>> New Mexico</option> <option value="NY" <?php if($_POST['branch_state'] == NY) echo 'selected';?>> New York</option> <option value="NC" <?php if($_POST['branch_state'] == NC) echo 'selected';?>> North Carolina</option> <option value="ND" <?php if($_POST['branch_state'] == ND) echo 'selected';?>> North Dakota</option> <option value="OH" <?php if($_POST['branch_state'] == OH) echo 'selected';?>> Ohio</option> <option value="OK" <?php if($_POST['branch_state'] == OK) echo 'selected';?>> Oklahoma</option> <option value="OR" <?php if($_POST['branch_state'] == 'OR') echo 'selected';?>> Oregon</option> <option value="PA" <?php if($_POST['branch_state'] == PA) echo 'selected';?>> Pennsylvania</option> <option value="RI" <?php if($_POST['branch_state'] == RI) echo 'selected';?>> Rhode Island</option> <option value="SC" <?php if($_POST['branch_state'] == SC) echo 'selected';?>> South Carolina</option> <option value="SD" <?php if($_POST['branch_state'] == SD) echo 'selected';?>> South Dakota</option> <option value="TN" <?php if($_POST['branch_state'] == TN) echo 'selected';?>> Tennessee</option> <option value="TX" <?php if($_POST['branch_state'] == TX) echo 'selected';?>> Texas</option> <option value="UT" <?php if($_POST['branch_state'] == UT) echo 'selected';?>> Utah</option> <option value="VT" <?php if($_POST['branch_state'] == VT) echo 'selected';?>> Vermont</option> <option value="VA" <?php if($_POST['branch_state'] == VA) echo 'selected';?>> Virginia</option> <option value="WA" <?php if($_POST['branch_state'] == WA) echo 'selected';?>> Washington</option> <option value="DC" <?php if($_POST['branch_state'] == DC) echo 'selected';?>> Washington, D.C.</option> <option value="WV" <?php if($_POST['branch_state'] == WV) echo 'selected';?>> West Virginia</option> <option value="WI" <?php if($_POST['branch_state'] == WI) echo 'selected';?>> Wisconsin</option> <option value="WY" <?php if($_POST['branch_state'] == WY) echo 'selected';?>> Wyoming</option> </select> <div class="cleaner"></div> <label for="branch_zip" class="long">Zip Code:</label> <input maxlength="10" type="text" name="branch_zip" id="branch_zip" value="<?php echo htmlentities($_POST['branch_zip']);?>" /><br /> <div class="cleaner"></div> <br /> <div id="captcha_box" style=" <?php echo $display_captcha; ?> "> <strong>*CAPTCHA: (Please enter the text found in the image below<br /> or specified in the audio link to validate the submission of your data.)</strong><br /> <img src="<?php echo captchaImgUrl();?>" alt="CAPTCHA" /><br /> <a href="<?php echo captchaWavUrl();?>">Listen To This</a><br /> <input id="captcha" type="text" name="captcha" size="20" /> </div> <p><input type="submit" name="Submit" value="Submit to Database" class="inputSubmit" /> <input type="button" value="Finished" onclick="location.href='report_thankyou.php'" class="inputSubmit" /><br /> <span style="font-style:italic">I declare under penalty of perjury under the laws of the State of California that the foregoing and all attachments are true and correct.</span></p> </fieldset> </form> </div> <?php } ?> <!-- End Middle Column Content --> <!-- **************************************************************** --> </div> </div> <!-- ********** Middle column content ends ********** --> <div class="cleaner"> </div> </div> <div class="cleaner"> </div> <?php include("ssi/footer.php"); ?> </body> </html>
  19. @joel24 - thx for the help. I'm not using ajax, and yes it seems that my problem is that the form is reloading from scratch. That's my main issue....what you wrote makes sense, I think I'll give that a shot! @xyph - thank you as well for the reply! I think I'll attempt what joel24 stated to see if I can get that to work. Thanks again!
  20. Hi all - I'm having difficulty with the processing of 3 forms on my web page. We'll call my 3 forms A, B, and C. By default my page shows form A. The other 2 forms I have hidden via display:none My issue is when I have form B or C showing. Once I hit submit, say within form B for example, I'd like this form to empty out all the fields, and remain visible for future entries/submittal of data. However, instead what happens is form A appears. How do I get form B to remain, allowing for a user to submit multiple entries of data without going back to form A? This is a portion of my code at the very top of form A: <div id="header_info" style="<?php if($_POST['form'] != "HeaderInfo") echo 'display: none';?>" > <form id="HeaderInfo" method="post" action="annual_report_main.php" onsubmit="return validateHeader(this);"> Here's my entire code for form B: <div id="branches_info" style=" <?php echo $display_branches; ?> "> form method="post" action="annual_report_main.php" onsubmit="return validateBranches(this);"> <fieldset> <p><strong>Branch Location</strong></p><br /> <label for="branch_address" class="long">Street Address:</label> <input maxlength="50" type="text" name="branch_address" id="branch_address" value="<?php echo htmlentities($_POST['branch_address']);?>" /><br /> <div class="cleaner"></div> <label for="branch_city" class="long">City:</label> <input maxlength="20" type="text" name="branch_city" id="branch_city" value="<?php echo htmlentities($_POST['branch_city']);?>" /><br /> <div class="cleaner"></div> <label for="branch_state" class="long">State:</label> <input maxlength="2" type="text" name="branch_state" id="branch_state" value="<?php echo htmlentities($_POST['branch_state']);?>" /><br /> <div class="cleaner"></div> <label for="branch_zip" class="long">Zip Code:</label> <input maxlength="10" type="text" name="branch_zip" id="branch_zip" value="<?php echo htmlentities($_POST['branch_zip']);?>" /><br /> <div class="cleaner"></div> <div class="content_onecolumn"> <input type="submit" name="Branches" value="Submit to Database" class="inputSubmit" /> </div> <div class="content_onecolumn"> <input type="button" name="Finished" value="Finished" class="inputSubmit" /> </div> </fieldset> </form> </div>
×
×
  • 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.