hi, in the mysql we can fetch data and store them into variables, like the code below:

    if (mysql_num_rows($userquery) != 1) {
    die ("that member could not be found!");
    while($row = mysql_fetch_array ($userquery, MYSQL_ASSOC)){
        $first_name = $row['first_name'];
        $last_name = $row['last_name'];
        $email = $row['email'];
        $password = $row['password'];
        $sex = $row['sex'];
        $dbusername = $row['username'];
    }

but how can i do the same with pdo??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.