Thanks laserlight.
Since I can't save that part, can I include some code that will check each variable for the existence of a '#' and if it's there, strip it and anything after it, leaving just the proper variable that's being passed?
For instance:
index.php?name=PNphpBB2&file=viewtopic&p=28341&highlight=inner#28341
looks like $_GET['highlight'] is going to return a value of 'inner#28341'
Can I include something in my code that will leave me with the proper var instead, which in this case is 'inner'?
Here's the code I've written so far before I realized I might have an issue with '#'
if(ISSET($_GET['name'])){
$module_name = substr($_GET['name'], 0, 20);
if($module_name == 'PNphpBB2'){
if(ISSET($_GET['file'])){
$file = substr($_GET['file'], 0, 10);
if($file == 'viewtopic'){
$i = 1;
// Old forum is being called. Forward to new topic.
if(ISSET($_GET['f'])){
//Forum ID has been passed.
$forum_id = substr($_GET['f'], 0, 3);
$f_url = 'f='.$forum_id;
$i++;
}else{
$f_url = '';
}
if(ISSET($_GET['t'])){
//Topic ID has been passed.
$topic_id = substr($_GET['t'], 0, 9);
if($i > 1){
$t_url = '&t='.$topic_id;
}else{
$t_url = 't='.$topic_id;
}
$i++;
}else{
$t_url = '';
}
if(ISSET($_GET['p'])){
//Post ID has been passed.
$post_id = substr($_GET['p'], 0, 9);
if($i > 1){
$p_url = '&p='.$post_id;
}else{
$p_url = 'p='.$post_id;
}
$i++;
}else{
$p_url = '';
}
if(ISSET($_GET['highlight'])){
//Highlight for search function.
$highlight = substr($_GET['highlight'], 0, 40);
if($i > 1){
$h_url = '&highlight='.$highlight;
}else{
$h_url = 'highlight='.$highlight;
}
$i++;
}
// Assembling the new URL.
$new_url = '/forum/viewtopic.php?'.$f_url.''.$t_url.''.$p_url.''.$h_url.'';
}
}
}