Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $pdo = new PDO('mysql:host=localhost;dbname=database', 'username', 'password');
- $ps = $pdo->prepare("SELECT * FROM wp_users WHERE user_login = ?");
- $ps->execute(array($_GET["user_login"]));
- $result = $ps->fetch(PDO::FETCH_ASSOC);
- /*extract($result);*/
- var_dump($result);
- include ("theme/header-main.html");
- $pdo = new PDO('mysql:host=localhost;dbname=database', 'username', 'password');
- $ps = $pdo->prepare("SELECT * FROM wp_users WHERE user_login = ?");
- if (!empty($_GET["user_login"])) {
- $ps->execute(array($_GET["user_login"]));
- } else {
- header('location: index.php');
- }
- $result = $ps->fetch(PDO::FETCH_ASSOC);
- if (is_array($result)) {
- extract($result);
- include('TESTuser-content.php');
- } else {
- include('user-content-search.php');
- }
- include ("theme/footer-main.html");
- $pdo = new PDO('mysql:host=localhost;dbname=database', 'username', 'password');
- $ps = $pdo->prepare("SELECT user_login FROM wp_users WHERE user_login = ?");
- $result = $ps->fetchall();
- <?php foreach($result as $row){echo $row[0]} ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement