Jump to content

Chris McGee

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Chris McGee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Does anyone know what this error means? Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/purseati/public_html/Connections/users.php on line 58 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/purseati/public_html/Connections/users.php on line 63
  2. <?php require_once('Connections/users.php'); ?> <?php $host="localhost"; $user="purseati_XJ5014"; $pass="mcgee87"; $db="purseati_userlogin"; $connection = mysql_connect($host,$user,$pass)or die ('Unable to connect'); mysql_select_db($db) or die ('Unable to select DB');?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } ?> <?php // *** Validate request to login to this site. if (!isset($_SESSION)) { session_start(); } $loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = $_GET['accesscheck']; } if (isset($_POST['usernameText'])) { $loginUsername=$_POST['usernameText']; $password=$_POST['passwordText']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "contact.html"; $MM_redirectLoginFailed = "home.html"; $MM_redirecttoReferrer = false; mysql_select_db($database_users, $users); $LoginRS__query=sprintf("SELECT username, password FROM users WHERE username=%s AND password=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); $LoginRS = mysql_query($LoginRS__query, $users) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = ""; //declare two session variables and assign them $_SESSION['MM_Username'] = $loginUsername; $_SESSION['MM_UserGroup'] = $loginStrGroup; if (isset($_SESSION['PrevUrl']) && false) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; } header("Location: " . $MM_redirectLoginSuccess ); } else { header("Location: ". $MM_redirectLoginFailed ); } } ?>
  3. When I put my username and password in the fields and then submit I get the fallowing error... Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/purseati/public_html/Connections/users.php on line 58 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/purseati/public_html/Connections/users.php on line 63 Does anyone know what to do?
  4. One last newbie question, Thank you so much for your help... Where does that script go?
  5. How do i go about fixing that issue?
  6. Got everything looking great for my login.php and this is what I get when I try logging in. Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/purseati/public_html/Connections/users.php on line 50 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'purseati'@'localhost' (using password: NO) in /home/purseati/public_html/Connections/users.php on line 8 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/purseati/public_html/Connections/users.php on line 8 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'purseati'@'localhost' (using password: NO) in /home/purseati/public_html/Connections/users.php on line 8 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/purseati/public_html/Connections/users.php on line 8 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/purseati/public_html/Connections/users.php on line 55 Access denied for user 'purseati'@'localhost' (using password: NO) Any ideas?
  7. I set that up, I now have a connections folder in the same root as the login.php Now one more quick question. What does the users.php contain? Do I need to create it?
  8. I'm working on a login page for my website, I have done everything required. When I go to the actual site this is what I find. Warning: require_once(Connections/users.php) [function.require-once]: failed to open stream: No such file or directory in /home/purseati/public_html/login.php on line 1 Fatal error: require_once() [function.require]: Failed opening required 'Connections/users.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/purseati/public_html/login.php on line 1 Does anyone know what is going on? Thank you for your time!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.