No announcement yet.

PHP Variable in HTML enabled forum

  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Variable in HTML enabled forum

    I am trying to add this code into a post as the forum im posting in has HTML enabled.

    HTML Code:
    <form method=post action= enctype=application/x-www-form-urlencoded target=paypal>
    <input type=hidden name=cmd value=_cart /> 
    <input type=hidden name=item_name value=Donation from $bbuserinfo[username] /> 
    <input type=hidden name=item_number value=01 /> 
    Amount:<input type=text name=amount /> 
    <input type=hidden name=business [email protected] /> 
    <input type=hidden name=add value=1 /> 
    <input name=submit type=image src= alt=Make payments with PayPal - its fast, free, and secure! />
    But as you can see, im trying to get their username into the product description.
    I will do whatever to get this to work, be it plugin, or BBCode.

    Basically, I want to use the above code in a post that will result in a button and input field that someone can enter an amount and then click the button having the description say "Donation from Kelly" where Kelly is the username of the person, however $bbuserinfo[username] only works when used in template code.

    Is that clear, I know I ramble, any suggestions would be great.


  • #2
    Let me rephrase.

    How can I make a variable in any way so that when I type something along the lines of "$username" in a post anywhere, it will display the username of the person viewing it.


    • #3
      This requires custom coding. Try asking for help with this over at
      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
      Change CKEditor Colors to Match Style (for 4.1.4 and above)

      Steve Machol Photography

      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.