ok, ive wrote my website, but i have trouble with the users logging in, here is what i have in my 'connect.php'
Here is the home page:
http://www.disciplesofheaven.x10hosting.com/clanunx/index.php
You can log in using the User/Pass of Sample/test
You should get an error,
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/dohguild/public_html/clanunx/main.php on line 328
when it goes to the main.php, do i link the login button to connect.php
but on main.php it has a problem with the stats
I have the table setup in MySQL for it, included files:
add_hits.php
Set_hits.php
But how do i link it so that you can login correctly.
Ill give at least 200 points if someone can help me
Code:
<html>
<head>
<title>Logging In</title>
</head>
<?php
$connect = mysql_connect(“localhost”,”username”,”password”) or die(“Failed to connect to database“);
$db = mysql_select_db(“dohguild_clanunx”) or die(“Failed to connect to database“);
?>
</body>
</html>
Here is the home page:
http://www.disciplesofheaven.x10hosting.com/clanunx/index.php
You can log in using the User/Pass of Sample/test
You should get an error,
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/dohguild/public_html/clanunx/main.php on line 328
when it goes to the main.php, do i link the login button to connect.php
but on main.php it has a problem with the stats
Code:
<?php
Echo “Total Unique hits: $unique_hits_nr; <br>
Echo “Today’s Unique hits: “ $unique_hits_today_nr; <br>
Echo “Total hits: “ $total_hits_nr; <br>
Echo “Total hits today: “ $total_hits_today_nr; <br>
?>
I have the table setup in MySQL for it, included files:
add_hits.php
Code:
<html>
<head>
<title></title>
</head>
<?php
Include(“connect.php”);
$IP = $_SERVER[‘REMOTE_ADDR’];
$referer = $_SERVER[‘HTTP_REFERER’];
$time = time();
$date = date(“M, d, Y”);
$add_stats = mysql_query(“INSERT INTO stats(IP,referer,time,date) VALUES (‘$ip’, ‘$referer’, ‘$time’, ‘$date‘)”);
?>
</body>
</html>
Code:
<html>
<head>
<title></title>
</head>
<?php
Include(“connect.php”);
$date = date(“M, d, Y”);
$unique_hits_select = mysql_query(“SELECT DISTINCT ip FROM stats”);
$unique_hits_nr = mysql_num_rows($unique_hits_select);
$unique_hits_today_select = mysql_query(“SELECT DISTINCT ip FROM stats WHERE date = ‘$date’”);
$unique_hits_today_nr = mysql_num_rows($unique_hits_today_select);
$total_hits_select = mysql_query(“SELECT * FROM stats”);
$total_hits_nr = mysql_num_rows($total_hits_select);
$total_hits_today_select = mysql_query(“SELECT * FROM stats WHERE date = ‘$date’”);
$total_hits_today_nr = mysql_num_rows($total_hits_today_select);
?>
</body>
</html>
But how do i link it so that you can login correctly.
Ill give at least 200 points if someone can help me