I have a website for recruitment services. When people respond to a vacancy, the url of the vacancy is echo'd in the response form (hidden field) so I see on what vacancy they respond.
I use this code for it on the response button, it redirects to the response form:
vacature= $ url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];echo $url;
On the website the vacancies have links of the title, combined with the vacancy number: website_url/vacancy_title-number
For example: www.test.com/director-sales-120
In the response form I use this to get the info out of the url:
echo htmlspecialchars ($_GET['vacature']);
For the new crm system we bought, we need only the number, not the rest of the url. How do I get only the number out of the url? Or how do I only get the number into the url ;)
Thanks a lot in advance!
will print all numbers from the url
fetch number from string