All pastes #537908 Raw Edit

edit

public text v1 · immutable
·published 2007-06-04 21:50 UTC
rendered paste body
<head>
</head>
<body>
<?php
$ligax=mysqli_connect('localhost','root');
if(!$ligax){
	echo '<p> Falha na ligao.';exit;
	}
mysqli_select_db($ligax,'musica');
$product_id=$_GET['id'];
$procura="select * from product where product_id='$id'";
$result=mysqli_query($ligax,$procura);
$nregisto=mysqli_num_rows($result);

?>
<table>
<?php
while ($registo=mysqli_fetch_assoc($result)){
?>
</table>
<html>
<body  text="#000000">
<form name="" action="alt_prod.php?&id=<? echo $_GET[id]?>" method="POST">
<table width="200" border="0">
<tr> 
	<td> Nome produto: </td>
	<td><input type="text" name="product_name" value="<?php echo $registo['product_name'];?>"</td>
</tr>
<tr> 
	<td> Referencia </td>
	<td><input type="text" name="product_ref" value="<?php echo $registo['product_ref'];?>"</td>
</tr>
<tr> 
	<td> Descrio: </td>
	<td><input type="text" name="product_desc" value="<?php echo $registo['product_desc'];?>"</td>
</tr>
<tr> 
	<td> Preo: </td>
	<td><input type="text" name="product_price" value="<?php echo $registo['product_price'];?>"</td>
</tr>
<tr> 
	<td> Iva: </td>
	<td><input type="text" name="product_vat" value="<?php echo $registo['product_vat'];?>"</td>
</tr>

<tr> 
	<td colspan=2> &nbsp;</td>
</tr>
<tr>
<td colspan=2>
<input type="hidden" name="product_id" value="<?php echo $product_id;?>">
<input type="submit" name="alterar" value="alterar">
<input type="submit" name="remover" value="remover">
</td>
</tr>
</table>
</form>

<?php
}
if ($ligax) mysqli_close($ligax);
?>
</body>
</head>
</html>