Hi; Please you Use this code... #write above query... $result=mysql_query($product_sql)or die(mysql_error()); $newid=mysql_insert_id(); echo "<script>location.href='upload_photos.php?m_id=$newid'</script>"; and get new insert Id in redirect page Using $id=$_GET['$m_id']; On Sat, Dec 20, 2008 at 12:56 PM, arvindsri123 <arvindsri123@xxxxxxxxx>wrote: > Hello All, > > I am inserting data in a table, its working fine, there is primary > key "m_id". > > after inserting data i m using redirect to go a another page, what i > want, when i am redirecting, i want url should be look like this (see > below)..but its not working...as I m not able to get "m_id" (A column > with primary key) value to pass it with url as i have shown.. > > echo'<script> location = > "upload_photos.php?m_id='.$_REQUEST['m_id'].'"; </script>'; > > Thanks, > Avi > > > -- "Dream is not that what you see in your sleep..Dream is the thing which do not allow you to sleep." Sincerely, Thanks and Regards, Rajesh Gupta, Software Developer/Software Engineer, SRM Techsol Pvt. Ltd., Lucknow-226024 (U.P.), INDIA Mob.+91-9792681468 Website: http://www.stpl.biz [Non-text portions of this message have been removed]