I have a paypal button and I need to get some information when it is clicked: Name and name of post.
I have this input field for the name.
<span class="intestazione-form">Name*</span><br>
<input type="text" id="searchTxt" name="name" value="" size="40" class=" nome-input" placeholder="Insert your name">
Then the paypal button.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="item_name" value="<?php echo the_title(); ?> ">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="xxxxxx" />
<input id="btnSubmit" class="btn" type="submit" value="DONA CON PAYPAL" type="image" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" disabled/>
img alt="" border="0" src="https://www.paypal.com/it_IT/i/scr/pixel.gif" width="1" height="1" />
</form>
This works, item_name get title of post and I see it in details of paypal transiction.
How pass the name in value of item_name with the_title(); ???