Ok on the login im getting this link:
http://habbishfm.com/user/User/login.php
and my DB ConfigCode:Parse error: syntax error, unexpected ':' in /home/habbish/public_html/user/User/login.php on line 8
Apparently andy says its your cpanel pass for the habbish_user part but it isisn't right and why am I getting that errorCode:<?php mysql_connect("localhost", "habbish_user", "*****") or die(mysql_error()); // connects to the mysql db or outputs an error mysql_select_db("habbish_user") or die(mysql_error()); // selects the database from the choosen serve or outputs an error ?>
ALSO here is the login.php
Code:<?php require_once "dbconfig.php"; // include the database information $sql = mysql_query("SELECT * FROM users WHERE username='".addslashes($_POST['username'])."'") or die("username was in correct. MySQL said".mysql_error()); // this checks to see if the username exists $result = mysql_fetch_array($sql); // puts the database information into an array if($result[’password’] == sha1($_POST[’password’])) { // if the passwords match session_start(); // start the session header(”Cache-control: private”); $_SESSION[”sessioname”] = $_POST[’username’]; header(”location: protected.php”); }else{ echo “Incorrect login details please try again.”; } ?>





Reply With Quote



