Foros del Web » Programando para Internet » PHP »

editar con fckeditor un registro

Estas en el tema de editar con fckeditor un registro en el foro de PHP en Foros del Web. Hola buena gente como andan, yo acá tratando de poder editar registro que inserte con fckeditor en mi formualrio hasta insertarlo no tuve problema alguno, ...
  #1 (permalink)  
Antiguo 06/06/2008, 10:16
 
Fecha de Ingreso: mayo-2004
Mensajes: 903
Antigüedad: 20 años
Puntos: 4
editar con fckeditor un registro

Hola buena gente como andan, yo acá tratando de poder editar registro que inserte con fckeditor en mi formualrio hasta insertarlo no tuve problema alguno, pero a la hora de mostrarlo con row['descripcion'] no logro hacerlo.


Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/marc/domains/domain/public_html/editar.php on line 151

Código HTML:
$oFCKeditor = new FCKeditor('descripcion');
$oFCKeditor->BasePath = "fckeditor/";
$oFCKeditor->Width = "600" ;
$oFCKeditor->Height = "500" ;
$oFCKeditor->Value = $row['descripcion'];
$oFCKeditor->Create() ;
Código PHP:
<?php
//recibimos la variable id enviada en el enlace por GET
$id=$_GET[id];
//hacemos las consultas
$result=mysql_query("select id,titulo,telefono,operacion,banos,habitaciones,ciudad,provincia,mtscuadrados,precioventa,
preciopesos,preciorenta,tipoinmueble,descripcion,fechaingreso,imagen,imagen1,imagen2 ,referencia from propiedades where id='$id'"
,$enlace);
//Una vez seleccionados los registros los mostramos para su edici&oacute;n
echo '<table height="320">';
include(
"fckeditor/fckeditor.php") ;
while(
$row=mysql_fetch_array($result)){

echo 
'<form action="edit.php" method="post"><input type="hidden" name="id" value="' .$row[id].'">
<tr bgcolor="#666666" height="24" >
<td width="176"><font color="#FFFFFF"><strong>TITULO</strong></font></td>
<td width="197"><font color="#FFFFFF"><strong>TELEFONO</strong></font></td>
<td width="235"><font color="#FFFFFF"><strong>OPERACION</strong></font></td>
</tr>
<tr>
<td height="46"><input type="text" size="15" name="titulo" value="'
.$row[titulo].'"></td>
<td><input type="text" size="15" name="telefono" value="'
.$row[telefono].'"></td>
<td><input type="text" size="25" name="operacion" value="'
.$row[operacion].'"></td>
</tr>
<tr bgcolor="#666666" height="24">
<td><font color="#FFFFFF"><strong>BA&Ntilde;OS</strong></font></td>
<td><font color="#FFFFFF"><strong>HABITACIONES</strong></font></td>
<td><font color="#FFFFFF"><strong>CIUDAD</strong></font></td>
</tr>
<tr>
<td height="46"><input type="text" size="15" name="banos" value="'
.$row[banos].'"></td>
<td><input type="text" size="25" name="habitaciones" value="'
.$row[habitaciones].'"></td>
<td><input type="text" size="15" name="ciudad" value="'
.$row[ciudad].'"></td>
</tr>
<tr bgcolor="#666666" height="24">
<td><font color="#FFFFFF"><strong>PROVINCIA</strong></font></td>
<td><font color="#FFFFFF"><strong>m2</strong></font></td>
<td><font color="#FFFFFF"><strong>PRECIO EN DOLARES</strong></font></td>
</tr>
<tr>
<td height="46"><input type="text" size="15" name="provincia" value="'
.$row[provincia].'"></td>
<td><input type="text" size="15" name="mtscuadrados" value="'
.$row[mtscuadrados].'"></td>
<td><input type="text" size="15" name="precioventa" value="'
.$row[precioventa].'"></td>
</tr>
<tr bgcolor="#666666" height="24">
<td><font color="#FFFFFF"><strong>PRECIO $</strong></font></td>
<td><font color="#FFFFFF"><strong>PRECIO ALQUILER</strong></font></td>
<td><font color="#FFFFFF"><strong>TIPO DE INMUEBLE</strong></font></td>
</tr>
<tr>
<td height="46"><input type="text" size="15" name="preciopesos" value="'
.$row[preciopesos].'">
</td>
<td><input type="text" size="15" name="preciorenta" value="'
.$row[preciorenta].'"></td>
<td><input type="text" size="15" name="tipoinmueble" value="'
.$row[tipoinmueble].'"></td>
</tr>
<tr bgcolor="#666666" height="24">
<td><font color="#FFFFFF"><strong>DESCRIPCION</strong></font></td>
<td><font color="#FFFFFF"><strong>FECHA DE INGRESO</strong></font></td>
<td><font color="#FFFFFF">&nbsp;</font></td>
</tr>
<tr>
<td height="46">

$oFCKeditor = new FCKeditor('
descripcion');
$oFCKeditor->BasePath = "fckeditor/";
$oFCKeditor->Width = "600" ;
$oFCKeditor->Height = "500" ;
$oFCKeditor->Value = $row['
descripcion'];
$oFCKeditor->Create() ;

</td>
<td><input type="text" size="15" name="fechaingreso" value="'
.$row[fechaingreso].'"></td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="#666666" height="24">
<td><font color="#FFFFFF"><strong>IMAGEN</strong></font></td>
<td><font color="#FFFFFF"><strong>IMAGEN 1</strong></font></td>
<td><font color="#FFFFFF"><strong>IMAGEN 2</strong></font></td>
</tr>
<tr>
<td height="46"><input type="text" size="15" name="imagen" value="'
.$row[imagen].'"></td>
<td><input type="text" size="25" name="imagen1" value="'
.$row[imagen1].'"></td>
<td><input type="text" size="15" name="imagen2" value="'
.$row[imagen2].'"></td>
</tr>
<tr bgcolor="#666666">
<td><strong><font color="#FFFFFF">REFERNCIA</font></strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="46"><input type="text" size="15" name="referencia" value="'
.$row[referencia].'"></td>
<td></td>
<td></td>
</tr>
</table>
<tr align="right"><td><input type="submit" value="Editar"></td> </tr>
</form>'
;
}
mysql_free_result($result);
mysql_close($enlace);
?>
  #2 (permalink)  
Antiguo 06/06/2008, 10:27
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: editar con fckeditor un registro

por favor... identifica la linea del error, y ponla si lo consideras necesario...

el resto del código es irrelevante
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 06/06/2008, 10:31
 
Fecha de Ingreso: mayo-2004
Mensajes: 903
Antigüedad: 20 años
Puntos: 4
Respuesta: editar con fckeditor un registro

linea 151

$oFCKeditor->BasePath = "fckeditor/";
  #4 (permalink)  
Antiguo 06/06/2008, 10:41
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: editar con fckeditor un registro

el error decía... error de sintaxis, T_STRING (cadena) inesperada.... se esperaba ',' o ';'

espero te ayude.... suerte!

- creo ya vi... estas tratando de inicializar el FCKEditor desde un echo ???
- piénsalo bien... debes inicializalo antes de ....y luego, pues lo imprimes

digo... por que el código se nota que esta ¡dentro del echo!
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #5 (permalink)  
Antiguo 06/06/2008, 11:16
 
Fecha de Ingreso: mayo-2004
Mensajes: 903
Antigüedad: 20 años
Puntos: 4
Respuesta: editar con fckeditor un registro

si ese es el problema tal cual esta en el echo , como me sugieres solucionarlo, hace dos días que trato y no lo logro hacerlo.
No olvides que en el echo tengo el while desde donde obtengo el row segun el id
  #6 (permalink)  
Antiguo 06/06/2008, 11:32
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: editar con fckeditor un registro

para empezar saca el código de inicialización del echo osea... sacalo de ahi!!

luego... antes del echo, pegas tal código.... antes de!

después, averigua el método de que FCKEditor NO imprima el editor... sino que te lo devuelva en una variable....

o, fracciona tu echo... y justo donde va el editor... (sin echo) activas el editor....

Código PHP:
echo "lo primero";

$oFCKeditor = new FCKeditor('descripcion');
$oFCKeditor->BasePath "fckeditor/";
$oFCKeditor->Width "600" ;
$oFCKeditor->Height "500" ;
$oFCKeditor->Value $row['descripcion'];
$oFCKeditor->Create() ;

echo 
"lo demas..."
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #7 (permalink)  
Antiguo 06/06/2008, 12:13
 
Fecha de Ingreso: mayo-2004
Mensajes: 903
Antigüedad: 20 años
Puntos: 4
Respuesta: editar con fckeditor un registro

Gracias tremenda ayuda me diste, me funciona perfecto ahora. Nuevamente mil gracias.
  #8 (permalink)  
Antiguo 06/06/2008, 12:14
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: editar con fckeditor un registro

[foo]

kaaaaaaarmaaaaaaaaa (xD)
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:40.