Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //if you want to require one of them
- if(trim($_REQUEST['username']) || $_REQUEST['date'] || $_REQUEST['employee'])
- {
- $dbhost = "localhost";
- $dbuser = "root";
- $dbpass = "p4ssw0rd";
- $dbname = "webcall";
- //Connect to MySQL Server
- mysql_connect($dbhost, $dbuser, $dbpass);
- //Select Database
- mysql_select_db($dbname) or die(mysql_error());
- // Retrieve data from Query String
- $where="";
- $query = "SELECT * FROM LS_webcall";
- if(trim($_REQUEST['username'])
- $where.= " and webcall_username='" . mysql_real_escape_string($_REQUEST['username']) ."' ");
- if(trim($_REQUEST['date'])
- $where.= " and `webcall_date='" . mysql_real_escape_string($_REQUEST['date']) ."' ");
- if(trim($_REQUEST['employee'])
- $where.= " and webcall_employee='" . mysql_real_escape_string($_REQUEST['employee']) ."' ");
- $query.= trim($where, ' and');
- $qry_result = mysql_query($query) or die(mysql_error());
- ////////////////BLAH
- }
- else
- die('submit something');
Add Comment
Please, Sign In to add comment