enZy enZy - 1 year ago 66
HTML Question

HTML coding help is needed

I would like to receive a bit of help as long as I'm stuck with Coding. My friend and I created a website, where you can bet on random things using real money currency. It also allows you to fill your balance, Similar website to PayPal, but our native, Georgian One named E-money.

<input type="text" placeholder="amount" id="amount" class="form-control">

That's the code, and here's the problem. Whenever you set an amount, for example 30 U.S Dollars, and hit "fill balance" button, it transfers you to your E-money account, but in sum, it doesn't show that you've chosen 30 U.S Dollars to transfer, it somehow Appears 0.00$. I personally think, that I should change id="amount" to something, so if someone's good enough and experienced. TY.

<div class="input-group">
<input type="text" placeholder="თანხა" id="amount" class="form-control">
<span class="input-group-btn">
<a href="https://www.emoney.ge/index.php/myaccount/sendmoney?&account=<?php echo $_conf['emoney_id'];?>&amount=&description=<?php echo $_USER['steam'];?>&details=">
<img src="../images/balansisshevseba.png" alt="We accept eMoney" border="0">

Answer Source

One solution is to use a form :

<form method="get" action="https://www.emoney.ge/index.php/myaccount/sendmoney.php">
  <img src="../images/balansisshevseba.png" alt="We accept eMoney" border="0"/>
  <input type="text" name="amount"      value="" placeholder="თანხა"/>
  <input type="text" name="account"     value="<?php echo $_conf['emoney_id'];?>" hidden/>
  <input type="text" name="description" value="<?php echo $_USER['steam'];?>" hidden/>
  <input type="text" name="details"     value="" hidden/>
  <input type="submit" value="Send money"/>

The form uses method "get", so the data is added to the URL (as you are doing). All the data fields have a name, so these names and their values will be added to the URL automatically.

Notice the fields account, description and details are "hidden", so user will not see them, but their data will be there in order to send it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download