I have written a mysql database using PHP which uses a multi-field form to collect descriptive information about archaeological finds/features etc.

Some of the fields are text or medium text in length.

It is common when describing things to include references, which frequently now take the form of a url.

When entering the descriptive text is there a format where a url like:

http://www.arch.org/pdf/23432.pdf can be entered amongst the rest of the text so that without any intervention it will be displayed as a url link, when the record is displayed, or is it the case that the url would have to be saved in a dedicated field so that php code could load and display it correctly?

Thanks for you time


Because you want to display the URL differently, I'd suggest replacing the link before outputting it, after retrieving it from the database.

MySQL does not have a URL field type which might handle the HTML formatting. You could write a MySQL function which replaces all URL-like text with HTML code. But it's easier done in PHP.

Thanks for the info, I will have to try and find how it can be done using php.