//get id from url //$man_id = $_GET['model']; $man_name=$_GET['man']; $error = ''; //$man_id='15'; if (preg_match("/([%\$#\*\=.\\\\(\)\?]+)/", $man_name)) { $error .= 'This has a special character'; $man_name = ''; } include ("includes/sanitizefxn.php"); stripslashes(sanitize($man_name)); // connect to db include_once ("includes/connectdb.php"); //connect to table $sql="SELECT printer_model.model_id, printer_make.make_name, printer_model.model_name, printer_pass.user_value, printer_pass.pass_value FROM printer_model JOIN printer_make ON printer_make.make_id = printer_model.make_id JOIN printer_pass ON printer_pass.model_id = printer_model.model_id WHERE printer_make.make_name='$man_name'"; $result=mysqli_query($c,$sql) or die(mysql_error()); if (mysqli_num_rows($result) We do not have any listings for this manufacturer.

"; } else { //create the display string $display_block = " "; while ($row=mysqli_fetch_array($result)) { $makename=$row["make_name"]; $modelid=$row["model_id"]; $modelname=$row["model_name"]; $user=$row["user_value"]; $pass=$row["pass_value"]; /*---------------- #http://www.printerpasswords.com/printer.php?make=NEC&model=IT3530 #The rewritten URL: #http://www.printerpasswords.com/password-NEC-IT3530.php --------------------*/ $display_block .= " "; } //close up the table $display_block .= "
MakeModelUsernamePassword
$man_name$modelname$user$pass
"; } ?> Default Printer passwords for echo $man_name;?> Printers
include_once ("includes/header.inc.php"); ?>

List of echo $man_name;?> Printer Passwords

echo $display_block; ?> include_once ("includes/footer.inc.php"); ?>