【发布时间】:2019-09-07 22:52:00
【问题描述】:
我有一个 paypal 按钮,点击它时我需要获取一些信息: 职位名称和名称。
我有这个名称的输入字段。
<span class="intestazione-form">Name*</span><br>
<input type="text" id="searchTxt" name="name" value="" size="40" class=" nome-input" placeholder="Insert your name">
然后是贝宝按钮。
<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>
这行得通,item_name 得到帖子的标题,我在 paypal transiction 的详细信息中看到它。
如何通过 the_title() 传递 item_name 的值中的名称; ???
【问题讨论】:
标签: php wordpress input paypal-buttons