I want a simple form textbox on hello.php that the user enters a code into and on button submit verify the textbox value is in a MySQL database. If it is... navigate to hello2.php with the value of the textbox in the url as name=

Example:

user enters in 1234 into the textbox verifies it is in the database...they navigate to /hello2.php?name=1234

user enters in 1235 which is not.....nothing happens

In addition when hello2.php is navigated to it first verifies that name=1234 is in the url before it shows.

If you want to check without leaving the page you're going to have to go with an Ajax solution. A solution like developerahusain is suggesting would work also and be a little easier. I want to point out that I mean one LIKE, but not necessarily the one offered. I make the distinction because the solution offered suggests the use of deprecated mysql_functions, and uses an implied form action instead of explicit that may not work as intended with all browsers. The spirit of the suggestion is a good one though, let the navigation happen, and then let your form processor determine where it lands, instead of trying to do it before the navigation which would require AJAX