Sending wordpress title-value across PHP-pages
Posted
by VoodooBurger
on Stack Overflow
See other posts from Stack Overflow
or by VoodooBurger
Published on 2010-03-22T14:42:15Z
Indexed on
2010/03/22
14:51 UTC
Read the original article
Hit count: 426
I recently made this wordpress blog, where you can sign up a team for an event, when clicking a link under the event post. This link takes you to a sign-up form on another php-page. The link is added in the loop of the events-template like this:
<?php query_posts('cat=8');?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<div id="tilmeldknap"><?php wp_list_pages("title_li=&depth=1&include=63"); ?></div>
<?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>...
So every upcoming event will have the same sign-up button. All I need now is to somehow send the specific event-post-title along to the sign-page, so that the following form-submit action will contain that title aswell. But since I'm not very good at php it seems like a mystery, altho I bet it's very simple!
I'm guessing it's something like:
$event=$_POST['single_post_title()']
But how to get the value to the next php-page I have no idea... please help, anyone :)
An eksample can be seen throught this link: http://gadebold.dk/events/ The link sais: 'Tilmeld Hold'
© Stack Overflow or respective owner