Ver Mensaje Individual
  #5 (permalink)  
Antiguo 16/12/2010, 17:28
jotaeva
 
Fecha de Ingreso: junio-2010
Mensajes: 37
Antigüedad: 13 años, 10 meses
Puntos: 0
Respuesta: Problema con un formulario

Este es el código del módulo completo. La formas finales las procesa el sitio del creador de FormMail. Tengo un contrato con ellos. Lo extraño es que el mismo proceso funciona perfectamente en ASP pero no con PHP. Este es el código completo del módulo:

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.  <head>
  4.   <meta http-equiv="content-language" content="en">
  5.   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6.   <meta name="generator" content="PhpED Version 5.9 (Build 5921)">
  7.   <meta name="description" content="Música Latina en MIDI y Cocina Colombiana">
  8.   <meta name="keywords" content="midi, latino, latin midi, latin music, musica latina, colombia,cocina,recetas,tipica">
  9.   <title>Super Midi Latino. Música Latin en formato MIDI</title>
  10.   <link rel="stylesheet" type="text/css" href="css/base.css">
  11.   <link rel="stylesheet" type="text/css" href="css/menu.css">
  12.   <script type="text/javascript" src="scripts/lib.js"></script>
  13.   <script type="text/javascript" src="scripts/checkData.js"></script>
  14.  
  15.  </head>
  16.  <body>
  17.   <div id="container">
  18.    <div id="logo"><img src="imagenes/logo.png" width="734" height="58" /></div>
  19.    <div id="menu">
  20.     <?
  21.     include("menu.php");
  22.     //include("usremoto.php");
  23.    ?>
  24.    </div>
  25.    <div id="contenido">
  26.     <div Id="records">
  27.  
  28.      
  29.      <form name="pedsec" method="POST" action="http://fp1.formmail.com/cgi-bin/fm192" onSubmit="return checkFields()">
  30.       <input type="hidden" name="_pid" value="46043">
  31.       <input type="hidden" name="_fid" value="F1SIV2RB">
  32.       <input type="hidden" name="subject" value="Pedidos Midis">
  33.       <input type="hidden" name="redirect" value="http://www.prolatin.com/sml/gracias.php">
  34.       <input type="hidden" name="recipient" value="1">
  35.       <input type=hidden name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">
  36.       <input type=hidden name="text_color" value="#0000FF">
  37.       <input type=hidden name="sort" value="order:nombre,email,ciudad,tel,numwes">
  38.  
  39.       <table border="0" align="center">
  40.        <tr>
  41.         <th><?php echo '<a href="demos.php?$sort=CLASE">CL</a><br>';?></th>
  42.         <th><?php echo '<a href="demos.php?$sort=TEMA">Tema</a><br>';?></th>
  43.         <th><?php echo '<a href="demos.php?$sort=RITMO">Ritmo</a><br>';?></th>
  44.         <th><?php echo '<a href="demos.php?$sort=AUTOR">Autor</a><br>';?></th>
  45.         <th><?php echo '<a href="demos.php?$sort=ARREGLO">Arreglo</a><br>';?></th>
  46.         <th><?php echo '<a href="demos.php?$sort=FECHA">Fecha</a><br>';?></th>
  47.         <th>PED</th>
  48.        </tr>
  49.        <?php
  50.        echo "<div style='margin-left: 250px;'>";
  51.         echo '<a class="listas" href="demos.php?$clase=CO">CO=Colombiana</a><br />';
  52.         echo '<a class="listas" href="demos.php?$clase=RO">RO=Rom&aacute;ntica</a><br />';
  53.         echo '<a class="listas" href="demos.php?$clase=TR">TR=Tropical</a><br />';
  54.         echo '<a class="listas" href="demos.php?$clase=MX">MX=Mexicana</a><br />';
  55.         echo '<a class="listas" href="demos.php?$clase=SA">SA=Suramericana</a><br />';
  56.         echo '<a class="listas" href="demos.php?$clase=CA">CA=Centroamericana</a><br />';
  57.         echo '<a class="listas" href="demos.php?$clase=RK">RK=Rock-Pop</a><br />';
  58.         echo '<a class="listas" href="demos.php?$clase=ES">ES=Española</a><br />';
  59.         echo '<a class="listas" href="demos.php?$clase=TO">TO=Listado General</a><br />';
  60.         echo "</div><br>";
  61.         //$clase=$_GET['$clase'];
  62.         $tamano_pagina=20;
  63.         $pagina = $_GET["pagina"];
  64.  
  65.         if ($_GET['$clase'] == ""){
  66.          $clase="TO";
  67.         }else{
  68.          $clase=$_GET['$clase'];
  69.          //print $clase;
  70.         }
  71.  
  72.         if ($_GET['$sort'] == ""){
  73.          $sort="TEMA";
  74.         }else{
  75.          $sort=$_GET['$sort'];
  76.          //print $sort;
  77.         }
  78.  
  79.         include("remoto.php");
  80.  
  81.         if ($clase=="TO"){
  82.          $result = mysql_query('select * from temas order by ' . $sort, $con)or die (mysql_error());
  83.          $resultotal = mysql_query('SELECT * from temas') or die (mysql_error());
  84.          $num_total_registros=mysql_num_rows($resultotal);
  85.          $total_paginas=ceil($num_total_registros / $tamano_pagina);
  86.          echo "<h5>" . $num_total_registros. " Midis encontrados";
  87.          // . ". Página " . $pagina . " de " . $total_paginas . ".</h5>";
  88.         }else{
  89.          $result = mysql_query('select * from temas where CLASE like \'%'.$clase.'%\' order by ' . $sort, $con )or die (mysql_error());
  90.          $resultotal = mysql_query('SELECT * from temas where CLASE like \'%'.$clase.'%\'') or die (mysql_error());
  91.          $num_total_registros=mysql_num_rows($resultotal);
  92.          $total_paginas=ceil($num_total_registros / $tamano_pagina);
  93.  
  94.          switch ($clase) {
  95.           case "CO":
  96.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Colombiana.</h5>";
  97.            break;
  98.           case "RO":
  99.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Rom&aacute;ntica.</h5>";
  100.            break;
  101.           case "TR":
  102.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Tropical.</h5>";
  103.            break;
  104.           case "RK":
  105.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Rock.</h5>";
  106.            break;
  107.           case "CA":
  108.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Centroamericana.</h5>";
  109.            break;
  110.           case "SA":
  111.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Suramericana.</h5>";
  112.            break;
  113.           case "MX":
  114.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Mexicana.</h5>";
  115.            break;
  116.           case "TO":
  117.            echo "<h5>" .$num_total_registros . " Total Midis de Super Midi Latino.</h5>";
  118.            break;
  119.           case "ES":
  120.            echo "<h5>" .$num_total_registros . " Midis encontrados de música Española.</h5>";
  121.            break;
  122.           default:
  123.            echo "";
  124.          }
  125.         }
  126.         while($row=mysql_fetch_array($result)){
  127.          echo '<tr><td>'.$row["CLASE"].'</td>';
  128.          $midi=strtolower($row["ARCHIVO"]);
  129.         ?>
  130.         <td>
  131.          <a href="javascript:void(null)" onclick="mp3('http://www.prolatin.com/demos/<?php echo $midi;?>',1,350,120)"><?php echo $row["TEMA"]; ?></a>
  132.         </td>
  133.         <?php
  134.         echo '<td>'.$row["RITMO"].'</td>';
  135.          echo '<td>'.$row["AUTOR"].'</td>';
  136.          echo '<td>'.$row["ARREGLO"].'</td>';
  137.          echo '<td>'.substr($row["FECHA"],-19,4).'</td>';?>
  138.         <td>
  139.        <input type="checkbox" name="pedido[<?php echo $row["TEMA"];?>]"/>
  140.         </td></tr>
  141.         <?php
  142.        } //final While
  143.       ?>
  144.       </table><br /><br />
  145.  
  146.       <div align="center">
  147.  
  148.        <table border="1" cellpadding="10" cellspacing="1" bgcolor="#f7efde">
  149.  
  150.         <tr>
  151.          <td width="48%" valign="middle" align="left">  <strong>Nombre
  152.          </strong><font color=red> * </font>  </td>
  153.          <td width="52%" valign="middle" align="left">
  154.           <input type="text" name="nombre" size="35">
  155.          </td>
  156.         </tr>
  157.  
  158.         <tr>
  159.          <td width="48%" valign="middle" align="left">  <strong>Email
  160.          </strong><font color=red> * </font>  </td>
  161.          <td width="52%" valign="middle" align="left">
  162.           <input type="text" name="email" size="25">
  163.          </td>
  164.         </tr>
  165.  
  166.         <tr>
  167.          <td width="48%" valign="middle" align="left">  <strong>Ciudad
  168.          </strong><font color=red> *  </font> </td>
  169.          <td width="52%" valign="middle" align="left">
  170.           <input type="text" name="ciudad" size="35">
  171.          </td>
  172.         </tr>
  173.  
  174.         <tr>
  175.          <td width="48%" valign="middle" align="left">  <strong>Teléfono
  176.           </strong><font color=red> * </font>
  177.          </td>
  178.          <td width="52%" valign="middle" align="left">
  179.           <input type="text" name="tel" size="15">
  180.          </td>
  181.         </tr>
  182.  
  183.         <tr>
  184.          <td width="48%" valign="middle" align="left"><strong>Código Paypal
  185.          </strong>  </td>
  186.          <td width="52%" valign="middle" align="left">
  187.           <input type="text" name="numwes" size="15">
  188.          </td>
  189.         </tr>
  190.  
  191.         <tr>
  192.          <td width="48%" align=center colspan=2>
  193.           <center>
  194.            <font color=red> * </font><FONT COLOR="#FF0000" FACE="Trebuchet MS"><B>Campos
  195.              Obligatorios<BR>
  196.             </B></FONT>
  197.            <input type="submit" name="env" value="Enviar">
  198.            <input type="reset" name="canc" value="Cancelar">
  199.            <BR>
  200.            <BR>
  201.           </center>
  202.          </td>
  203.         </tr>
  204.        </table>
  205.       </div>
  206.      </form>
  207.     </div>
  208.    </div>
  209.    <div id="footer"><script>webmaster()</script></div>
  210.   </div>
  211.  </body>
  212. </html>