Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/01/2007, 01:24
Avatar de alllebor
alllebor
 
Fecha de Ingreso: septiembre-2006
Mensajes: 295
Antigüedad: 17 años, 7 meses
Puntos: 1
Re: Problema con BBcode, en un formulario

Bueno alli va el codigo.

Este es el formulario:

Código:
 <form  method="post" action="procesar.php" enctype="multipart/form-data" al>
            <table align="center" width="640" height="114">
                <tr>
                  <td width="73"><div align="right"><strong>Projecte</strong>:</div></td>
                  <td width="555"><input type="text" name="titulo" size="100" maxlength="255" /></td>
                </tr>
                <tr>
                  <td height="54"><div align="right"><strong>Descripci&oacute;:</strong></div></td>
                  <td><textarea id="cuerpo" name="cuerpo" cols="70" rows="5" ></textarea></td>
                </tr>
               
              </table>
              <div align="center">
                <p>
                  <input type="submit" name="accion" value="Insertar"/>
                </p>
              </div>
          </form>
Y este es el script donde procesa y guarda en la base de datos.
procesar.php

Código PHP:
<?php 
       
include('bbcode/bbcode.php'); 
       
mysql_connect("****","****","*****");
       
mysql_select_db("******"); 
       
$titulo=$_POST['titulo']; 
       
$cuerpo=bbcode($_POST['cuerpo']);
       
mysql_query("insert into actuales (titulo,cuerpo) values ('$titulo','$cuerpo')");   
       
header ("Location: ./actual.php");
       exit;        
?>
Si me puedes ayudar me harias un gran favor!Gracias!!