Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

placing html inside php code

Status
Not open for further replies.

PushCode

Programmer
Dec 17, 2003
573
US
I'm trying to edit a Mambo page to add a form button for PayPal purchases. I think I need to add the html inside the php code, but I'm not sure. What I have so far does not even show up. You'll also notice that I'm trying to use dynamic variables for the item_name, item_number, and amount fields. I'm not sure if that is correct either.

Any ideas as to what I'm doing wrong?

Here's the relevant code:

Code:
"<form action='[URL unfurl="true"]https://www.paypal.com/cgi-bin/webscr'[/URL] method='post'>";
   		"<input type='hidden' name='cmd' value='_xclick'>";
  		"<input type='hidden' name='business' value='test@test.com'>";
	  	"<input type='hidden' name='undefined_quantity' value='1'>";
	  	"<!-- edit value to change item_name -->";
	  	
		"<input type='hidden' name='item_name' value='" . $row->title . "'>";
	  	// edit value to change item_number 
	  	"<input type='hidden' name='item_number' value='" . $row->agid . "'>";
	  	// edit value to change price 
	  	"<input type='hidden' name='amount' value='" . $row->price . "'>";
	  	"<input type='hidden' name='no_shipping' value='1'>";
	  	"<input type='hidden' name='return' value='[URL unfurl="true"]http://www.test.com/paypal_pdt.php'>";[/URL]
	 	"<input type='hidden' name='cancel_return' value='[URL unfurl="true"]http://www.test.com'>";[/URL]
	  	"<input type='hidden' name='no_note' value='1'>";
	  	"<input type='hidden' name='currency_code' value='USD'>";
	  	"<input type='hidden' name='lc' value='US'>";
	  	"<input type='image' src='[URL unfurl="true"]https://www.paypal.com/en_US/i/btn/x-click-but23.gif'[/URL] border='0' name='submit' alt='Make payments with PayPal - it's fast, free and secure!'>";
	"</form>";
 
Thanks, that did it. I didn't think I needed the echo statement b/c it's not used on other parts of the page.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top