Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // WIJZIG ENKEL CODE IN HET PHP BLOCK
- // SQL CONNECTION DETAILS:
- // server: localhost
- // user: faker
- // password: SG3wyi0SbGGz2&KLb
- // database: www.professormode.com
- $country = "?";
- if( !empty($_POST) ){
- $email = $_POST['emails'];
- $conn = new PDO('mysql:host=localhost;dbname=www.professormode.com', 'faker', 'SG3wyi0SbGGz2&KLb');
- $statement = $conn->prepare("SELECT country FROM faker_users WHERE email = :emails");
- $statement->bindValue(":emails", $email);
- $result = $statement->execute();
- foreach($statement as $row){
- $country=$row['country'];
- }
- }
- ?>
- <!-- WIJZIG DE CODE HIERONDER NIET -->
- <form method="post" action="">
- <label for="emails">Select a person</label>
- <select name="emails" id="emails">
- <option value="">Select a person</option>
- <option value="vandervort.lenore@crist.net">vandervort.lenore@crist.net</option>
- </select>
- <button type="submit">Search country</button>
- </form>
- <h3>This person lives in
- <span id="country"><?php echo $country; ?></span>
- </h3>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement