GlenR
GlenR

Reputation: 95

how to get mysql value into echod form?

im echoing a form for a paypal buy it now button.

In the amount hidden input i need to put

$info['price']

This is a mysql value

I have tried it like this

echo "<input type='hidden' name='amount' value='$info['price']'>";

But im now getting a blank screen.

Can anyone help?

Upvotes: 0

Views: 31

Answers (2)

Abhik Chakraborty
Abhik Chakraborty

Reputation: 44844

Try as

echo '<input type="hidden" name="amount" value="'.$info['price'].'">';

Hidden fields will not be shown so you may need to see the source code on browser to check if the values are properly getting set for the field.

Upvotes: 2

Keyur Mistry
Keyur Mistry

Reputation: 926

You must have to write as follows

echo "<input type='hidden' name='amount' value='".$info['price']."' />";

Upvotes: 1

Related Questions