alphadeltaviii Posted February 26, 2008 Share Posted February 26, 2008 On my navigation, I have a form using radio buttons to indicate values ($action and $table). Trouble is, i am having trouble getting my redirect to work. I want it to redirect to $action.php?id=$table <?php $action = $_GET['action']; $table = $_GET['table']; $url = $action.php?id=$table header( "Location: http://hostname.com/$url") ; exit; ?> Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted February 26, 2008 Share Posted February 26, 2008 Tell me how that works for you <?php $action = $_GET['action']; $table = $_GET['table']; $url = $action.'.php?id='.$table; header( "Location: http://hostname.com/$url") ; exit; ?> (I don't know if header("Location: URL"); redirects I'm just patching whats obviously wrong to me) Quote Link to comment Share on other sites More sharing options...
alphadeltaviii Posted February 26, 2008 Author Share Posted February 26, 2008 Thanks, I got it working. One problem was I was using $_GET and not $_POST Quote Link to comment Share on other sites More sharing options...
unsider Posted February 26, 2008 Share Posted February 26, 2008 <?php $action = $_POST['action']; $table = $_POST['table']; $url = $action.php?id=$table header( "Location: http://hostname.com/$url") ; exit; ?> EDIT: Nevermind, you figured it out, and wow two mistakes in one thread, record Quote Link to comment Share on other sites More sharing options...
unsider Posted February 26, 2008 Share Posted February 26, 2008 Oops double. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.