Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Access-Control-Allow-Origin: http://myscripts.forumz.ro');
- $mysql = mysql_connect("mysql.hostinger.ro", "u719064522_bitcd", "5vEelfGVsC") or die(mysql_error());
- if(!$mysql)
- print("Conexiunea cu serverul a esuat !");
- $database = mysql_select_db("u719064522_stupd") or die(mysql_error());
- if(!$database)
- print("Conexiunea cu baza de date a esuat !");
- $date = date("d.m.Y - h:i");
- $date_db = date("Y-m-d h:i");
- $user_id = $_POST['user_link'];
- $user_name = $_POST['user_name'];
- $user_text = $_POST['content'];
- if(isset($_POST))
- {
- if(empty($user_text)) {
- echo "Toate rubricile formularului sunt obligatorii";
- } else {
- $data = "<strong>[". $date ."]</strong> [".$user_id."] ".$user_name." has update status !";
- echo $data;
- $query = "INSERT into `status_update` (`User`, `Status`, `Date`, `Coments`) VALUES ($user_id, $user_name, $date_db, $user_text)";
- mysql_query($query);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement