![]() |
Pull specific data from url string via php?? I have a form that I'm using to post to a php script that populates a MySql database. One of the form fields is a URL. I'd like to pull specific information from the URL string and use that info as a unique id in the database. Below you'll find an example of what I'm wanting to accomplish. The info I'd like to pull from the URL is in red font. It will be used as the unique product ID in the database. An example URL: Code: h**p://somesite.com/productcategory/111111-a-specific-name-for-the-productOf course, if those of you with more experience than I are of the opinion that I'm trying to re-invent the wheel here, then I'll surrender to your wisdom and just generate another product ID when populating the database. Thanks for the help, Gene |
Re: Pull specific data from url string via php?? Gene, As long as the URL format doesn't change, this will do it for you... PHP Code: To growth and success, Max Leadford |
Re: Pull specific data from url string via php?? Max, Excellent! Thanks for the time you spent on this. Take Care, Gene |
Re: Pull specific data from url string via php?? Gene, You're welcome. Good luck on your project! To growth and success, Max Leadford |
| All times are GMT -6. The time now is 05:33 PM. |