Jump to content

jalea148

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jalea148's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When I want to show my code, should it look like {i.e. are the square brackets included?} \[code\] my code \[/code\] The problem is form fields First & Last are initialized blank. They should be initialized with $sessFirst and $sessLast; that get their values from $_POST['First'] and $_POST['Last']. In Firefox, when the form appears, these fields appear null. However, if either field is double clicked a pull down menu appears with one of the menu lines containing the posted value. Other lines contain posted values from other trials – most several days old. In IE, nothing happens after the double click.
  2. I hate dumping all this messycode on you [as it is I removed a bunch that I think is unrelated] code <?php session_start(); $_SESSION['sessFirst']; $_SESSION['sessLast']; $_SESSION['sessAddr']; $_SESSION['sessAddr2']; $_SESSION['sessCity']; $_SESSION['sessZip']; $_SESSION['sessPhone']; $_SESSION['sessEmail']; $sessFirst = $_POST['First']; $sessLast = $_POST['Last']; $sessAddr = $_POST['Addr']; $sessAddr2 = $_POST['Addr2']; $sessCity = $_POST['City']; $sessZip = $_POST['Zip']; $sessPhone = $_POST['Phone']; $sessXmail = $_POST['Email']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- #Layer1 { position:absolute; width:228px; height:402px; z-index:-1; left: 19px; top: 2966px; visibility: visible; } .style26 a { } --> </style> <script> function hiderow() { rowhide.style.display="none"; tblChoice2.style.display=""; tblChoice3.style.display="none"; } </script> <script type="text/javascript"> <!-- function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'"); } //--> </script> <!-- TemplateBeginEditable name="doctitle" --> <title>Request Quote from Insurance Source</title> <meta name="language" content="en-us" /> <meta name="robots" content="ALL" /> <meta name="rating" content="SAFE FOR KIDS" /> <meta name="distribution" content="NC" /> <meta name="classification" content="Insurance" /> <meta name="copyright" content="Richard" /> <meta name="author" content="Richard" /> <meta name="revisit-after" content="30 Days" /> <script src="file:///C|/RND/richard.com/Progs/usableforms.js"></script> <script type="text/javascript" src="file:///C|/RND/richard.com/form-validation.js"></script> <script language = "JavaScript" type="text/javascript"> /** * DHTML date validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/) */ // Declaring valid date character, minimum year and maximum year var dtCh= "/"; var minYear=1900; var maxYear=2100; function isInteger(s){ var i; for (i = 0; i < s.length; i++){ // Check that current character is number. var c = s.charAt(i); if (((c < "0") || (c > "9"))) return false; } // All characters are numbers. return true; } function stripCharsInBag(s, bag){ var i; var returnString = ""; // Search through string's characters one by one. // If character is not in bag, append to returnString. for (i = 0; i < s.length; i++){ var c = s.charAt(i); if (bag.indexOf© == -1) returnString += c; } return returnString; } function daysInFebruary (year){ // February has 29 days in any year evenly divisible by four, // EXCEPT for centurial years which are not also divisible by 400. return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 ); } function DaysArray(n) { for (var i = 1; i <= n; i++) { this = 31 if (i==4 || i==6 || i==9 || i==11) {this = 30} if (i==2) {this = 29} } return this } function isDate(dtStr){ var daysInMonth = DaysArray(12) var pos1=dtStr.indexOf(dtCh) var pos2=dtStr.indexOf(dtCh,pos1+1) var strMonth=dtStr.substring(0,pos1) var strDay=dtStr.substring(pos1+1,pos2) var strYear=dtStr.substring(pos2+1) strYr=strYear if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1) if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1) for (var i = 1; i <= 3; i++) { if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1) } month=parseInt(strMonth) day=parseInt(strDay) year=parseInt(strYr) if (pos1==-1 || pos2==-1){ alert("The date format should be : mm/dd/yyyy") return false } if (strMonth.length<1 || month<1 || month>12){ alert("Please enter a valid month") return false } if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){ alert("Please enter a valid day") return false } if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){ alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear) return false } if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){ alert("Please enter a valid date") return false } return true } function ValidateForm(){ var dt=document.RequestQuote.Appl_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm0(){ var dt=document.RequestQuote.Spouse_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm1(){ var dt=document.RequestQuote.Dep1_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm2(){ var dt=document.RequestQuote.Dep2_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm3(){ var dt=document.RequestQuote.Dep3_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm4(){ var dt=document.RequestQuote.Dep4_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm5(){ var dt=document.RequestQuote.Dep5_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm6(){ var dt=document.RequestQuote.Dep6_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } function ValidateForm7(){ var dt=document.RequestQuote.Dep7_DOB if (isDate(dt.value)==false){ dt.focus() return false } return true } </script> <script type="text/javascript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args); if (val) { nm=val.id; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } //--> </script> <script> function show_hide_column(col_no, do_show) { var stl; if (do_show) stl = 'block' else stl = 'none'; var tbl = document.getElementById('Single'); var rows = tbl.getElementsByTagName('tr'); for (var row=0; row<rows.length;row++) { var cels = rows[row].getElementsByTagName('td') cels[col_no].style.display=stl; } } </script> <script> /* Submit Once form validation- © Dynamic Drive (www.dynamicdrive.com) For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com */ function submitonce(theform){ //if IE 4+ or NS 6+ if (document.all||document.getElementById){ //screen thru every element in the form, and hunt down "submit" and "reset" for (i=0;i<theform.length;i++){ var tempobj=theform.elements if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") //disable em tempobj.disabled=true } } } </script> <script> <!-- function init() { prepareForm(); } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args); if (val) { nm=val.id; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } function FDK_StripChars(theFilter,theString) { var strOut,i,curChar strOut = "" for (i=0;i < theString.length; i++) { curChar = theString.charAt(i) if (theFilter.indexOf(curChar) < 0) // if it's not in the filter, send it thru strOut += curChar } return strOut } function FDK_AllInRange(x,y,theString) { var i, curChar for (i=0; i < theString.length; i++) { curChar = theString.charAt(i) if (curChar < x || curChar > y) //the char is not in range return false } return true } function FDK_reformat(s) { var arg; var sPos = 0; var resultString = ""; for (var i = 1; i < FDK_reformat.arguments.length; i++) { arg = FDK_reformat.arguments; if (i % 2 == 1) resultString += arg; else { resultString += s.substring(sPos, sPos + arg); sPos += arg; } } return resultString; } function FDK_AddToValidateArray(FormName,FormElement,Validation,SetFocus) { var TheRoot=eval("document."+FormName); if (!TheRoot.ValidateForm) { TheRoot.ValidateForm = true; eval(FormName+"NameArray = new Array()") eval(FormName+"ValidationArray = new Array()") eval(FormName+"FocusArray = new Array()") } var ArrayIndex = eval(FormName+"NameArray.length"); eval(FormName+"NameArray[ArrayIndex] = FormElement"); eval(FormName+"ValidationArray[ArrayIndex] = Validation"); eval(FormName+"FocusArray[ArrayIndex] = SetFocus"); } function FDK_ValidateEmail(FormElement,Required,ErrorMsg) { var msg = ""; var val = FormElement.value; var msgInvalid = ErrorMsg; var theLen = FDK_StripChars(" ",val).length if (theLen == 0) { if (!Required) return ""; else return msgInvalid; } if (val.indexOf("@",0) < 0 || val.indexOf(".")<0) { msg = msgInvalid; } return msg; } function FDK_AddEmailValidation(FormName,FormElementName,Required,SetFocus,ErrorMsg) { var ValString = "FDK_ValidateEmail("+FormElementName+","+Required+","+ErrorMsg+")" FDK_AddToValidateArray(FormName,eval(FormElementName),ValString,SetFocus) } function FDK_ValidateUSPhone(FormElement,Required,ErrorMsg) { var msg = "" var theString = FormElement.value; var msgInvalid = ErrorMsg var theLen = FDK_StripChars(" \n\t\r",theString).length if (theLen == 0) if (!Required) return "" else return msgInvalid theString = FDK_StripChars("*() -./_\n\r",theString) if (!FDK_AllInRange("0","9",theString)) { msg = msgInvalid } else if (theString.length == 11) { if (theString.charAt(0) != "1") msg = msgInvalid } else if (theString.length != 10 && theString.length != 7) { msg = msgInvalid } if (msg == "") { if (theString.length == 10) FormElement.value=(FDK_reformat(theString,"(",3,") ",3,"-",4)) else if (theString.length == 7) FormElement.value=(FDK_reformat(theString,"",3,"-",4)) else //len == 11 FormElement.value=(FDK_reformat(theString,"",1,"(",3,") ",3,"-",4)) } return msg } function FDK_AddUSPhoneValidation(FormName,FormElementName,Required,SetFocus,ErrorMsg) { var ValString = "FDK_ValidateUSPhone("+FormElementName+","+Required+","+ErrorMsg+")" FDK_AddToValidateArray(FormName,eval(FormElementName),ValString,SetFocus) } function FDK_ValidateRadio(RadioGroup,ErrorMsg) { var msg = ErrorMsg; for (x=0;x<RadioGroup.length;x++) { if (RadioGroup[x].checked) { msg="" } } return msg; } function FDK_AddRadioValidation(FormName,FormElementName,SetFocus,ErrorMsg) { var ValString = "FDK_ValidateRadio("+FormElementName+","+ErrorMsg+")" FDK_AddToValidateArray(FormName,eval(FormElementName + '[0]'),ValString,SetFocus) } //--> </script> <link href="file:///C|/RND/richard.com/osstyle.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="file:///C|/RND/richard.com/menu.css" /> <style type="text/css"> <!-- .style10 { font-size: 16px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; } .style12 { font-size: 12px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; } .style13 {font-size: x-small; } .style15 { color: #FFFFFF; font-weight: bold; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; } .req { background-color: #FFFF99; } body { background-color: #670065; } .stylehide { font-size: 6px; visibility: hidden; } .style18 {font-size: 10px} .style19 {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold;} .style20 {font-size: 12px} .style23 { color: #E3E3E3; font-size: 4px; } --> </style> <link href="file:///C|/RND/richard.com/osstyle.css" rel="stylesheet" type="text/css" /> <style type="text/css"> } .style33 {color: #0000FF} --> </style></head> <body onload="prepareForm()"> <table border="2" cellpadding="8"> <tr> <td valign="top" bgcolor="#670065"><p> </p> </td> <td width="620" valign="top" bgcolor="#670065" class="rainbackgr"> <form action="http://RichHealthPlans.com/webber.php" method="get" enctype="multipart/form-data" name="quote_form" id="quote_form" onSubmit="MM_validateForm('First','','R','Last','','R','address1','','R','city','','R','Zip','','R','Email','','RisEmail','Phone','','R','Appl_DOB','','R','County','','R','Spouse_DOB','','R'); FDK_AddRadioValidation('quote_form','document.quote_form.Appl_Uses_Tobacco',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Marital',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Spouse_Sex',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Spouse_Uses_Tobacco',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Dep2_Sex',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Dep3_Sex',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Dep1_Sex',true,'\'Field is required ,\\nplease make a choice.\'');return document.MM_returnValue" > <table border="8" cellpadding="1" id="Form0"> <tr > <td width="80" height="26"><p class="style10">Applicant</p></td> <td width="515" colspan="4" valign="middle" bgcolor="#FFFF99"><div align="center" class="style33"><em>Required fields have this background </em></div></td> </tr> <tr> <td><div align="right" class="style12"> <p>First </p> </div></td> <td colspan="4"><div align="left" class="style12"> <p> <input name="First" id="First" type="text" class="req" size="20" tabindex="1" value="<?php echo $sessFirst; ?>"/> Last <input name="Last" id="Last" type="text" class="req" size="20" tabindex="2" value="<?php echo $sessLast; ?>" /> </p> </div></td> </tr> </table> </form></td> </tr> </table> <table><tbody id="waitingRoom" style="display: none"></tbody></table> <<!--WEBSITECEO:BEGIN:{764EEF2E-BC11-45CF-8627-300CE1BA2219}--> </body> </html> /code
  3. A variation of this snippit was working with php4 [obsolete variables replaced]. The session array is not null - the vaules are assigned from a post from a pror page and display in a pull down menu in Firefox. So, php4 doesn't think the default values are null; php5 appears to interpret the values as null. Redirection to another page requires validation - null fields are invalid. Here's the setup: <?php session_start(); $_SESSION['sessFirst']; $_SESSION['sessLast']; $sessFirst = $_POST['First']; $sessLast = $_POST['Last']; ?> Also, here's the beginning of the form: <form action="http://Rxyz.com/webqq.php" method="get" enctype="multipart/form-data" name="quote_form" id="quote_form" onSubmit="MM_validateForm('First','','R','Last','','R','address1','','R','city','','R','Zip','','R','Email','','RisEmail','Phone','','R','Appl_DOB','','R','County','','R','Spouse_DOB','','R'); FDK_AddRadioValidation('quote_form','document.quote_form.Appl_Uses_Tobacco',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Marital',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Spouse_Sex',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Spouse_Uses_Tobacco',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Dep2_Sex',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Dep3_Sex',true,'\'Field is required,\\nplease make a choice.\''); FDK_AddRadioValidation('quote_form','document.quote_form.Dep1_Sex',true,'\'Field is required ,\\nplease make a choice.\'');return document.MM_returnValue" >
  4. I think you missed the snippit within my question.
  5. I'm able to pass the data ok, but the form fields First and Last are blank. In IE there are not clues the data is being passed. But, in Firefox when either form field is double clicked, a pull down menu appears and one of the menu items has the passed data - other menu items are passed values from prior tests. <?php session_start(); $_SESSION['sessFirst']; $_SESSION['sessLast']; $sessFirst = $_POST['First']; $sessLast = $_POST['Last']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> .................. <form action=".......................... > .................. <p> <input name="First" id="First" type="text" class="req" size="20" tabindex="1" value="<?php echo $sessFirst; ?>"/> <span class="style12"> Last </span> <input name="Last" id="Last" type="text" class="req" size="20" tabindex="2" value="<?php echo $sessLast; ?>" /> </p> .................... <body> </body> </html>
  6. Thanks - you sent me in the right direction. However, in <p> <input name="First" id="First" type="text" class="req" size="20" tabindex="1" value="<?php echo $sessFirst; ?>"/> <span class="style12"> Last </span> <input name="Last" id="Last" type="text" class="req" size="20" tabindex="2" value="<?php echo $sessLast; ?>" /> </p> the passed data does not appear. Instead, when you double click in the field a pull down menu appears and the session variable value is one of the menu items.
  7. :-X here's a snippit - code worked in php4; not in php5. Form variables First, Last etc are blank. <?php session_start(); session_register('sessFirst'); session_register('sessLast'); session_register('sessAddr'); session_register('sessAddr2'); session_register('sessCity'); session_register('sessZip'); session_register('sessPhone'); session_register('sessEmail'); $sessFirst = $_POST['First']; $sessLast = $_POST['Last']; $sessAddr = $_POST['Addr']; $sessAddr2 = $_POST['Addr2']; $sessCity = $_POST['City']; $sessZip = $_POST['Zip']; $sessPhone = $_POST['Phone']; $sessXmail = $_POST['Email']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> .................. <form action=".......................... > .................. <p> <input name="First" id="First" type="text" class="req" size="20" tabindex="1" value="<?php echo $sessFirst; ?>"/> <span class="style12"> Last </span> <input name="Last" id="Last" type="text" class="req" size="20" tabindex="2" value="<?php echo $sessLast; ?>" /> </p> .................... <body> </body> </html>
  8. Something like this? <input type="hidden" name="from" value="<?php echo strtr($_GET['Email'],'%40','@'); ?>" Jay
  9. I’m using a Get to pass data to the next page. With Internet Explorer there are no problems. With Firefox, the @ symbol in the email address is translated into %40. This causes a problem in this snippet: <input type="hidden" name="from" value="<?php echo $_GET['Email']; ?>" [customer@alltel.net comes through as customer%40alltel.net in Firefox] What fixes are available? Thank you. Jay
  10. I haven’t received any responses, so here’s a revision of my problem. I have 3 pages, each with forms; all in the same domain. The data from the first page passes to the 2nd and 3rd ok {First, Last, Addr, City}. On the 2nd I create all the session variables: <?php session_start(); session_destroy(); session_register("sessFirst"); session_register("sessLast"); session_register("sessAddr"); session_register("sessCity"); session_register("sessApplSex"); session_register("sessCounty"); $sessFirst = $HTTP_POST_VARS['First']; $sessLast = $HTTP_POST_VARS['Last']; $sessAddr = $HTTP_POST_VARS['Addr']; $sessCity = $HTTP_POST_VARS['City']; $sessApplSex = $_POST['Appl_Sex']; $sessCounty = $_POST['County']; ?> <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ………………. The form on page 2 has two additional fields, County and Appl_Sex {= a radio button} whose values I would like to pass to page3. these are validated to insure they are not null. Here’s some snippets: …………… <td > <input name="Appl_Sex" id="App_Male" class="req" type="radio" value="Male" tabindex="20"/><label> Male </label> <input type="radio" name="Appl_Sex" id="App_Female" class="req" value="Female" tabindex="21" /><label > Female </label> </td> ……………… <form action="http://www.insurance.com/wexxx.php" method="post" enctype="multipart/form-data" name="quote_form" id="quote_form" onsubmit="return validateForm()"> ………………….. On page 3, value="<?php echo $_POST['Appl_Sex']; ?>" /> and value="<?php echo $sessCounty; ?>" /> both produce value = “”. Any clues how to access these page 2 form values on page 3? Is this sort of issue better resolved with AJAX?
  11. I guess the key issue is: on Page3 why does <?php echo $_POST['Appl_Sex']; ?> produce a null value? Appl_Sex is set on the form in Page 2.
  12. I have 3 pages, each with forms; all in the same domain. The data from the first passes to the 2nd and 3rd ok. On the 2nd I create the session variables: <?php session_start(); session_destroy(); session_register("sessFirst"); session_register("sessLast"); session_register("sessAddr"); session_register("sessCity"); session_register("sessState"); session_register("sessZip"); session_register("sessPhone"); session_register("sessXmail"); session_register("sessApplSex"); $sessFirst = $HTTP_POST_VARS['First']; $sessLast = $HTTP_POST_VARS['Last']; $sessAddr = $HTTP_POST_VARS['Addr']; $sessCity = $HTTP_POST_VARS['City']; $sessState = $HTTP_POST_VARS['State']; $sessZip = $HTTP_POST_VARS['Zip']; $sessPhone = $HTTP_POST_VARS['Phone']; $sessXmail = $HTTP_POST_VARS['Xmail']; $sessApplSex = "xxx"; ?> <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ………………. The form on page 2 has a radio button whose value I would like to pass to page3. Here’s some snippets: …………… <td "> <input name="Appl_Sex" id="App_Male" class="req" type="radio" value="Male" tabindex="20" onclick="change(this.value)"/> <label> Male </label> <input type="radio" name="Appl_Sex" id="App_Female" class="req" value="Female" tabindex="21" onclick="change(this.value)"><label > Female </label> </td> ……………… <script> function change(RadioValue) { $_SESSION['sessApplSex']=RadioValue; } </script> On page 3, 'sessApplSex' has the value ‘xxx’ Also on Page 3, I tried to use $_POST[Appl_Sex] with similar difficulty.
  13. I don't control the server with pages A or C where they reside. So, it may be difficult to get at the auto_prepend_file, config or php.ini files. Page B is on still another server. Rather than using a redirect to bring up page C, would it be possible for the action in Page A to post to both page B and page C [using only 1 submit button]? Page B is never accessed by the user who should only see page C. [b is a service that requires it incoming data from a POST??? There would not be a problem if they accepted email.] Validation is required on page A. This would solve the cookie problem. BTW, I can't trick it by posting directly to Page C - it already posts to formmail.php and redirects to thank you.
  14. Both page A and Page C are in the same directory on the server. Aren't they in the same domain?
×
×
  • 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.