Error de Php
Publicado por Miguel Freytes (32 intervenciones) el 30/07/2016 23:00:16
Hola estoy creando una pagina para mi empresa pero me da este error: Parse error: syntax error, unexpected '"', expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /home/u590208430/public_html/mayorista/facturas.php on line 67 he intentado cambiando varias comillas y no resulta aqui el codigo, la linea 67 vendria siendo la 20
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
<section id="mayoristas">
<div class="contMayoristas">
<table align="center" border="0" cellpadding="2" cellspacing="2">
<thead><th colspan="1" rowspan="1" align="center">Número de Factura</th> <th colspan="1" rowspan="1" align="center">RIF</th><th width='150' colspan="1" rowspan="1" align="center">Fecha de Emisión</th><th width='150' colspan="1" rowspan="1" align="center">Concepto</th><th width='150' colspan="1" rowspan="1" align="center">Monto</th><th width='150' colspan="1" rowspan="1" align="center">Editar</th><th width='150' colspan="1" rowspan="1" align="center">Borrar</th></thead>
<?php
$id_usuario = $_SESSION[id_usuario];
include('../php/cn.php');
$consulta="SELECT usuarios.rif, facturas.numero, facturas.fecha, facturas.concepto, facturas.monto FROM usuarios, facturas WHERE facturas.id_empresa = $id_usuario";
$resultado=mysqli_query($conexion, $consulta);
while ($registro = mysqli_fetch_array($resultado)){
echo "
<tr>
<td width='150'>".$registro[numero]."</td>
<td width='150'>".$registro[rif]."</td>
<td width='150'>".$registro[fecha]."</td>
<td width='150'>".$registro[concepto]."</td>
<td width='150'>".$registro[monto]."</td>
<td width='150'><a href='editarFactura.php?id=$registro["facturas.id"]'>Editar</a></td>
<td width='150'><a href='facturas.php?id=$registro["facturas.id"]&idborrar=2'>Borrar</a></td></tr>";
}
?>
<?php
$numero = mysqli_num_rows($resultado);
extract($_GET);
if (@$idborrar==2){
$sqlborrar="DELETE FROM facturas where id='"facturas.id"'";
$resborrar = mysqli_query($conexion, $sqlborrar);
echo '<script>alert("Registro eliminado correctamente");</script>';
echo "<script>location.href='facturas.php'</script>";
}
?>
</div>
</section>
Valora esta pregunta


0