edita
tengo este codgo para editar unos campos pero me lansa error en el final
Parse error: syntax error, unexpected $end in c:AppServwwwedita2.php on line 40
<center>
<?php
$busqueda="SELECT * FROM emprtrans WHERE id ='$id'";
$resultado_b=mysql_query($busqueda);
if($row=mysql_fetch_row($resultado_b))
{
echo "
<form name=formulario method=post action='modifica_registro.php'>
<input type=hidden name='id' value='$id'>
<table border='0' width='769' cellpadding='0' cellspacing='1' >
<input type='HIDDEN' name='id' value='$row[0]' size='10' maxlength='10'>
<tr>
<td width='92' height='34'> NOMBRE EMPRESAs </td>
<td width='568' height='34'> <input type='text' name='nomempr' value='$row[2]' size='75' maxlength='50'></td>
</tr>
<tr>
<td width='92' height='34'> ROL PROP </td>
<td width='568' height='34'> <input type='text' name='rolprop' value='$row[3]' size='6' maxlength='25'></td>
</tr>
<tr>
<td width='92' height='34'>NOMBRE PROP</td>
<td width='568' height='34'> <input type='text' name='nomprop' size='5' maxlength='11' value='$row[4]'></td>
</tr>
<tr>
<td width='92' height='2'> PAIS</td>
<td width='568' height='2'> <input type='text' name='pais' size='23' maxlength='35' value='$row[5]'>
COD TRANSP <input type='text' name='codtransp' size='5' maxlength='11' value='$row[6]'>
COD EMPRESA <input type='text' name='codempresa' size='13' maxlength='11' value='$row[7]'>
<input type=submit value='Enviar >>'>
</td>
</tr>
</table>
</form>
";
?> </center>
</body>
</html>
Pusiste 茅sta condici贸n:
if($row=mysql_fetch_row($resultado_b))
{
echo.....
pero te falt贸 cerrarla..
}
SALUDOS!!!! ( jjaimevera )
if($row=mysql_fetch_row($resultado_b))
{
echo.....
pero te falt贸 cerrarla..
}
SALUDOS!!!! ( jjaimevera )
ok gracias ahora me resulta pero tengo error ahora cuando me llama al modificar
<html>
<body>
<table border="0" width ="100%">
<tr>
<td width="100%" bgcolor="#0066FF">
<p align="center"><font color="#FFFFFF" size="6" face="arial rounded mt bold"> MODIFICAR DI</font></td>
</tr></table>
<br>
<?php
$sql="update emprtrans nomempr='$nomempr', nomtransp ='$nomtransp' where id='$id'";
$sql=mysql_query($sql,$link);
$sql="update crt numcrt='$numcrt' where id='$id'";
$sql=mysql_query($sql,$link);
$sql="update item mezcla='$mezcla' ,merc='$merc' ,codaran='$codaran', cant_merc='$cant_merc' , kneto='$kneto'";
$sql=mysql_query($sql,$link);
if ($result)
{
echo "<font color = ffffff size =4> El registro ha sido modificado </font>n";
}
else
{
echo"<p> No se ha podido modificar </p>n";
exit;
}
mysql_close($link);
?>
</body>
</html>
<html>
<body>
<table border="0" width ="100%">
<tr>
<td width="100%" bgcolor="#0066FF">
<p align="center"><font color="#FFFFFF" size="6" face="arial rounded mt bold"> MODIFICAR DI</font></td>
</tr></table>
<br>
<?php
$sql="update emprtrans nomempr='$nomempr', nomtransp ='$nomtransp' where id='$id'";
$sql=mysql_query($sql,$link);
$sql="update crt numcrt='$numcrt' where id='$id'";
$sql=mysql_query($sql,$link);
$sql="update item mezcla='$mezcla' ,merc='$merc' ,codaran='$codaran', cant_merc='$cant_merc' , kneto='$kneto'";
$sql=mysql_query($sql,$link);
if ($result)
{
echo "<font color = ffffff size =4> El registro ha sido modificado </font>n";
}
else
{
echo"<p> No se ha podido modificar </p>n";
exit;
}
mysql_close($link);
?>
</body>
</html>