OK, coupla things:
1) Try to separate the HTML and the PHP - this is a bit of a headache to try and sift through.
2) WRT HTML - you're using deprecated tags à la 1990s.
I can't really see any problem here other than have you got a session_start in every page (is it in init.php?).
diafol
Keep Smiling
10,647 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,510
Skill Endorsements: 57
Not this this will fix your issue, but you should definately consider using a document type declaration just above the <html> opening tag. Without it, you are surely going to run into quirky issues since IE will go into quirks mode without a proper doctype.
Just start getting use to HTML5... it will require you to stop using some of the deprecated tags you have listed above, but it doesnt require you to use HTML5 elements.
<!DOCTYPE html>
<html>
...
sorry for a response that isnt related to the question, but again...you will come accross cross-browser compatibility issues eventually if you havent already.
JorgeM
Industrious Poster
4,017 posts since Dec 2011
Reputation Points: 294
Solved Threads: 546
Skill Endorsements: 115
Does anyone know what could be preventing this at HostGator?
Beats me.
diafol
Keep Smiling
10,647 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,510
Skill Endorsements: 57
I understand this post is solved with the new host, but there are some security concerns with your code that you should take care of.
<?php
include 'core/init.php';
protect_page();
not_admin_redirect();
$user_id = $_GET['user_id'];
mysql_query("UPDATE `users` SET `banned`= 1 WHERE `user_id` = $user_id");
header('Location: liste.php');
?>
The mysql query has the parameter $user_id which is not 'sanitized' before adding to the query.
Whenever you make an sql query, make sure you validate the datatype. The $user_id is probably an interger so you need to use $user_id = intval($_GET['user_id']);
If your variable is a string, then make sure you use mysql_real_escape_string($_GET['user_id']);
As your code is now, someone could do:
ban_user.php?user_id=(some sub sql query here)
That would execute another sql query of choice of the attacker.
The code also has a CSRF vulnerability.
https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)
digital-ether
Nearly a Posting Virtuoso
1,295 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
Skill Endorsements: 9