SHARE
TWEET

Untitled

a guest Jul 21st, 2017 127 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div class="Container">
  2.             <table cellpadding ="2px" border="1px" width="100%">
  3.             <?php
  4.                 $Mysqlcon = mysql_connect("84.106.50.200", "Frank", "frank");
  5.                 mysql_select_db("frank");
  6.                
  7.                 $loggedin = false;
  8.                 if (isset($_COOKIE["u"]) && isset($_COOKIE["p"])){
  9.                     $query=mysql_query("SELECT ID FROM users WHERE Username = '" . $_COOKIE["u"] . "' AND Password = '" . $_COOKIE["p"] . "'");
  10.                    
  11.                     if (mysql_num_rows($query) == 1){
  12.                         $loggedin = true;
  13.                     }
  14.                 }
  15.                
  16.                 if ( isset ( $_POST['submit'] ) ) {
  17.                     if ( !empty( $_POST['name'] ) && !empty( $_POST['msg'] ) ){
  18.                         $user = mysql_real_escape_string(stripslashes(htmlspecialchars($_POST['name'])));
  19.                         $shout = mysql_real_escape_string(stripslashes(htmlspecialchars($_POST['msg'])));
  20.                        
  21.                        
  22.                         mysql_query("INSERT INTO shoutbox VALUES('', '" . $user . "', '" . $shout . "')") or die(mysql_error());
  23.                     }else{
  24.                         echo 'You didnt fill in your name and/or message';      
  25.                     }  
  26.                 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top