Forum Moderators: coopster
I'm using an AJAX script to load XHTML includes in to hidden layers that the user might request. However the script breaks. Upon further investigation Gecko reported the following URL error...
index.php?audio=2&connection=1?audio=2
Inside the XHTML includes used in the AJAX I execute PHP at the server which works just fine by default. However when someone initially visits my page they are required to make a choice which is passed through the URL as URI property/values.
Inside the XHTML AJAX includes I use the following code to make sure each prompt is dynamic to the page that requested it...
<a href="<?php echo $_SERVER['HTTP_REFERER'];?>?browserpatch=1" title="">Enable Browser Patching</a>
Because the referer already includes URI properties and values I need to strip away anything past the file extension. I tried base as so...
<a href="<?php echo basename($_SERVER['HTTP_REFERER']);?>?audio=0" title="">Disable Audio</a>
...though the URI property and values remain intact (as not desired) thus breaking the AJAX includes. How can I easily and quickly strip anything past the .php file extension? Is there something like base for this specifically?
- John