Tengo un insert into que no me funciona y nose por que es le tengo asi
Código PHP:
<link href="../Css/estilo.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="jquery-1.2.1.pack.js"></script>
<script type="text/javascript">
function lookup(inputString) {
if(inputString.length == 0) {
// Hide the suggestion box.
$('#suggestions').hide();
} else {
$.post("rpc.php", {queryString: ""+inputString+""}, function(data){
if(data.length >0) {
$('#suggestions').show();
$('#autoSuggestionsList').html(data);
}
});
}
} // lookup
function fill(thisValue) {
$('#inputString').val(thisValue);
setTimeout("$('#suggestions').hide();", 200);
}
</script>
<style type="text/css">
body {
font-family: Helvetica;
font-size: 11px;
color: #000;
}
h3 {
margin: 0px;
padding: 0px;
}
.suggestionsBox {
position: relative;
left: 30px;
margin: 10px 0px 0px 0px;
width: 200px;
background-color: #212427;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border: 2px solid #000;
color: #fff;
}
.suggestionList {
margin: 0px;
padding: 0px;
}
.suggestionList li {
margin: 0px 0px 3px 0px;
padding: 3px;
cursor: pointer;
}
.suggestionList li:hover {
background-color: #659CD8;
}
</style>
<?php
include("header.php");
if (!isset($_SESSION['logueado_usuario'])) {
header("location: http://redsocial.net63.net");
}
else {
$nombre =$_SESSION['logueado_nombre'];
$id_usuario=$_SESSION['logueado_id'];
if($_POST['enviar'])
{
if(!empty($_POST['para']) && !empty($_POST['mensaje']))
{
$fecha = date("j/m/Y, g:i a");
include("config.php");
$resultados=mysql_query( "INSERT INTO privados (para,de,fecha,mensaje) VALUES ('".$_POST['para']."','".$_SESSION['logueado_nombre']."','".$fecha."','".$_POST['mensaje']."')", $conexion)or
die("Problemas en el select:".mysql_error());
echo "Mensaje enviado correctamente.";
}
}
?>
<form method="post" action="" >
<div align="center">
Para:
<br />
<input type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" />
<div class="suggestionsBox" id="suggestions" style="display: none;">
<img src="upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
<div class="suggestionList" id="autoSuggestionsList">
</div></div>
<br />Mensaje:<br />
<textarea name="mensaje"></textarea>
<br /><br />
<input type="submit" name="enviar" value="Enviar" />
<br />
</div>
</form>
<?php } ?>