converted from standard mysqli to mysqli prepared statements for security against sql injection
This commit is contained in:
@@ -61,9 +61,8 @@ function admin_article_view()
|
||||
</thead>
|
||||
<tbody>
|
||||
';
|
||||
$query = 'SELECT article_id, username, title, read_count, article.created_at, updated_at, published_at, excerpt FROM article INNER JOIN user ON article.author_id = user.user_id;';
|
||||
|
||||
$results = query_one_or_more_results($query);
|
||||
$conn = get_connection();
|
||||
$results = $conn->query('SELECT article_id, username, title, read_count, article.created_at, updated_at, published_at, excerpt FROM article INNER JOIN user ON article.author_id = user.user_id;');
|
||||
|
||||
foreach ($results as $key => $result) {
|
||||
$display .= '
|
||||
@@ -133,9 +132,8 @@ function admin_user_view()
|
||||
<th>Profile Picture</th>
|
||||
</tr>
|
||||
';
|
||||
$query = 'SELECT user_id, username, email, last_active, role, created_at, is_active, profile_picture FROM user INNER JOIN roles ON user.role_id = roles.role_id;';
|
||||
|
||||
$results = query_one_or_more_results($query);
|
||||
$conn = get_connection();
|
||||
$results = $conn->query('SELECT user_id, username, email, last_active, role, created_at, is_active, profile_picture FROM user INNER JOIN roles ON user.role_id = roles.role_id;');
|
||||
|
||||
foreach ($results as $key => $result) {
|
||||
$display .= '
|
||||
|
||||
Reference in New Issue
Block a user