friends i want to create a array which contain no of unique key , it also need store in mysql database , which i have done on my wamp server but when i m running this code on web server online i getting that my page will hangup .......so please help me....
code

$no_of_pin=$_POST['no_pin'];
	$pin_cost=$_POST['pin_cost'];
	if(($no_of_pin!=null) && ($pin_cost!=null))
	{
		for($a=0;$a<$no_of_pin;)
		{
			$pin=mt_rand(1000000,9999999999);
			$qry=$obj->ex_query("select pin_id from uapl_pin where pin_id=$pin")or die();
			if($qry==1)
			{
				$a--;
			}
			else
			{ 
				$qry=$obj->ex_query("insert into uapl_pin values($pin,$pin_cost,'unused','$date','')")or die();
				if($qry>0)
				{
				   $prt_pin[$a]=$pin;
				   $a++;
				}
			}
			
		}
	}
	else
	{
		$mgs="Please Enter The value First.";
	}

plase help its urgent live project

please help me its very urgentttttttttttt

please guys help me its really urgent.....

I think you has infinite loop iteration. echo your line 7 as

echo $pin=mt_rand(1000000,9999999999);

and check what happens?

your $qry in line 8 is always returns 1. that's why the iteration takes place and hanging up. Check that line

use
break;
after line no 11.
And check your output.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.