Foros del Web » Programando para Internet » PHP »

PHP OO php y mysql

Estas en el tema de php y mysql en el foro de PHP en Foros del Web. tengo una tabla con el nombre de proveedores y lo leao a estos por medio de un foemulario, hasta alli todo bien, pero el problema ...
  #1 (permalink)  
Antiguo 12/04/2011, 09:56
 
Fecha de Ingreso: septiembre-2010
Mensajes: 14
Antigüedad: 13 años, 6 meses
Puntos: 0
php y mysql

tengo una tabla con el nombre de proveedores y lo leao a estos por medio de un foemulario, hasta alli todo bien, pero el problema esta que cuando quiero leer el nombre del proveedor elegido a travez de otra pagina la variable proveedor no s enviada....no se si me explique bién..les mando el programa...

<?php
//PROGRAMA leedatostelesc.php ------------------

$dbservidor = "sql313.byetcluster.com";
$dbusuario = "tf_7493646";
$dbpassword = "abc1178";
$db = "tf_7493646_articulos";

// hacemos una conexion a la bd
//---------------------------------------------------------

$conexion = mysql_connect($dbservidor,$dbusuario,$dbpassword)o r die ("Erro no puedo encontrar el servidor, $dbservidor");

// Seleccionamos la base de datos
//---------------------------------------------------------
$articulo= 420;
mysql_select_db ($db, $conexion) or die ("No se pudo conectarme a la base de datos, $db , $dbservidor");










?>










<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>




<title>Robotizaci&oacute;n del telescopio</title>

<meta http-equiv="" content="text/html; charset=iso-8859-1"><meta http-equiv="Content-Type" content="text/html; charset=">

</head>

<body bgcolor="#9999FF">
<p align="right"><strong><font color="#0099FF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Abril
22, 2010</font></strong></p>
<p align="center"><font color="#0000FF" size="3"><strong>INGRESE SOLO EL ARTICULO </strong></font></p>

<form id = "form1" name="form1" method="post" action="leebdprov.php">
<table width="701" border="1" align="center" bgcolor="#99CC99" id="datos">

<tr>
<th width="222" scope="row"><label for="label"></label>

<label>Proveedor
<select name="Nombre" size="1" id="Nombre">
<option value=Select a Option selected=selected>

<?php

$result = mysql_query("SELECT * FROM Proveedor",$conexion);
//echo'<select name="Proveedor">';
while($sql = mysql_fetch_array($result))
{
echo "<option value=\"".$sql['proveedor']."\">".$sql['Nombre']."</option>";
}
?>

</select>
</label>


<label></label></th>
<td width="203"><label for="textfield"><strong>Art&iacute;culo</strong>
<input name="articulo" type="text" size="8" id="articulo">
</label></td>
<td width="254"><label for="textfield"><strong>Descripci&oacute;n</strong></label>
<input name="descripcion" type="text" id="descripcion" size="50"></td>
</tr>


<tr>
<th scope="row"><label>MARACA
<select name="marcas" id="marcas">
<option value="elemento">Elemento</option>
<option value="cocot">Cocot</option>
</select>
</label> <label for="label2"></label></th>
<td><label for="label2"><strong>Precio Sin IVA</strong></label>
<input name="preciosiniva" type="int" id="preciosiniva" size="8"> <label for="label3"></label></td>
<td><p>
<label></label>
<label for="select"></label>
<label for="label4"> <strong><br>
</strong></label>
<label for="label3"><strong>Precio Con IVA</strong></label>
<input name="precioconiva" type="text" id="precioconiva" size="8">
</p>
<label for="label4"></label></td>
</tr>
<tr>
<th scope="row"><label for="label3"></label>
<label for="label4"><strong>IVA</strong></label>
<input name="iva" type="text" id="iva" value="21" size="4"> <label for="label5"></label></th>
<td><label for="label"><strong>Talle</strong></label>
<input name="talle" type="text" id="talle" size="4"></td>
<td><label for="label6"><strong>Color</strong></label>
<input name="color" type="text" id="color" size="10"></td>
</tr>
<tr>
<th scope="row"><label for="label5">Cantidad</label>
<input name="cantidad" type="text" id="cantidad" size="4"></th>
<td><label for="label4"></label></td>
<td>&nbsp;</td>
</tr>
</table>
<p>
<input type="submit" name="button" id="button" onClick="return ec();" value="ENVIAR DATOS"/>
<input type="reset" name="Submit2" value="CORREGIR DATOS"/>
</p>
</form>
<p align="left"><strong><font color="#FF0066" face="Courier New, Courier, monospace"><a href="http://www.telescopio.truefreehost.com/ropa/modasnancy.html">VOLVER AL MENU PRINCIPAL </a></font></strong></p>
<p align="left">&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
  #2 (permalink)  
Antiguo 12/04/2011, 10:14
Avatar de maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 8 meses
Puntos: 1532
Respuesta: php y mysql

1- revisa la ortografía, no se entiende algunas cosas que dices
2- edita el post, elimina los datos confidenciales y cambia la contraseña (después se quejan de que les hackean el sitio)
3- usa la herramienta del foro highlight para mostrar el código
4- revisa tu código y aplica estándares, de otra forma es difícil que el navegador lo interprete:

ERROR: <option value=Select a Option selected=selected>

BIEN: <option value="" selected="selected">Select a Option</option>
__________________
¡Por favor!: usa el highlight para mostrar código
El que busca, encuentra...
  #3 (permalink)  
Antiguo 12/04/2011, 10:45
 
Fecha de Ingreso: septiembre-2010
Mensajes: 14
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: php y mysql

Verdad que me equivoque al enviar tantos datos, pero no hay problemas...como puedo borrar la pregunta...

Etiquetas: mysql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:28.