Ayuda urgente Sobre PHP
Publicado por Hector Galindo (9 intervenciones) el 12/06/2012 17:35:46
Buenas,
estimados vengo aqui a pedir su ayuda ya que no se como solucionar esto.
Tengo un sistema de facturacion en php que estoy realizando, pero para generar la factura nesecito llenar un combobox con los datos de unas tablas, pero cuando quiero llenar los combobox no me funciona, e incluso el resto del formulario no se muestra.
aca les dejo mi codigo:
espero que porfavor me puedan ayudar.
estimados vengo aqui a pedir su ayuda ya que no se como solucionar esto.
Tengo un sistema de facturacion en php que estoy realizando, pero para generar la factura nesecito llenar un combobox con los datos de unas tablas, pero cuando quiero llenar los combobox no me funciona, e incluso el resto del formulario no se muestra.
aca les dejo mi codigo:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?php
//require ("verificar.php");
include("conectamysql.php");
$conexion=conectarse("ijzg","admin","grupoari");
$sql="select * from Facturacion";
$rs =mysqli_query($conexion,$sql);
$num=mysqli_num_rows($rs);
$dr =mysqli_fetch_array($rs);
if($num>0)
{
$cod=$dr["codigo"];
$cod= $cod + "1";
}
else
{
$cod="10000000";
}
$fecha=date("Y-m-d");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Generar Factura</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="Facturar.php">
<table width="381" height="327" border="0" align="center">
<tr>
<th colspan="2" scope="col"><img src="Grupo ARI.png" width="1209" height="367" /></th>
</tr>
<tr>
<th scope="row">Tasa De Cambio:</th>
<td><label>
<input type="text" name="tasa" id="tasa" />
</label> </td>
</tr>
<tr>
<th scope="row">Codigo Factura:</th>
<td><label>
<?php echo $cod; ?>
</label> </td>
</tr>
<tr>
<th scope="row">Fecha:</th>
<td><label>
<?php echo $fecha; ?>
</label> </td>
</tr>
<tr>
<th scope="row">Forma de Pago:</th>
<td><select name="tarea" id="tarea">
<?php
include("conectar.php");
$conexion=conectarse("ijzg","admin","grupoari");
$sql="select * from formas_pago ";
$rs=mysqli_query($conexion,$sql);
$resultado = mysql_query($rs);
if ($resultado)
while($renglon = mysql_fetch_array($resultado))
{
$valor=$renglon['forma'];
echo "<option value=".$valor.">".$valor."</option>\n";
}
mysql_close($conexion);
?>
</select></td>
</tr>
<tr>
<th scope="row">Banco:</th>
<td><label>
<select name="banco" id="banco">
<?php
include("conectamysql.php");
$conexion=conectarse("ijzg","admin","grupoari");
$sql="select * from bancos";
$rs =mysqli_query($conexion,$sql);
$resultado = mysql_query($rs);
if ($resultado)
while($renglon = mysql_fetch_array($resultado))
{
$valor=$renglon['banco'];
echo "<option value=".$valor.">".$valor."</option>\n";
}
mysql_close($conexion);
?>
</select>
</label></td>
</tr>
<tr>
<th scope="row">Numero de Referencia:</th>
<td><label>
<input type="text" name="treferencia" id="treferencia" />
</label></td>
</tr>
<tr>
<th scope="row">Vendedor:</th>
<td><label>
<select name="vendedor" id="vendedor">
<?php
include("conectamysql.php");
$conexion=conectarse("ijzg","admin","grupoari");
$sql="select * from vendedores";
$rs =mysqli_query($conexion,$sql);
$resultado = mysql_query($rs);
if ($resultado)
while($renglon = mysql_fetch_array($resultado))
{
$valor=$renglon['nombre'];
echo "<option value=".$valor.">".$valor."</option>\n";
}
mysql_close($conexion);
?>
</select>
</label> </td>
</tr>
<tr>
<th scope="row">Cliente:</th>
<td><label>
<select name="cliente" id="cliente">
<?php
include("conectamysql.php");
$conexion=conectarse("ijzg","admin","grupoari");
$sql="select * from clientes";
$rs =mysqli_query($conexion,$sql);
$resultado = mysql_query($rs);
if ($resultado)
while($renglon = mysql_fetch_array($resultado))
{
$valor=$renglon['empresa'];
echo "<option value=".$valor.">".$valor."</option>\n";
}
mysql_close($conexion);
?>
</select>
</label> </td>
</tr>
<tr>
<th scope="row">Producto:</th>
<td><label>
<select name="producto" id="producto">
<?php
include("conectamysql.php");
$conexion=conectarse("ijzg","admin","grupoari");
$sql="select * from inventario";
$rs =mysqli_query($conexion,$sql);
$resultado = mysql_query($rs);
if ($resultado)
while($renglon = mysql_fetch_array($resultado))
{
$valor=$renglon['producto'];
echo "<option value=".$valor.">".$valor."</option>\n";
}
mysql_close($conexion);
?>
</select>
</label> </td>
</tr>
<tr>
<th scope="row">Cantidad:</th>
<td><label>
<input type="text" name="tcantidad" id="tcantidad" />
</label> </td>
</tr>
<tr>
<th scope="row"> <label>
<input type="submit" name="button" id="button" value="Generar" />
</label> </th>
<td><label>
<input type="reset" name="button2" id="button2" value="Limpiar" />
</label> </td>
</tr>
</table>
</form>
</body>
</html>
espero que porfavor me puedan ayudar.
Valora esta pregunta


0