Jump to content

nikes

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Everything posted by nikes

  1. i'm still getting the NULL NULL fatal error. What am i doing wrong?
  2. ok for example (this is the other part of the functions.php file ) i put var_dump($db) after global $db right? <?php function checkLogin ( $levels ) { session_start (); global $db; $kt = split ( ' ', $levels ); if ( ! $_SESSION['logged_in'] ) { $access = FALSE; if ( isset ( $_COOKIE['cookie_id'] ) ) {//if we have a cookie $query = 'SELECT * FROM ' . DBPREFIX . 'users WHERE ID = ' . $db->qstr ( $_COOKIE['cookie_id'] ); if ( $db->RecordCount ( $query ) == 1 ) {//only one user can match that query $row = $db->getRow ( $query ); //let's see if we pass the validation, no monkey business if ( $_COOKIE['authenticate'] == md5 ( getIP () . $row->Password . $_SERVER['USER_AGENT'] ) ) { //we set the sessions so we don't repeat this step over and over again $_SESSION['user_id'] = $row->ID; $_SESSION['logged_in'] = TRUE; //now we check the level access, we might not have the permission if ( in_array ( get_level_access ( $_SESSION['user_id'] ), $kt ) ) { //we do?! horray! $access = TRUE; } } } } } else { $access = FALSE; if ( in_array ( get_level_access ( $_SESSION['user_id'] ), $kt ) ) { $access = TRUE; } } if ( $access == FALSE ) { header ( "Location: " . REDIRECT_TO_LOGIN ); } } ?>
  3. Do var_dump($db) and see what it echoes. :-\Sorry I'm a beginner at this........ where do i do this at?
  4. this is line 76: $row = $db->getRow ( 'SELECT Level_access FROM ' . DBPREFIX . 'users WHERE ID = ' . $db->qstr ( $user_id ) ); and how do i check if $db is instantiated when this function is called.
  5. Fatal error: Call to a member function on a non-object in functions.php on line 76.. this is the part that has the line error: <?php function get_level_access ( $user_id ) { global $db; $row = $db->getRow ( 'SELECT Level_access FROM ' . DBPREFIX . 'users WHERE ID = ' . $db->qstr ( $user_id ) ); return $row->Level_access; } ?>
  6. I trying to do a full integration of phpbb3 into dolphin 6.1.4. I'm currently looking at some steps on how to do so. I'm stuck on this step: (instead of (users) it's (profiles)) How do i do this?
  7. Yes, i see the my.cnf file in the directory /etc/mysql/my.cnf
  8. in the error log it says "log file not found" and how do you find/edit the permissions on the sock file?
  9. Yes, i can connect from the command line. It shows every thing about the mysql. The socket that it's using is: UNIX socket: /var/run/mysqld/mysqld.sock
  10. my web hosting provider website is down...i will post the output when the site is back up. sorry... sounds like it's time for a new web hosting provider lol ok it's back up: here is the output: cannot connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  11. my web hosting provider website is down...i will post the output when the site is back up. sorry...
  12. <?php $host=""; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name //Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); ?>
  13. Well, I'm making a social networking site where users can chat with each other,etc.. and I'm using MySQL administrator on Ubuntu(to act as a server) to store registered users The problem is when i try to register for the site, it gives me this error message "cannot connect to server" What does this mean? i set up the config file with the $host, $username, $password, and $db_name.......what's wrong? Server information MySQL Version: MySQL 5.0.51a-3ubuntu5.4 Network Name: localhost and the client information: Version: MySQL Client Version 5.0.51 Operating System: Linux 2.6.24-23-generic Please help me!
  14. When i push register on the signup.php file, it gives me this: Not found your email in our databaseCannot send Confirmation link to your e-mail address What's wrong? ??? signup.php <head> <title>Noboredem::Registration</title> </head> <meta name="keywords" content="Social, chat, meet, friends, hangout, noboredem, fourm, profiles, teens, online networking" /> <meta name="description" content="Noboredem is a social networking website where you can make a profile, chat with friends, or make new friends!" /> <body> <div align="center"> <p align="center"><img src="http://graphamation.com/Noboredem/Noboredem%20logo%20regular.jpg" width="500" height="148" /></p> <p align="center"> </p> <p><h1 align="center">Register</h1> <table width="350" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><form name="form1" method="post" action="signup_ac.php"> <table width="100%" border="0" cellspacing="4" cellpadding="0"> <tr> <td width="76">username</td> <td width="3">:</td> <td width="305"><input name="username" type="text" id="name" size="30"></td> </tr> <tr> <td width="76">gender(type either male or female)</td> <td width="3">:</td> <td width="305"><input name="gender" type="text" id="gender" size="30" ></td> </tr> <tr> <td width="76">birthdate *MUST BE 14 YEARS-OLD OR OLDER(MM/DD/YYYY)</td> <td width="3">:</td> <td width="305"><input name="birthdate" type="text" id="birthdate" size="30" ></td> </tr> <tr> <td>E-mail</td> <td>:</td> <td><input name="email" type="text" id="email" size="30"></td> </tr> <tr> <td>password</td> <td>:</td> <td><input name="password" type="password" id="password" size="30"></td> </tr> <tr> <td>Country</td> <td>:</td> <td><input name="country" type="text" id="country" size="30"></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Reset" value="Reset"></td> </tr> </table> </form></td> </tr> </table> </body> signup_ac.php <?php include('config.php'); // table name $tbl_name="temp_members_db"; // Random confirmation code $confirm_code=md5(uniqid(rand())); // values sent from form $username=$_POST['username']; $email=$_POST['email']; $country=$_POST['country']; // Insert data into database $sql="INSERT INTO $tbl_temp_members_db(confirm_code, username, gender, birthdate, email, password, country)VALUES('$confirm_code', '$username', '$gender', '$birthdate, '$email', '$password', '$country')"; $result=mysql_query($sql); // if suceesfully inserted data into database, send confirmation link to email if($result){ // send e-mail to ... $to=$email; // Your subject $subject="Your confirmation link here"; // From $header="from: Noboredem <dontreply@noboredem.graphamation.com>"; // Your message $message="Your Comfirmation link \r\n"; $message.="Click on this link to activate your account \r\n"; $message.="http://www.noboredem.graphamation/confirmation.php?passkey=$confirm_code"; // send email $sentmail = mail($to,$subject,$message,$header); } // if not found else { echo "Not found your email in our database"; } // if your email succesfully sent if($sentmail){ echo "Your Confirmation link Has Been Sent To Your Email Address."; } else { echo "Cannot send Confirmation link to your e-mail address"; } ?>
  15. Every time i try to register for my site it says "Not found your email in our databaseCannot send Confirmation link to your e-mail" What's wrong? ??? hold on i will post the codes again
×
×
  • 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.