Jump to content


Member Since 20 May 2008
Offline Last Active Jun 26 2014 11:58 PM

Topics I've Started

controlling progress meter/bar

25 June 2014 - 05:25 PM

Hi. how can I control a progress meter/bar to display errors when it failed to reach 100% or on getting to a point?


.htaccess not working

19 May 2014 - 02:14 AM

Hi all.

I dont knw why I still can't get it right after many tries.
The .htaccess just can't locate the .bypassed file.

On my domain I created a folder called hidden in my web root and this is my authfile path:

but still no show. pls what am I missing here.

I even tried it on localhost:

same no show.

help pls.


Alert Help

02 July 2013 - 11:33 AM

firstly, I dunno if I should post here or in php, but my issue seems to Br intertwined. I have a jQuery newsletter form and I want to add PHP validation in it. My problem is I want a jQuery pop to show if the subscription is unsuccessful.

meanwhile I have a modal window I'd like to use it with, but the problem is how to call the script as all .


What could be wrong!

18 March 2013 - 01:48 AM

Hi all,

I am going bald on this one. :confused:

I wonder what could be wrong. I could login to my local server but cant login in a live server!


thanks all





// Define $myusername and $mypassword



// To protect MySQL injection

$username = stripslashes($username);

$password = stripslashes($password);

$username = mysql_real_escape_string($username);

$password = mysql_real_escape_string($password);

if($username == ''){

    echo  "<font color='red' size='-2'><b>Pls Enter User ID</b></font>";


if($password == ''){

    echo "<font color='red' size='-2'><b>Pls Enter Password</b></font>";


$crypt_pass = md5($password);

//check for existance of username and password

$sql="SELECT * FROM $tbl_name WHERE username='$username' and password='$crypt_pass'";


// Mysql_num_row is counting table row


// If result matched $myusername and $mypassword, table row must be 1 row



// Register username and password and redirect to login page"

$_SESSION['username'] = $username;

$_SESSION['password'] = $password;

header("location: ../folder/filename.php");



else {

//if no match found, echo out error message

echo "<font color='red' size='2'><b>Invalid User ID or Password</b></font><br>";

}    }




Reset Password can't login

23 February 2013 - 05:32 AM

Hi all,

Below is a code to reset forgoten password, but i do not know why i cannot login with the resetted password?

ps: echo $password is to get the echoed password so that i can login with it.



	$email = addslashes(htmlentities($_POST['email']));
	if($email == ''){
		echo "<font color='#990000'><b><center>Email field empty</center></b></font>";
	elseif(!filter_var($email, FILTER_VALIDATE_EMAIL)){
		echo "<font color='#990000'><b><center>Invalid email address</center></b></font>";
		$q = "SELECT * FROM reg_users WHERE email = '$email' AND username = '$_SESSION[uname]' AND Security_no = '$_SESSION[sec_no]'";
		$r = mysql_query($q);
		if(mysql_num_rows($r)== 1){

		// Generate a random password
		$password = "";
		$alpha = array_merge(range('a','z'), range('A','Z'), range(2,9));
		$rand_key = array_rand($alpha, 6);
		foreach ($rand_key as $curKey){
		$password .= $alpha[$curKey];
		echo $password;
		echo "<br><br>";
		$crypt_pass = md5($password);
		//update the user password
		$q = "UPDATE reg_users SET password = '$crypt_pass' WHERE email = '$email' AND Security_no = '$_SESSION[sec_no]'";
		$r = mysql_query ($q) or die('Cannot complete update');
		//send mail
		$to = "jamboree@yahoo.com"; //$_POST['email'];
		$from = "forgot@example.com";
		$subject = "New password";
		$msg = "You recently requested that we send you a new password for fredcom.com. Your new password is: $password.\n
				Please log in at this URL: http://localhost/login.html \n
				Then go to this address to change your password: http://localhost/changepass.php";
		$success = mail("$to","$subject","$msg","From: $from\r\nReply-To:webmaster@example.com");
			echo "Password have been sent to you email address";
			echo "<font color='#990000'><b>Sorry, no such record in our databsae</b></font>";



Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime