![]() | | ||||||||
| | #1 |
| Gene Yarbrough War Room Member Join Date: Oct 2005 Location: Northern Virginia
Posts: 558
Thanks: 31
Thanked 56 Times in 40 Posts
|
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-product Of 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 |
| | |
| | #2 |
| Active Warrior Join Date: Jul 2009 Location: Pennsylvania, US
Posts: 30
Thanks: 2
Thanked 12 Times in 10 Posts
|
Gene, As long as the URL format doesn't change, this will do it for you... PHP Code: To growth and success, Max Leadford |
|
Hit the Thanks in the lower right if you found this post useful. Thanks! ;-) Kiva.org - Help aspiring entrepreneurs by giving low sum loans. | |
| | |
| | #3 |
| Gene Yarbrough War Room Member Join Date: Oct 2005 Location: Northern Virginia
Posts: 558
Thanks: 31
Thanked 56 Times in 40 Posts
|
Max, Excellent! Thanks for the time you spent on this. Take Care, Gene |
| | |
| | #4 |
| Active Warrior Join Date: Jul 2009 Location: Pennsylvania, US
Posts: 30
Thanks: 2
Thanked 12 Times in 10 Posts
|
Gene, You're welcome. Good luck on your project! To growth and success, Max Leadford |
|
Hit the Thanks in the lower right if you found this post useful. Thanks! ;-) Kiva.org - Help aspiring entrepreneurs by giving low sum loans. | |
| | |
![]() |
|
| Tags |
| data, php, pull, specific, string, url |
| Thread Tools | |
| |
![]() |