Jump to content

joeizang

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

joeizang's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi guys, I have a question that I would like to hear your opinions on. I am thinking of migrating an applications authentication from mysql to LDAP as we are trying to achieve a single login senario as other things will also be included in the application later but what I want to know is how I can from PHP ensure for example that a user's login is against my LDAP server and based on that login create a session and allow him access in the application. And is it the same procedure if I was using Active Directory? Thanks for your response in advance. PHP rocks
  2. Hi guys, I am just stretching out with php and I am hoping to start making way. I have been following tutorials on phpro.org and I just finish one on the filter functions and I thought I should try it out. i wrote this code as a test to process my loginpage but nothing happens. Can anyone look at this code and tell me what's wrong? and finally how do you filter passwords if the password field can have any set of characters, I thought of using preg_match() to test the passwords. Thanks for your help guys <?php if(isset($_POST['login'])){ //$uname = filter_input($_POST['mgt_username'], FILTER_SANITIZE_SPECIAL_CHARS); //$passwd = filter_input($_POST['mgt_password']); $filters = array( "mgt_username" =>FILTER_SANITIZE_SPECIAL_CHARS, "mgt_password" =>FILTER_SANITIZE_SPECIAL_CHARS ); $cleanpost = filter_input_array(INPUT_POST, $filters); $username = $cleanpost['mgt_username']; $password = sha1($cleanpost['mgt_password']); echo($cleanpost['mgt_password']); } ?>
  3. Hi people, sorry but I have a strange problem here? I have two classes that handle all database operations on my test site and another that handles validation of all sorts. I made a login page and made a loginprocess.php script that calls the classes and processes user login. After ironing out several bugs and errors one error stands out. The loginprocess script always says that a general user i created called sa has been denied access to my database. return mysql_connect($this->host, $this->user, $this->password); now my question is this: is there something wrong with this line of code or is there any special way to create users in mysql. I used the GRANT ALL PRIVILEGES on the mysql command line. would like to rub minds with any one on this and see where it goes
  4. Hi folks, I am loving php but help me solve this problem. Every time I try to login and test I always get an error that there is something wrong with the mysql_connect line it returns a fatal error. <?php   class dbconect{       public $host;       public $user;       public $passwd;       public $db;             public function __construct(){             $this->host = "localhost";             $this->user = "sa";             $this->passwd = "123abc456";             $this->db = "prodigee";                         $conn = mysql_connect($this->host, $this->user, $this->passwd); //(this is the line it complains about)             mysql_select_db($this->db);       }       function selquery(){                         $uname = $_POST['username'];             $pwd = $_POST['password'];                   $result = mysql_query("SELECT * FROM staff WHERE username = '$uname' AND password = SHA1('$pwd')");             if(!$result){                   echo "There was an error while validating your credentials! Please try again";                   echo "<a href=".$_SERVER['PHP_SELF'].">Login Again</a> ";                   exit;             }else{                   session_start();                               }                               }   }           /**This class will handle all database related tasks. This file will then be reqired       in the main pages that will be interfaced by the user.   **/   ?> this is how I connect to it from the form //call database connection class so database can be checked.       $conn = new dbconect;       $conn->selquery($_POST['username'], $_POST['password']);       } pls let me know.
  5. Hi guys, i believe in forums and thanks for reading this and listening. I have a project i need to deliver to my company, they asked me to design a cyber cafe billing software using PHP/MYSQL/APACHE. Cos we want to move the workstations to linux so I was saddled with this task. The thing is I have been learning php for about 5 months now and I think I have hang of it but what do I do? there is so much to consider; security, database design you name it. Does anyone have any pointers [b]EDIT BY OBER: Not sure why you felt the need to put that at the top.[/b]
×
×
  • 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.