Jump to content

Redirect Help


alphadeltaviii

Recommended Posts

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;
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/92989-redirect-help/
Share on other sites

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)

Link to comment
https://forums.phpfreaks.com/topic/92989-redirect-help/#findComment-476425
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.