marcus Posted March 25, 2006 Share Posted March 25, 2006 I think this is a problem in my script.The login script can't seem to find the $connection= path.Where would I put this path?Or even, what goes after the = ?$connection=?what does it equal? Quote Link to comment Share on other sites More sharing options...
Hooker Posted March 25, 2006 Share Posted March 25, 2006 You'd have to show us the login system to help you with this :) $connection should be set by the script somewhere Quote Link to comment Share on other sites More sharing options...
marcus Posted March 25, 2006 Author Share Posted March 25, 2006 [code]<?php include("./inc/ryu786.php"); $connection = mysql_connect($host, $user, $password); [quote]$db = mysql_select_db($database, $connection);[/quote] $sql = "SELECT id FROM user WHERE user='$_POST[login]' AND pass='$_POST[pass]'"; $result = mysql_query($sql); $num = mysql_num_rows($result); if ($num > 0) { // ### USER AND PASSWORD ARE CORRECT $id = mysql_fetch_assoc($result); $ip = $REMOTE_ADDR; $sql = "INSERT INTO logip (userid, ip) VALUES ('$id[id]', '$ip')"; $result = mysql_query($sql); setcookie("auth", "yes"); setcookie("id", $id['id']); header("Location: main.php"); }else{ // ### USER OR PASSWORD IS INCORRECT header("Location: failed.php"); }?> [/code] Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted March 25, 2006 Share Posted March 25, 2006 can you post the exact error that you're getting? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.