buenas, estoy tratando de hacer una pequeña aplicacion web que me permita registrar datos de un formulario y los guarde en una base de datos y me permita mostrarlos, he hecho casi todo con dreamweaver pero no logro que la informacion se guarde en la base de datos, y mucho menos que me la muestre, supongo que no debe estar enlazada la base de datos alguien me ayudaria un poco?
el codigo del registro:
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Resgistro De Productos</title>
<CENTER>
<p class="cen"><a href="Botones.html">Regresar a Pagina Principal</a></p>
</CENTER>
</head>
<body bgcolor="#FCF343">
<form name="form1" method="post" action="">
<label></label>
</form>
<br>
<CENTER>
<p><img src="banner.png" alt="" width="498" height="127" hspace="0" vspace="0"></p>
<CENTER>
<p>REGISTRO / DATOS GENERALES DEL PRODUCTO </p></CENTER>
</p></p></p></CENTER>
---------------------------------------------------------------------------------------------
<CENTER></p></p></p></CENTER>
<CENTER>Descripcion:
<input name="nombre" type="text" maxlength="50">
</p>
</CENTER>
<head>
<title></title>
<form method="POST" action="">
Cod Producto
:
<input name=codigo type="text" maxlength="50">
:
<select name="tipo">
<option>Electronico</option>
<option>No Electronico</option>
</select>
<input name="Enviar" type="submit" id="Enviar" value="Enviar">
</form>
---------------------------------------------------------------------------------------------
</body>
</html>
el codigo de consulta:
<?php virtual('/index/Connections/Conexion.php'); ?>
<?php
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_Conexion, $Conexion);
$query_Recordset1 = "SELECT producto";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $Conexion) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title> Cons Pro</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><Center>
<p class="cen"><a href="Botones.html">Regresar a Pagina Principal</a></p>
</head>
<body bgcolor="#FCF343">
<br />
<CENTER>
<p><img src="banner.png" width="498" height="127" alt=""></p>
<CENTER>
<p>DETALLES DE PRODUCTOS
</p>
</p>
</p>
</p>
</CENTER>
<p>---------------------------------------------------------------------------------------------
</p>
</p>
</p>
</p>
<title></title>
<form method="POST" action="">
<table width="478" border="1">
<tr>
<td width="17"> </td>
<td width="18"> </td>
<td width="18"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?php do { ?>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</form>
---------------------------------------------------------------------------------------------
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
el codigo del registro:
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Resgistro De Productos</title>
<CENTER>
<p class="cen"><a href="Botones.html">Regresar a Pagina Principal</a></p>
</CENTER>
</head>
<body bgcolor="#FCF343">
<form name="form1" method="post" action="">
<label></label>
</form>
<br>
<CENTER>
<p><img src="banner.png" alt="" width="498" height="127" hspace="0" vspace="0"></p>
<CENTER>
<p>REGISTRO / DATOS GENERALES DEL PRODUCTO </p></CENTER>
</p></p></p></CENTER>
---------------------------------------------------------------------------------------------
<CENTER></p></p></p></CENTER>
<CENTER>Descripcion:
<input name="nombre" type="text" maxlength="50">
</p>
</CENTER>
<head>
<title></title>
<form method="POST" action="">
Cod Producto
:
<input name=codigo type="text" maxlength="50">
:
<select name="tipo">
<option>Electronico</option>
<option>No Electronico</option>
</select>
<input name="Enviar" type="submit" id="Enviar" value="Enviar">
</form>
---------------------------------------------------------------------------------------------
</body>
</html>
el codigo de consulta:
<?php virtual('/index/Connections/Conexion.php'); ?>
<?php
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_Conexion, $Conexion);
$query_Recordset1 = "SELECT producto";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $Conexion) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title> Cons Pro</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><Center>
<p class="cen"><a href="Botones.html">Regresar a Pagina Principal</a></p>
</head>
<body bgcolor="#FCF343">
<br />
<CENTER>
<p><img src="banner.png" width="498" height="127" alt=""></p>
<CENTER>
<p>DETALLES DE PRODUCTOS
</p>
</p>
</p>
</p>
</CENTER>
<p>---------------------------------------------------------------------------------------------
</p>
</p>
</p>
</p>
<title></title>
<form method="POST" action="">
<table width="478" border="1">
<tr>
<td width="17"> </td>
<td width="18"> </td>
<td width="18"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?php do { ?>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</form>
---------------------------------------------------------------------------------------------
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>