vosgien
03-08-2004, 11:25 AM
Hi,
I am not at all sure how to do this as my html knowledge is pretty thin. I am trying to set up a payment processor link and have been provided with some html code but I cannot work out how to convert my flash vars.
My file voucher.php looks like this :
<php?/* bunch of code to pull in variables from Flash
and create a few other variables such as $date & $random number
this all works well, details from flash are then written to a text file*/
//close php
?>
/*here a html doc is created with code to load in images, set the scroll bar properties and display text for the user, again like the php above absolutely no probs with any of that...........
above code is followed by this............*/
<form action="http://somesite.com/payments/select" method="post">
<input type="hidden" name="store" value="[storename]">
<input type="hidden" name="cname" value="GBP">
<input type="hidden" name="max" value="2">
<input type="hidden" name="code1" value="EXMPL">
<input type="hidden" name="desc1" value="Gift Voucher
<input type="hidden" name="cur1" value="GBP">
<input type="hidden" name="cost1" value="25.99">
<input type="hidden" name="qty1" value="1">
<center><input type="submit" value="NEXT"></center><br><br>
.... when the next button is clicked the above values will be sent to somesite.com
</BODY>
</HTML>
[PHP]
I should add that I am using send so that voucher.php opens in a browser window.
So question is how do a convert my flash variables to the values above - I am only really interestd in "cost1" at this stage, this comes into the php from Flash as $amount
Do I for instance ( in the php part of code) have something like
[PHP]$cost1 = $amount or something similar ???
On testing that doesn't seem to work, if I use echo it prints the variables on the html page - which is not what I want.
Can I use echo in the hidden input - like this;
[PHP]<input type="hidden" name="cost1" value= <?php echo $amount?>[PHP]
That really does not look right ( or good).... or is it OK ?
Any help appreciated
Cheers
Vosgien
p.s can make my entire file available if anyone has the time to look Ta !
p.p.s. I have also done a very thorough search here and at devshed, but cannot find what I need
I am not at all sure how to do this as my html knowledge is pretty thin. I am trying to set up a payment processor link and have been provided with some html code but I cannot work out how to convert my flash vars.
My file voucher.php looks like this :
<php?/* bunch of code to pull in variables from Flash
and create a few other variables such as $date & $random number
this all works well, details from flash are then written to a text file*/
//close php
?>
/*here a html doc is created with code to load in images, set the scroll bar properties and display text for the user, again like the php above absolutely no probs with any of that...........
above code is followed by this............*/
<form action="http://somesite.com/payments/select" method="post">
<input type="hidden" name="store" value="[storename]">
<input type="hidden" name="cname" value="GBP">
<input type="hidden" name="max" value="2">
<input type="hidden" name="code1" value="EXMPL">
<input type="hidden" name="desc1" value="Gift Voucher
<input type="hidden" name="cur1" value="GBP">
<input type="hidden" name="cost1" value="25.99">
<input type="hidden" name="qty1" value="1">
<center><input type="submit" value="NEXT"></center><br><br>
.... when the next button is clicked the above values will be sent to somesite.com
</BODY>
</HTML>
[PHP]
I should add that I am using send so that voucher.php opens in a browser window.
So question is how do a convert my flash variables to the values above - I am only really interestd in "cost1" at this stage, this comes into the php from Flash as $amount
Do I for instance ( in the php part of code) have something like
[PHP]$cost1 = $amount or something similar ???
On testing that doesn't seem to work, if I use echo it prints the variables on the html page - which is not what I want.
Can I use echo in the hidden input - like this;
[PHP]<input type="hidden" name="cost1" value= <?php echo $amount?>[PHP]
That really does not look right ( or good).... or is it OK ?
Any help appreciated
Cheers
Vosgien
p.s can make my entire file available if anyone has the time to look Ta !
p.p.s. I have also done a very thorough search here and at devshed, but cannot find what I need