<?php
if(isset($_POST['btnSubmit']) and $_GET['action'] == "Add")
{
$Users->copyPostData();
$Users->_password(md5($_POST[password]));
$Users->_status(0);
$Users->_apikey(md5("ONE@:".$_POST[uname].":@STEP"));
$userNum = $Users->checkUserExist($Users->_username());
$userEmail = $Users->checkEmailExist($Users->_email());
if(($userNum == '0' || $userNum == '') && ($userEmail == '0' || $userEmail == '')) {
$randomVar = generateRandomNo(8);
$Users->_activationcode($randomVar);
my this line of code generate an API KEY and saves it in my database. my table name is USERS.. but the api key that this line of code generates is same for the all users…
i want the unique API key for all the users… can u please help?
$Users->_apikey(md5("ONE@:".$_POST[uname].":@STEP"));
You are creating the md5 of a string and the only reason its the same for all users is because the string is same for everyone.
check the content of
$_POST['uname']