Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="POST" action="broschuere_download.php">
- <label> E-Mail </label>
- <input type="text" <?php echo "name='email' value='$email' "?>/>
- <label> Passwort </label>
- <input type="text" <?php echo "name='password' value='$password' "?>/>
- <input class="button" type="submit" <?php echo "name='submit' value='Zur Broschüre' "?> style="margin-left: 140px; width: 276px;"/>
- </form>
- <?php
- // MySQL
- $dbhost = "host";
- $dbuser = "user";
- $dbpass = "pass";
- $dbname = "name";
- $email = $_POST["email"];
- $password = $_POST["password"];
- $verbindung = mysql_connect($dbhost,
- $dbuser,$dbpass);
- mysql_select_db($dbname)
- or die ("Die Datenbank existiert nicht.");
- $abfrage = "SELECT email, password FROM besco_passwords";
- $ergebnis = mysql_query($abfrage);
- while($row = mysql_fetch_object($ergebnis)){
- if ($email === "$row->email" && $password === "$row->password"){
- print "<h1 style='margin-bottom: 0px;'> Vielen Dank für Ihr Interesse! <br> Bitte klicken Sie hier zum Download der Broschüre! </h1><br> ";
- print "Download: Rechtsklick -> 'Ziel speichern unter'<br /><br />";
- print "<a href='http://www.test.de' target='_blank'> Broschüre </a>";
- }
- else{
- print "";
- }
- }//endwhile
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement