Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/06/2005, 18:16
ThunderFx
 
Fecha de Ingreso: diciembre-2003
Ubicación: Campehce, Mexico
Mensajes: 325
Antigüedad: 20 años, 4 meses
Puntos: 0
Ayuda pasando variables

Hola, tengo el siguiente problema.
Estoy haciendo un tipo e-comerce. Al darle ver a un producto nos muestra todos sus datos, entonces cuando le doy en realizar pedido me lleva a un formulario, el cual hago un select para elegir los datos de dicho articulo.
El problema es que en el formulario almaceno el titulo y la id del mismo en unas varibles, para despues pasarlas al archivo que envia el email pero el problema es que no me pasa las variables

Aqui el codigo para que se den una idea:
Código PHP:
<?
include("conexion.php");
if(isset(
$_GET['realizar'])) {
$selekt mysql_query("SELECT * FROM productos WHERE id='$realizar'");
while(
$row mysql_fetch_array($selekt)) {
$id "".$row[id]."";
$titulo "".$row[titulo]."";
echo 
"<script language='JavaScript'>
function validar(){
if(document.form1.nombre.value == '')
{
alert('Ingresa tu nombre');
document.form1.nombre.focus();
return false;
}
if(document.form1.correo.value == '')
{
alert('Ingresa tu e-mail');
document.form1.correo.focus();
return false;
}
return true;
}
</script>

<p align='center'>
<font face='Tahoma' color='#000080' style='font-size: 8pt; font-weight: 700'>
Formulario de Pedido</font></p>
<form method='POST' action='?go=realizado' name='form1' onsubmit='return validar()'>
  <div align='center'>
    <center>
    <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='303' id='AutoNumber1'>
      <tr>
        <td width='172' align='right'>
        <font face='Tahoma' style='font-size: 8pt'>Producto a solicitar:</font></td>
        <td width='24'>&nbsp;</td>
        <td width='173'>
        <font face='Tahoma' style='font-size: 8pt; font-weight: 700'>$row[titulo]</font></td>
      </tr>
      <tr>
        <td width='172' align='right'>
        <font face='Tahoma' style='font-size: 8pt'>Nombre:</font></td>
        <td width='24'>&nbsp;</td>
        <td width='173'>
        <input type='text' name='nombre' size='26' style='font-family: Tahoma; font-size: 8 pt; font-weight: bold'></td>
      </tr>
      <tr>
        <td width='172' align='right'>
        <font face='Tahoma' style='font-size: 8pt'>Correo:</font></td>
        <td width='24'>&nbsp;</td>
        <td width='173'>
        <input type='text' name='correo' size='26' style='font-family: Tahoma; font-size: 8 pt; font-weight: bold'></td>
      </tr>
      <tr>
        <td width='172' align='right' valign='top'>
        <font face='Tahoma' style='font-size: 8pt'>Comentarios:</font></td>
        <td width='24'>&nbsp;</td>
        <td width='173'>
        <textarea rows='9' name='comentarios' cols='27' style='font-family: Tahoma; font-size: 8 pt; font-weight: bold'></textarea></td>
      </tr>
    </table>
    </center>
  </div>
  <p align='center'><input type='submit' value='Enviar'></p>
</form>"
;
}
}
?>
Saludos y gracias por todo