Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- $db_host = 'localhost';
- $db_user = 'root';
- $db_pass = '';
- $db_name = 'job';
- if (isset($_GET['sql'])){
- $con = mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error());
- mysql_select_db($db_name, $con);
- mysql_query($sql) or die(mysql_error());
- }
- if (isset($_GET['id'])){
- $con = mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error());
- mysql_select_db($db_name, $con);
- $q = $_GET['id'];
- $sql = mysql_query('SELECT * FROM news WHERE id='.$q.' LIMIT 1') or die(mysql_error());
- $row = mysql_fetch_assoc($sql) or die(mysql_error());
- echo $row["id"];
- echo "<BR>";
- echo "<BR>";
- echo $row["title"];
- echo "<BR>";
- echo "<BR>";
- echo intval($row["content"]);
- echo "<BR>";
- echo "<BR>";
- echo $row["author"];
- echo "<BR>";
- echo "<BR>";
- echo $row["date"];
- }
- if (isset($_GET['text'])){
- echo $_GET['text'];
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement