在网址中包含帖子ID

In one of my page templates for events there is a button that, when clicked, redirects that user to a form and carries over the information they filled out on the previous page. The action that creates the url structure for the redirect is:

action="<?php echo site_url('/booking/'); ?>"

How do I change this so that the post id for the event is included at the end of the url? eg www.mywebsite/booking/1234

Assuming you're in The Loop, you can just get the post ID:

action="<?php echo site_url( '/booking/' . get_the_ID() ); ?>"

You can try this:

action="<?php echo site_url('/booking/'); ?>/?id=yourid"