05/03/2007, 12:35
|
| | | Fecha de Ingreso: julio-2006 Ubicación: Capital Federal
Mensajes: 220
Antigüedad: 17 años, 10 meses Puntos: 2 | |
Problema con formulario complejo Parte l Estoy reemplazando al programador en donde trabajo, y tengo que ver porque no funciona el siguiente formulario. Al no estar acostumbrado es demasiado codigo y me resulta dificil encontrar el error. Si alguien puede ayudarme, por favor!! Gracias! Código PHP: <? require_once('inc/funcs.php'); $email = "[email protected]"; $today = date("M d, Y"); $recipient = "[email protected]"; $subject = "Quotation Page"; $forminfo = "First Name: $firstname\n Last Name: $lastname\n Company: $company\n Address: $address\n City: $city\n State: $state\n Zip Code: $zip\n Country: $country\n Phone Number: $phone\n Fax Number: $fax\n E-mail: $mail\n\n Industrial Design:\n Concept Development and Ideation: $industrial_design_1\n Product Styling and Planning: $industrial_design_2\n Photo-Realistic Renderings and Animations: $industrial_design_3\n 2D and 3D Design Layouts: $industrial_design_4\n Proof-of-Concept Prototypes: $industrial_design_5\n User-Centered Research and Ergonomic Studies: $industrial_design_6\n Product Branding and Graphic Design Fax Number:: $industrial_design_7\n\n Mechanical Design:\n Component and Part Design: $mechanical_design_1\n 3D Solid Part and Assembly Modeling: $mechanical_design_2\n Design for Manufacturability/Assembly: $mechanical_design_3\n Cost Reduction and Design Improvements: $mechanical_design_4\n Materials Analysis and Selection: $mechanical_design_5\n Mechanical and Electro-Mechanical Packaging: $mechanical_design_6\n Documentation and Document Control: $mechanical_design_7\n\n Production Integration:\n Plastic Tooling: production_integration_1\n Plastic Molding: production_integration_2\n Turn-Key Production: production_integration_3\n Kitting/Sourcing of Components and Assemblies: production_integration_4\n Metal Fabrication, Stamping and Sheet Metal Assemblies: production_integration_5\n Metal Casting: production_integration_6\n CNC Machining: production_integration_7\n Thermal Forming: production_integration_8\n Plastic Extrusions: production_integration_9\n Metal Extrusions: production_integration_10\n PCB Fabrications: production_integration_11\n PCB Assemblies: production_integration_12\n Apparel, Leather, Textile, Wood and Paper Products: production_integration_13\n Secondary and Finishing: production_integration_14\n project Description: $project\n\n\n"; $formsend = mail("$recipient", "$subject", "$forminfo", "From: $email\r\nReply-to:$email"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>RHP Industries</title> <script language="JavaScript" 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[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].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[i]); if (val) { nm=val.name; 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> </head> <link rel="STYLESHEET" type="text/css" href="styles.css"> <body> <form method="post" action="quotation.php" enctype="multipart/form-data"> <table border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td class="left-top-shadow-inner"><a href="index.php"><img src="imagenes/logo-inner.jpg" alt="" width="185" height="82" border="0"></a></td> <td><img src="imagenes/top-inner.jpg" width="521" height="82" alt=""></td> <td class="right-top-shadow-inner"></td> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" align="center" class="back-nav-inner"><tr><td> <table border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td class="left-nav-inner"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="imagenes/nav-0-inner.jpg" alt="" width="201" height="28" border="0"></td> </tr> <? require_once('inc_menu.php'); ?> </table> segunda parte en el otro post |