Skip to main content
edited body; edited title
Source Link
marc_s
  • 760.7k
  • 186
  • 1.4k
  • 1.5k

How do I fetch data from this colummcolumn in pdo?

I'm very new to PDO. The issue I'm currently facing is that I'm trying to grab a users first name from a colummcolumn however I have no idea how to fetch it properly. I've managed to find verify the user email with the email in the database now I just need to fetch the UserFirstName colummcolumn and store it in a variable.

$data = array();
 if(isset($_POST['email'])){
  $data = $_POST['email'];
        
        
            if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
                $data = $_POST['email'];
                
            $stmt = $pdo->prepare('SELECT * FROM users WHERE UserEmail = :UserEmail');
                $stmt->execute(array(':UserEmail' => $data));

How do I fetch data from this columm in pdo?

I'm very new to PDO. The issue I'm currently facing is that I'm trying to grab a users first name from a columm however I have no idea how to fetch it properly. I've managed to find verify the user email with the email in the database now I just need to fetch the UserFirstName columm and store it in a variable.

$data = array();
 if(isset($_POST['email'])){
  $data = $_POST['email'];
        
        
            if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
                $data = $_POST['email'];
                
            $stmt = $pdo->prepare('SELECT * FROM users WHERE UserEmail = :UserEmail');
                $stmt->execute(array(':UserEmail' => $data));

How do I fetch data from this column in pdo?

I'm very new to PDO. The issue I'm currently facing is that I'm trying to grab a users first name from a column however I have no idea how to fetch it properly. I've managed to find verify the user email with the email in the database now I just need to fetch the UserFirstName column and store it in a variable.

$data = array();
 if(isset($_POST['email'])){
  $data = $_POST['email'];
        
        
            if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
                $data = $_POST['email'];
                
            $stmt = $pdo->prepare('SELECT * FROM users WHERE UserEmail = :UserEmail');
                $stmt->execute(array(':UserEmail' => $data));
edited tag
Link
jmarkmurphy
  • 11.6k
  • 37
  • 62
Post Closed as "Duplicate" by Your Common Sense mysql
Source Link
jake
  • 3
  • 3
Loading