<form action="<?php echo 'https://dev.mitbtennis.com/register/1/' . get_current_user_id() . '/'; ?>" method="post">
One way to get custom PHP data into page content is by shortcode, which can be input into the editor. Another is by a custom page template.
Probably too pedantic, but here it goes: When the user clicks a form submit button, the form doesn’t “redirect” the user. The form simply submits a request directly to that URL. I know you meant the user is redirected from the current page, but that is not what a “redirect” is. When the request reaches the server, the requested file does not exist, so the request is rewritten to WP. In processing the request, WP might do further redirects. But the initial URL on your form is not considered a redirect.
Just sayin’ ??
]]><?php
global $wpdb;
get_currentuserinfo();
$current_user_id = get_current_user_id();
$todayA = date(“Y/m/d”);
$startB = date(‘2019/01/31’);
$endC = date(‘2019/03/17’);
if (($startB < $todayA) and ($todayA < $endC)) {
$Play = “Ready to Play”;
$url = “https://mitbtennis.com/2019/register2play/#/register2play/” . $current_user_id . “/32”;
$GoPlay = “submit”;
} elseif ($todayA < $startB)
{
$Play = “Coming Soon”;
$url = “https://mitbtennis.com/2019/”;
$GoPlay = “button”;
} else {
$Play = “Closed”;
$url = “https://mitbtennis.com/2019/”;
$GoPlay = “button”;
}
?>
<form action=”<?php echo $url; ?>” method = “post”>
<input type=”<?php echo $GoPlay; ?>” value=”<?php echo $Play; ?>”>
</form>