Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'd like to have a custom registration confirmation page live within a WordPress site. I can provide a URL for this page to an external site. When the registration is successful the URL has several parameters, one of which is 'name' (which of course is a reserved word in WordPress) and a 404/page not found results.

The URL (get variables are coming from an external site, so I have no control over them) is something like:

http://example.com/registration-complete/?UID=K2PRL04LFYFNPY9&name=John&PIN=408446&conferenceUID=BYNMY9GILMCJWOBG&role=PARTICIPANT

What is the best way to handle such a situation? I'd like to be able to use the 'name' value in the page, so I don't want to just discard.

Thanks for any suggestions.

share|improve this question
1  
If it is a parameter in the query, then $_GET should work fine. –  Rutwick Gangurde Nov 16 '11 at 7:33
    
The page never loads (404) because 'name' is a reserved word in WordPress. For all the other terms $_GET will work fine. –  Sandbox Wizard Nov 16 '11 at 23:42
    
Can you control this URL? I guess you'll have to change name to something else. Here's a list of what terms are reserved in WP universe: codex.wordpress.org/Function_Reference/… Use anything apart from these! –  Rutwick Gangurde Nov 17 '11 at 3:28
    
As mentioned in the original post: "get variables are coming from an external site, so I have no control over them" –  Sandbox Wizard Nov 17 '11 at 7:05
add comment

1 Answer

up vote 1 down vote accepted

In case it's useful for someone else in this situation, I ended up creating a page outside WordPress which renames the 'name' parameter (to 'username') and then redirects to the page I originally wanted to hit.

My code for this external page is:

<?php
$data = array('UID' => $_GET['UID'],
    'username' => $_GET['name'],
    'ANI' => $_GET['ANI'],
    'PIN' => $_GET['PIN'],
    'conferenceUID' => $_GET['conferenceUID'],
    'role' => $_GET['role'],
    'email' => $_GET['email'],
    'notes' => $_GET['notes'],
    'custom2' => $_GET['custom2'],
    'custom1' => $_GET['custom1'],
    'inboundAccessID' => $_GET['inboundAccessID'],
    'time_created' => $_GET['time_created'],
    'callinNumber' => $_GET['callinNumber']);

header( 'Location: http://www.example.com/registration-complete/?'.http_build_query($data) ) ;
?>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.