html - symbol issue in php -
is there way convert symbol – in php
$payment_url = "https://www.paypal.com/cgi-bin/webscr"; $currencycode = get_option('wpoupon_currency'); $countrycode = get_option('wpoupon_country'); $paypalid = get_option('wpoupon_payment_email'); $notifylink = getpermalink('&mode=notifyurl&user_id='.$current_user->id,$itemid); $returnlink = getpermalink('&mode=returnurl',$itemid); $cancellink = getpermalink('&mode=cancel',$itemid); $form_custom = ''; $form_custom .= '<input type="hidden" name="cmd" value="_xclick">'; $form_custom .= '<input type="hidden" name="business" value="'. $paypalid .'">'; $form_custom .= '<input type="hidden" name="item_name" value="'. htmlspecialchars($itemname) .'">'; $form_custom .= '<input type="hidden" name="item_number" value="'. $itemid .'">'; $form_custom .= '<input type="hidden" name="amount" value="'. $itemprice .'">'; $form_custom .= '<input type="hidden" name="quantity" value="'. $quantity .'">'; $form_custom .= '<input type="hidden" name="currency_code" value="'. $currencycode .'">'; $form_custom .= '<input type="hidden" name="no_shipping" value="1">'; $form_custom .= '<input type="hidden" name="notify_url" value="'. $notifylink .'">'; $form_custom .= '<input type="hidden" name="cbt" value="return coupon!">'; $form_custom .= '<input type="hidden" name="return" value="'. $returnlink .'">'; $form_custom .= '<input type="hidden" name="rm" value="2">'; $form_custom .= '<input type="hidden" name="cancel_return" value="'. $cancellink .'">'; $form_custom .= '<input type="hidden" name="lc" value="'. $countrycode .'">'; $form_custom .= '<input type="hidden" name="bn" value="pp-buynowbf">'; echo '<form action="'. $payment_url .'" method="post" name="payment" id="payment">'. $form_custom .'</form>';
because when hidden value submitting paypal
charisma beauty – save 51% buy
is there way solve issue
so use
$form_custom .= '<input type="hidden" name="item_name" value="'. htmlspecialchars($itemname) .'">'; showing in paypal **"charisma beauty – save 51% buy now"**
use urlencode
before submitting data paypal.
$form_custom .= '<input type="hidden" name="item_name" value="'. urlencode($itemname) .'">';
Comments
Post a Comment