<form action="post.php" method="post">
<input type="text" name="text">
<input type="hidden" values="<? $user ?>">
<input type="submit" value="отправить">
$user_id = $_POST['user'];
$text = $_POST['text'];
$sql = "INSERT INTO table (user, text) VALUES ('$user_id', '$text')";
if (mysqli_query($link, $sql)) {
$url = 'http://site.ru';
$params = array(
'id' => '$user_id',
'text' => '$text'
);
$result = file_get_contents($url, false, stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($params)
)
)));
}