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['emails']) ){
- $conn = new PDO('mysql:host=localhost;dbname=www.professormode.com', 'faker', 'SG3wyi0SbGGz2&KLb');
- echo "Er werd iets gesubmit!";
- $statement = $conn->prepare("SELECT country FROM faker_users
- WHERE email='vandervort.lenore@crist.net'");
- $statement->execute();
- echo $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