Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/10/2011, 11:33
tap
 
Fecha de Ingreso: mayo-2009
Mensajes: 58
Antigüedad: 15 años
Puntos: 5
y ahora, qué pasa con este código?

Hola chicos, nuevamente aquí por auxilio. Como os dije, soy novata y para rematar mi angustia estoy estudiando PHP pero... con un código algo añejo. AHora, estoy con PHP 5, creando un CMS manualmente, me pueden decir qué problema tiene el siguiente código (línea 12 y 19) acaso no es PHP5?
Código PHP:
<?php
include_once('db_fns.php');
include_once(
'header.html');

$handle db_connect();
$pages_sql "select * from pages order by code";
$pages_result $handle->query($pages_sql);

echo 
'<table border="0" width="400">';
while(
$pages $pages_result->fetch_assoc())
{
$story_sql "select * from stories where page='($pages['code'])' and published is not null order by published desc"//esta linea de da problemas
$story_result $handle->query($story_sql);

if (
$story_result->num_rows)
{
$story $story_result->fetch_assoc();
echo 
"<tr> <td>
<h2>($pages['description'])</h2> //aqui tambien da error
<p>($story['headline'])</p>
<p align='right' class='morelink'>
<a href="
page.php?page=($pages['code'])">
Leer mas ($pages['code'])...</a> </p></td>
<td width='100'>"
;
if (
$story['picture'])
{
echo 
'<img src="resize_image.php?image=';
echo 
urlencode($story[picture]);
echo 
'&max_width =80 &max_height=60" />';
}
echo 
'</td></tr>';

}
echo 
'</table>';
include_once(
'footer.php');
?>
Este es el error que me da: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\AppServ\www\51\index.php on line 12 y también me lo da en la línea 19,justamente donde se encapsula ($una variable[' ']) no entiendo por qué. Gracias