con esto recogo la info enviada
Cita:
<?php
$comment=$_GET[comment];
$user_id=$_COOKIE['loggedin'];
if($comment=='videos') {
$comment = utf8_encode($_POST['comment']);
$escaped_item = mysql_escape_string($comment);
$username = utf8_encode($_POST['username']);
$escaped_item_2 = mysql_escape_string($username);
$server = "localhost"; $database = "tablas"; $db_user = "root"; $db_pass = "x"; $table = "comentarios_videos";
mysql_connect($server, $db_user, $db_pass) or die (mysql_error());
mysql_select_db($database) or die (mysql_error());
$insert = mysql_query("insert into $table values ('NULL', '".$_POST['vid']."', '$escaped_item', '".$_POST['avatar']."', '$escaped_item_2', '$user_id' )") or die(mysql_error());
}
?>
$comment=$_GET[comment];
$user_id=$_COOKIE['loggedin'];
if($comment=='videos') {
$comment = utf8_encode($_POST['comment']);
$escaped_item = mysql_escape_string($comment);
$username = utf8_encode($_POST['username']);
$escaped_item_2 = mysql_escape_string($username);
$server = "localhost"; $database = "tablas"; $db_user = "root"; $db_pass = "x"; $table = "comentarios_videos";
mysql_connect($server, $db_user, $db_pass) or die (mysql_error());
mysql_select_db($database) or die (mysql_error());
$insert = mysql_query("insert into $table values ('NULL', '".$_POST['vid']."', '$escaped_item', '".$_POST['avatar']."', '$escaped_item_2', '$user_id' )") or die(mysql_error());
}
?>