使用$ _GET和Action进行Onclick重定向

I have 2 radio buttons, and each does an action and redirects to that action. But I need it to keep my current page (or week in this case) so it redirects to the correct page.

I think I'm not using the php syntax correctly inside of the onclick.

echo ' <input type="radio" ' . (($spreads == 'yes') ? ' checked="checked"' : '') . ' onclick="window.location=\'' . ((!empty($_GET['week'])) ? '?week=' . (int)$_GET['week'] : '') . '\'&action=spreads\'"/><label>Show</label>' . "
";

So it should get the week that the user is on, and redirect. So the URL would be something like: http://www.testsite.com/page.php?week=4?action=spreads

EDIT: I should have mentioned it was all inside of an echo to begin with.

EDIT 2: If i use a variable instead, it works just like I want it to. Very odd... I still would like to know how to use it without a variable. Works:

$week_number = ((!empty($_GET['week'])) ? '?week=' . (int)$_GET['week'] : '');

//radio button
echo ' <td><input class="radio" type="radio" id="Show" ' . (($spreads == 'yes') ? ' checked="checked"' : '') . ' value="Show" onclick="location.href=\''.$week_number.'&action=spreads\'"/><label class="choice" for="Show">Show</label>' . "
";

You concat url-params with & and it must be window.location instead of location.href. So your code should be the following:

value="Show" onclick="window.location=\'' . ((!empty($_GET['week'])) ? '?week=' . (int)$_GET['week'] : '') . '\'&action=spreads\'"/><label class="choice" for="Show">

And make sure to prepend the baseurl if you want to redirect to another url with given params.

EDIT

I've edited my code again, because it seems that you are missing the opening single-quote before the url. If this does not work too, please make sure to update your question with the full php echo for this specific line.