What I would like to do is have an area of my site where visitors can verify if a domain is registered through us.

So basically we would manually ad the website names to a text list and would like the script to check the list and if the website is on the list then it returns a message saying it is valid and if its not return a message stating it is not.

Any ideas on a simple way to go about this? If so please share.

Thank you.

When you say a text list, will this be a text file or a database?

If it is a text file, use fopen etc to read the contents of the file, split the contents of the file into an array (for example explode) then search the array with in array to see if the value exists.

If it is a database, simply search the database for the value.

That sounds good, could you please point me in the direction where I can learn to achieve this? I hate to admit it but Im in the beginning stages of learning php.

I prefer to use a txt file unless there is a specific reason why I should not.

On a low traffic site, files are an acceptable solution, although for larger amounts of data or if you get alot of simultaneous requests, a database will be faster (see this for pros/cons of each)

Take a look at the links in my last post as these explain the mentioned functions.

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.