If statement to check $id with row idproblem
-
Hi I am trying to check the page user $id against the id of a row from the wordpress database and if they equal print first_name and family-name information.
The code I am trying to use is but I cannot seem to get it to work.
global $wpdb; $result = $wpdb->get_results( "SELECT * FROM wp_lb_person"); if (id == $id) { echo $row->first_name." ".$row->family_name; } else { echo 'Not Working'; }
Any advise or assistance would be appreciate.
This code is added to the page via shortcode
Regards
Warwick
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘If statement to check $id with row idproblem’ is closed to new replies.