Guest User

Untitled

a guest
Nov 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. $name = $_GET["Name"];
  3. $text = $_GET["text"];
  4. $today = getdate();
  5. $con = mysql_connect("localhost","root","");
  6. if (!$con)
  7.   {
  8.   die('Could not connect: ' . mysql_error());
  9.   }
  10. mysql_select_db("DB_Name", $con);
  11. mysql_query("INSERT INTO News(`name`,`text`,`date`) VALUES ('".$name."','".$text."','".$today."')");
  12. ?>
Add Comment
Please, Sign In to add comment