<?php
if(isset($_POST['submit'])){
$ad = $_POST['po'];
$rand = $userdata['users_id'].$ad;
$u = "INSERT INTO `user40727_chat`.`stena` (`ot`,`po`,`tex`,`rand`,`time`) VALUES ('" . $userdata['users_id'] . "','$_POST[po]','$_POST[stena]','".$rand."', '".time('dmYhis')."')";
mysql_query($u) or die(mysql_error($link));
header('Location: mass.php?id='.$ad);
}
?>