Ver Mensaje Individual
  #9 (permalink)  
Antiguo 03/05/2011, 19:22
Avatar de fekaa11
fekaa11
 
Fecha de Ingreso: abril-2011
Ubicación: Córdoba / Argentina
Mensajes: 115
Antigüedad: 13 años
Puntos: 34
Respuesta: nesecitoayuda con este script por favor

Código PHP
Código PHP:
Ver original
  1. <?php
  2. mysql_connect("localhost","root";);
  3. mysql_select_db("mail soluction";);
  4. $re=mysql_query("select * from mensajero";);
  5. //el @ sirve para que no salga ese mensaje de NOTICE al momento de ejecutar por 1ra ve nuestro codigo.
  6. if(isset($_POST['MENSAJERO'])){
  7. $mensajero=$_POST['TIPO_DE_CORREO'];
  8. $re1=mysql_query("select * from tipo_correo where COD_CORREO='$TIPO_DE_CORREO';);
  9. $re2=mysql_query("select nombre from mensajero where CODMEN='$MENSAJERO';);
  10. }else{
  11. @$j[MENSAJERO]='Seleccione Mensajero'; }
  12.  
  13. ?>
  14. <style type="text/css">
  15. <!--
  16. .Estilo1 {
  17. font-size: 16px;
  18. font-weight: bold;
  19. }
  20. -->
  21. </style>
  22.  
  23.  
  24.  
  25. <form id="form1" name="form1" method="post" action="inserta_men.php">
  26. <div align="center">
  27. <p><span class="Estilo1">Crear Planilla a Mensajeros </span><br>
  28. <br>
  29.  
  30.  
  31. <select name="mensajero_pla" size=1 id="mensajero_pla" onchange="" style=width:200px>
  32. <option value="0" selected="selected"><?php echo @$j[MENSAJERO];?></option>
  33. <?php
  34.  
  35. while($f=mysql_fetch_array($re)){
  36. echo "<option value='$f[CODMEN]'>".$f[MENSAJERO]."</option>";
  37.  
  38. }
  39. ?>
  40. </select>
  41. <br />
  42. <select name="tipo_pla" size=1 id="tipo_pla" style=width:201px onchange="">
  43. <option value="0">Seleccione Envio</option>
  44. <option>24 Horas</option>
  45. <option>Masivo</option>
  46. <option>Certificado</option>
  47. <?php
  48.  
  49. while($f=mysql_fetch_array($re)){
  50. echo "<option value='$f[COD_CORREO]'>'$f[TIPO_DE_CORREO]'</option>";
  51.  
  52. }
  53. ?>
  54. </select>
  55. </p>
  56. </p>
  57. <label for="Submit"></label>
  58. <input type="submit" name="Submit" value="Enviar" id="Submit" />
  59. <p><img src="mail logo.png" width="216" height="45" /></p>
  60. </div>
  61. </form>

El otro código PHP
Código PHP:
Ver original
  1. <?php
  2. $conexion = mysql_connect("localhost","root","";);
  3.  
  4. mysql_select_db("mail soluction",$conexion);
  5.  
  6. $fecha = date("Y-m-d");
  7. $query = "INSERT INTO planilla_ge (mensajero_pla, tipo_pla, fecha)
  8. VALUES ('$mensajero_pla','$tipo_pla','$fecha')";
  9. mysql_query($query) or die("Error al insertar datos: <br>" . mysql_error());
  10. echo "Se a Creado la Planila";
  11. mostrar1();
  12.  
  13.  
  14. ?>

Prueba ahi. Esa instrucción or die(); te muestra los errores sobre las consultas luego de usar la función mysql_query();. Si te dá error por favor ponlo aquí asi podremos ayudarte mejor.
__________________
Pedir perdón es de hombres inteligentes. Perdonar es de sabios.