470,815 Members | 1,136 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

Problems with script

Hi,

OK Bare with me.New to php and trying to figure this out

I trying to do the follwing. I have apage with a checkbox.. It posts to a
new page to allow a user to make a paypal order.

If the extension id say .com I want to display the relevant Paypla Add to
cart code for a .com extension etc.

Here is a a sample just to illustrate what Im trying to do. but its not
working.
The echos of the $domname and $key are really just to let me see what is
going on with the vars

reset($_POST);
while (list($key, $val) = each($_POST)) {
echo "$key => $val<br>";
if ($key == "com" or $key =="net") {
echo ("register $domname . $key<br>");}

else {
if ($key=="co_uk"){
echo ("register $domname . $key<br>");
echo ("<form target="paypal"
action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/sc-but-03.gif"
border="0" name="submit" alt="Make payments with PayPal - it's fast, free
and secure!">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="my*******@mydomain.com">
<input type="hidden" name="item_name" value="Domain Registration">
<input type="hidden" name="amount" value="12.95">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
</form>"); }
else {
$domname=$val;
echo ("domainname = $domname<br>"); }

}

}

--
Kev T
Jul 17 '05 #1
0 1220

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

55 posts views Thread by drhowarddrfine | last post: by
2 posts views Thread by robert.waters | last post: by
2 posts views Thread by Jeronimo Bertran | last post: by
10 posts views Thread by Danny | last post: by
2 posts views Thread by goodnamesalltaken | last post: by
3 posts views Thread by PCgeek | last post: by
10 posts views Thread by jodleren | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.