Algo me falla. Si pincho sobre [b], cuando el puntero se introduce en el textarea se quita el [b].
Y evidentemente, mysql no me la devuelve en negrita
Aqui os dejo los codigos a ver si me lo podeis revisar.
Gracias
Este es el form
Código:
<form action="publi.php" target="portada" method="post" />
<h2>Elija la fuente del texto</h2>
<div id="tipos">
<input type="button" name="texto" class="b" value="" />
<input type="button" name="texto" class="b" value="" />
<input type="button" name="texto" class="i" value="" />
<input type="button" name="texto" class="i" value="" />
</div>
<h2>Introduzca el texto que desee para su anuncio</h2>
<center><textarea rows="13" cols="13" name="texto" style="text-align:center">
</textarea></center>
<center><input type="submit" name="validar" value="Enviar" style="margin:20px 10px" /></center>
Y esta la de envio
Código:
<?
include ("conecta.php");
$texto = $_POST["texto"];
$texto = htmlentities($texto, ENT_QUOTES);
$texto = str_replace("","", $texto);
$texto = str_replace("","", $texto);
$texto = str_replace("","", $texto);
$texto = str_replace("","", $texto);
$intro = mysql_query("INSERT INTO anuncios (bloque)
values ('$texto')")or die("Error en tabla");
$intro = mysql_query ("SELECT * FROM anuncios ORDER BY id DESC LIMIT 1;") ;
if ($row = mysql_fetch_array($intro)){
echo "<div id='bloque'> \n";
echo "<table> \n";
echo "<tr> \n";
echo "<td class='a'>su bloque</td> \n";
do {
echo "<tr> \n";
echo "<td>".$row["bloque"]."</td> \n";
}
while ($row = mysql_fetch_array($intro));
echo "<table> \n";
echo "</table> \n";
echo "<div id='bloque'> \n";
}
else {
echo "¡ La base de datos está vacia !";
}
?>
Marcadores