Help with form post<

liunx

Guest
Hi,

I just installed an affiliate script which is primarily php. Everything
appears to be working fine except one item which I am having a problem
with. I can create html pages but have never done php pages or script.
So I hoping someone here might be able to help me.

I need to post the purchaser's email address to a php file (confirm.php)
which will then appear as the "Order ID" on the sales pages. What I have
set up is a confirmation page which the customer is redirected to after
they have gone to my merchant account page or PayPal and paid. On this
confirmation page he or she is asked to enter their email address and click
on "Confirm". This is supposed to post to the confirm.php, capture the three
varibles and redirect them to a thank you page.

This is the form that I have on the confirmation page:

<FORM METHOD=POST ACTION="http://www.mydomain.com/affiliates/confirm.php">
<input name="pro_product" type="hidden" value="default">
<input name="pro_order" type="hidden" value="email">
<input name="pro_amount" type="hidden" value="49.95">
</form>
(there is a submit button in the above form too)

I have tested it many times and everything works, the "default" and "49.95"
are posted to the sales page each time but the email address is not. The word
"email" appears in the sales page order ID each time but not the actual
email address. I have tried <$email> <?=$email;?> but thye don't work either.
As far as I can figure out is that the html form is static and
isn't able to load dynamic data as a small php form would.

Is there a way to add some php code to it to insure that it will post the
actual email address the customer enters and submits? I know it probably
may be something very simple but I am totally unfamiliar with the php scripting.
Thanks
Joe<FORM METHOD=POST ACTION="http://www.mydomain.com/affiliates/confirm.php">
<input name="pro_product" type="hidden" value="default">
<input name="pro_order" type="hidden" value="<?php echo $email;?>">
<input name="pro_amount" type="hidden" value="49.95">
</form>Hi Jokerman,
Thanks for the response. I tried the way you suggested with the
<input name="pro_order" type="hidden" value="<?php echo $email;?>">
but the Order ID comes out blank on the sales page. Also when I pull up the forms page and view the code, the
value is empty is shows just value="". I am missing something somewhere.

Thanks again
JoeOriginally posted by joier
Hi Jokerman,
Thanks for the response. I tried the way you suggested with the
<input name="pro_order" type="hidden" value="<?php echo $email;?>">
but the Order ID comes out blank on the sales page. Also when I pull up the forms page and view the code, the
value is empty is shows just value="". I am missing something somewhere.

Thanks again
Joe

Well, that should work... I'd assume the variable $email is empty.if $email is empty then it wont do anything. do you have just 1 email your trying to echo? an array of them?Originally posted by tommeh
if $email is empty then it wont do anything. do you have just 1 email your trying to echo? an array of them?
If it were an array it would have printed 'Array' so I think it's just an empty value.

-TimHi guys, thanks for the responses

The form requires only submission of a single email address. The complete form script is as follows:

<FORM METHOD=POST ACTION="http://www.mydomain.com/affiliates/confirm.php">
<input name="pro_product" type="hidden" value="default">
Email Address: <input name="pro_order" type="hidden" value="<?php echo $email;?>">
<INPUT TYPE=text name="email" size="30" maxlength="256">
<input name="pro_amount" type="hidden" value="49.95">
<INPUT TYPE="submit" value="Confirm">
</form>

I have tried it several times again and still it is not passing the email address to the sales page, just a blank.
Thanks
JoeDoes $email have a value at all? It can't guess the email of your visitor...


-TimHi Jokerman,
The form indicated above requires the purchaser to fill in their email address and click on the confirm button which in turn send the email address to the post address which it is my understanding passes it onto the sales page. As I indicated earlier, the other two items ("default" and "49.95") are being passed, they appear on the sales page, but where the email address is supposed to be it is blank. I assumed that the value of $email would be the email address as entered and submitted on the form.
Thanks
JoeOk, so it sounds as though you have 1 form that the user fills out, and then they get forwarded to this one that you are showing us?

If so, go look at the form that the user fills out. You should see something like this:
<input name="email" type="text" />
You are looking for what's in red.

Then, in this script, you can access that using $_POST['email'] (making sure that the 2 red areas match)

So the line would look like this:
Email Address: <input name="pro_order" type="hidden" value="<?php echo $_POST['email'];?>">


If I misunderstood what's happening, maybe try zipping up the few files that are involved, and attaching them to your next post?your problem may be in the first form - the one that takes the email address
ex:

<input type="text" name="email" size="15" maxlength="60">

it MUST be passed to the form as IS

<input type="hidden" name="email" value="<?php echo $_POST['email'] ?>">


If it is not passed from the first page with the EXACT name="" value - then what you will get on final submit is nothing - which is what you've got.

The problem is most likely in how the "email" is passed into your form.I assumed he had the $email set to post since he was trying to place a variable named $email into the document.

Yes, if you're not setting $email = $_POST['email']; above the line, do it like they're doing.
 
Back
Top