Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('database.php');
- $ip = $_SERVER['REMOTE_ADDR'];
- $sortieren_nach = mysql_real_escape_string($_POST['sortieren_nach']);
- $enthaelt = mysql_real_escape_string($_POST['enthaelt']);
- $query = "SELECT * FROM tbl_angebote";
- if(strlen($enthaelt) >= 2)
- {
- $query = $query." WHERE `$sortieren_nach` LIKE '%$enthaelt%'";
- }
- if(strlen($sortieren_nach) >= 2)
- {
- $query = $query." ORDER BY '$sortieren_nach'";
- }
- $result = mysql_query($query);
- if($db)
- {
- if(mysql_num_rows($result) > 0)
- {
- while($row = mysql_fetch_row($result))
- { // for each row in results
- foreach($row as $key=>$value)
- {
- if($key == 1)
- {
- $result3 = mysql_query("SELECT Minecraftname FROM tbl_accounts WHERE User_ID = '$value';");
- echo(mysql_error());
- $row2 = mysql_fetch_array($result3);
- $value = $row2["Minecraftname"];
- }
- echo $value.":::";
- }
- echo";";
- }
- }
- else
- {
- echo "e3_error";
- }
- }
- else
- {
- echo "e2";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement