Hey i need some help Refreshing my memory with some PHP i have a form and that has 2 input box's lets say to keep it simple Name,Age and a sumit button basically when the submit button is hit i need it to check if the Name(Primary Key) exist if it dosent insert it and if it dose exist and update the infomation wondering if it will be kinda like below [code]<?php mysql_connect("localhost", "root", "####") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); $result = mysql_query("SELECT Name FROM testDB where Name = 'alcoholic1' ") or die(mysql_error()); if <> result.EOF then $result = mysql_query("UPDATE testD SET age='22' WHERE age='21'") or die(mysql_error()); else mysql_query("INSERT INTO testD (name, age) VALUES('Sandy Smith', '21' ) ") or die(mysql_error()); end if php?>[/code]