<?php
$length = 6;
		$_string = ""; // start with a blank string
		$possible = "123456789bcdfghjkmnpqrstvwxyz"; // define possible characters
		$i = 0; // Counter
		// add random characters to $password until $length is reached
		while ($i < $length)
		{ 
			// pick a random character from the possible ones
			$char = substr($possible, mt_rand(0, strlen($possible)-1), 1);
			// we don't want this character if it's already in the password
			if (!strstr($_string, $char)) 
			{ 
			   $_string .= $char;
				$i++;
			}
		}
		$couponcode = $_string.$last_id; 
		echo $couponcode;
?>
