richrock Posted February 6, 2009 Share Posted February 6, 2009 Hi, I'm trying to figure out how to use this ajax checking to find out if a number exists : $getReceipts = "SELECT receipt_num FROM trans_receipts"; $resReceipts = mysql_query($getReceipts) or die('Receipt query failed: ' .mysql_error()); $row_receipts = mysql_fetch_array($resReceipts); $numbers = $row_receipts['receipt_num']; echo $row_receipts; //this varible contains the array of existing users $existing_users=array($numbers); //value got from the get metho $user_name=$_POST['newreceiptnumber']; But I always get a positive response, so I know it's something to do with the array. Bit of a n00b still with these, but I guarantee I'll learn from this. Anyway, I just need to get those $numbers to the array, the rest will work I'm sure... Link to comment https://forums.phpfreaks.com/topic/143997-mysql-row-into-array-for-ajax-checking/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.