This is not my area, but I’m sure that’s not what’s being said. The idea is to leave the code you posted as is but to then place the $post_url variable into the HTML inside an <a> element which also contains a target attribute of “_blank”.
Please clarify what your intentions are here.
You stated a desire to “open a link in a new window” but the code snippet you provided is a PHP function.
Are you interested in displaying the value this function RETURNS in a new window? Without seeing the entire function I cannot even guess what it does - nonetheless what it maybe returns.
Give us a little more detail and we can provide you a little more detailed assistance.
hmm, if you want open tab/window without user click its not allowed
but, if you want open tab/window if user click on your link or image then here
function form_paypal ($transaction_id, $paypal_email, $payment_amount, $currency, $payment_description=null, $direct_payment=false, $post_url=‘https://www.paypal.com/cgi-bin/webscr’)
// if you want link
echo “<a href=\”$post_url\" target=\“_blank\”>$paypal_email - $transaction_id</a>“;
// if you want link with image
echo “<a href=\”$post_url\” target=\“_blank\”><img src=\“your_image_link_here\”></a>";
(string) $display_output = null;
if u want, we can too show the link only if payment was success