I am developing a PHP site, and have encountered the following problem. I have this line of code:
<div id="buynow"><?php echo $buynow; ?></div>
The variable $buynow has an html code (a paypal buy now button), and I would like to print/echo the html code that it gets processed.
With the current code, it prints the html code itself, not the desired result.
Thanks in advance
String:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXXXXXXXX">
<table>
<tr><td><input type="hidden" name="on0" value="Colors">Colors</td></tr><tr><td><select name="os0">
<option value="Black">Black </option>
<option value="White">White </option>
</select> </td></tr>
</table>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
Note: The value is replaced to XXXXXXXXX on purpose, in the code it is the original.