Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // das die connect.php
- // <?php
- // MySQL connect information.
- // $c_username = "";
- // $c_password = "";
- // $c_host = "localhost";
- // $c_database = ""; // un so ne
- // Connect.
- // $connection = mysql_connect($c_host, $c_username, $c_password)
- // or die ("It seems this site's database isn't responding.");
- // mysql_select_db($c_database)
- // or die ("It seems this site's database isn't responding.");
- // ?>
- <?php
- $err=0;
- $regex='/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,4}$/';
- require_once("connect.php");
- function check($input,$msg){
- if ($input == '') {
- echo($msg);
- $err++;
- }
- }
- function escape($input){
- if( get_magic_quotes_gpc() ) {
- $input = stripslashes($input);
- }
- if ( !is_numeric($_POST[$input]) ) {
- $input = mysql_real_escape_string($input);
- }
- return $input;
- }
- check('search','Please enter a username!<br>'); // msq injection vereiteln
- $sql = mysql_query('SELECT Nachname,Vorname,Datum FROM kontakte WHERE Nachname = "' . $search . '" ORDER BY Datum DESC');
- while($row_lol = mysql_fetch_object($qry))
- {
- echo $row_lol->Vorname;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement