//First we set the url variable here
$url = 'website_url/website_name/generatebuynowbtn.php#id=65&num=1';
//We search for a match to grab the id value and the num
//value in the url variable above
preg_match('#\\#id=([0-9]+)\\&num=([0-9]+)#',$url,$variables);
//We assign the values to their own variables and
//make sure they are a number with int()
$url_id = intval($variables[1]);
$url_num = intval($variables[2]);
Currently it is locally on my server i.e. localhost though when/if i get it working it will be hosted somewhere.
I’ve tried REQUEST_URI but it only gets as far as /websitename/generatebuynowbtn.php without the variables I need. Javascript will pull it with location.href but I dont know if I can add this to a php variable …
I am using slideshowpro which is generating the #, this cannot be changed, if it was ? I would not have a problem getting the values in the first instance …
Any other suggestions?
If I used js to create a link with ? instead of # and pass this to the next page, i assume this would work but how could i make this seemless, is this the only way I could do it?
Thats because the # seemed to be required, otherwise ? would be a very simple solution that he would of tried already and from the ops recent post that is the case.