-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprueba.php
102 lines (97 loc) · 3.17 KB
/
prueba.php
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
<!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>Untitled Document</title>
</head>
<body>
<?php
echo '<input name="idOculto" id = "idOculto" type="hidden" value="'.$_POST["idOculto"].'" />';
$conexion = mysql_connect("localhost", "u81329_bdt", "aB1234");
if ($conexion)
{
mysql_select_db("u81329_bdt", $conexion);
$queEmp = "SELECT * FROM servicios";
}
else
die(mysql_error());
echo '<table width="374" height="86" >
<tr>
<td height="30">Servicios que ofrece</td>
<td>Servicios que busca</td>
</tr>
<tr>
<td>
Servicio 1:';
echo '<select name="txtServ1" id="txtServ1">';
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
while ($rowEmp = mysql_fetch_assoc($resEmp))
echo '<option value= "'. $rowEmp["id"].'">'. $rowEmp["ofrece"].'</option>';
echo '</select>';
?>
<br />
<br />
Servicio 2:
<?
echo '<select name="txtServ2" id="txtServ2">';
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
while ($rowEmp = mysql_fetch_assoc($resEmp))
echo '<option value= "'. $rowEmp["id"].'">'. $rowEmp["ofrece"].'</option>';
echo '</select>';
?>
<br />
<br />
Servicio 3:
<?
echo '<select name="txtServ3" id="txtServ3">';
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
while ($rowEmp = mysql_fetch_assoc($resEmp))
echo '<option value= "'. $rowEmp["id"].'">'. $rowEmp["ofrece"].'</option>';
echo '</select>';
?>
<br />
<br />
Otro Servicio:
<input type="text" name="txtOServicio" id="txtOServicio" />
</td>
<td>Servicio 1:
<?
echo '<select name="txtServ4" id="txtServ4">';
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
while ($rowEmp = mysql_fetch_assoc($resEmp))
echo '<option value= "'. $rowEmp["id"].'">'. $rowEmp["ofrece"].'</option>';
echo '</select>';
?>
<br />
<br />
Servicio 2:
<?
echo '<select name="txtServ5" id="txtServ5">';
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
while ($rowEmp = mysql_fetch_assoc($resEmp))
echo '<option value= "'. $rowEmp["id"].'">'. $rowEmp["ofrece"].'</option>';
echo '</select>';
?>
<br />
<br />
Servicio 3:
<?
echo '<select name="txtServ6" id="txtServ6">';
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
while ($rowEmp = mysql_fetch_assoc($resEmp))
echo '<option value= "'. $rowEmp["id"].'">'. $rowEmp["ofrece"].'</option>';
echo '</select>';
?>
<br />
<br />
Otro Servicio:
<input type="text" name="txtOServicio2" id="txtOServicio2" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="cmdEnviar" id="cmdEnviar" value="Guardar Servicios" /></td>
</tr>
</table>
</form>
</body>
</html>