![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
27/01/2011, 14:41
|
| | Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 16 años Puntos: 1 | |
Respuesta: ayuda con php i formulario insert,update,delete soy novato en programación y en php espero que me podéis ayudar por favor
no me devuelve nada
<html>
<head><title>a</title></head>
<body>
<h3></h3>
<?php
$link = mysqli_connect("localhost","root","56565t","a");
$query = "SELECT a.a_id,a.a_descripcion,a.a_date,a.user_id,usuarios .user_id,usuarios.nivelusuario FROM usuarios INNER JOIN a ON usuarios.user_id = a.user_id WHERE usuarios.user_id='100'";
$result = mysqli_query($link, $query);
?>
<form action="select.php" method="post">
<input type="submit" value="insert_a">
</form>
<br/> <br/>
<table border=1>
<tr>
<th>a_name</th>
<th>a_date</th>
<th>a_upate</th>
<th>a_delete</th>
</tr>
<?php
/* associative array */
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){;
echo '<tr>';
echo '<td>'.$row['a_descripcion'].'</td>';
echo '<td>'.$row['a_date'].'</td>';
echo '<td><form action="select.php" method="post"><input type="submit" name="update_a" value="update_a" /></form></td>';
echo '<td><form action="select.php" method="post"><input type="submit" name="delete_a" value="delete_a" /></form></td>';
echo '</tr>';
}
?>
</table>
<?php
/* free result set */
mysqli_free_result($result);
/* close connection */
mysqli_close($link);
?>
<?
$select=$_POST['select_a'];
$insert=$_POST['insert_a'];
$update=$_POST['update_a'];
$delete=$_POST['delete_a'];
if(isset($insert)==true){
'<form action="select.php" method="post">
<input type="text" name="nombre" value="" />
</form>';
echo $insert;
}
elseif ($update==true){
}
elseif($delete==true){
}
else{
}
?>
Última edición por albertrc; 27/01/2011 a las 14:59 |