Hello,
I have a registration form where user fills out certain information, then data is written to mysql db when user hits continue. After hitting the continue button, user is taken to a a checkout page, where some variables are passed via session. Below is code for this page.
Some clients state that they are unable to proceed to paypal - have not gotten clear answers as to what the exact issue is but can someone take a look at the code and determine whether there are issues with the code:
<?php
session_start();
$bring_email=$SESSION['get_email'];
$bring_player1=$SESSION['get_fname1'];
$bring_player2=$SESSION['get_fname2'];
$bring_player3=$SESSION['get_fname3'];
$bring_player4=$SESSION['get_fname4'];
$bring_spons=$SESSION['get_spons'];
<tr>
<td colspan="2">You are registering the following Player(s):</td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style5"><strong>
<?php if ($bring_player1) echo ("$bring_player1");?>
</strong></div></td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style5"><strong>
<?php if ($bring_player2) echo ("$bring_player2");?>
</strong></div></td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style5"><strong>
<?php if ($bring_player3) echo ("$bring_player3");?>
</strong></div></td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style5"><strong>
<?php if ($bring_player4) echo ("$bring_player4");?>
</strong></div></td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style5"><strong><span class="style3">
<?php if ($bring_spons) echo "You are also sponsoring 1 team: $bring_spons ($160)"; ?>
</span></strong></div></td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style5">
<?php if($bring_player1)
$bring_player1=45;
if ($bring_player2)
$bring_player2=45;
if ($bring_player3)
$bring_player3=45;
if ($bring_player4)
$bring_player4=45;
if ($bring_spons)
$bring_spons=160;
$total=$bring_player1+ $bring_player2+ $bring_player3+ $bring_player4+ $bring_spons ;
?>
<span class="style16"> <strong>Grand total: $</strong> <?php echo $total ?></span> </div></td>
</tr>
<tr>
<td colspan="2"><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p align="center">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="bn" value="webassist.dreamweaver.4_0_1">
<input type="hidden" name="business" value="xxxx@comcast.net">
<input type="hidden" name="item_name" value="2007 Basketball, Family email: <?=$bring_email?> ">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="http://www.xxxxx.com">
<input type="hidden" name="cancel_return" value="http://www.xxxx.com">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="email" value="<?=$bring_email?>">
<input type="hidden" name="state" value="NJ">
<input type="hidden" name="amount" value="<?=$total?>">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="zip" value="07052">
<input type="hidden" name="city" value="Orange">
<input type="hidden" name="notify_url" value="http://www.xxxx.com">
<input type="hidden" name="receiver_email" value="xxx@comcast.net">
<input type="hidden" name="mrb" value="R-3WH47588B4505740X">
<input type="hidden" name="pal" value="ANNSXSLJLYR2A">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but6.gif" border="0" alt="Make payments with PayPal, it's fast, free, and secure!">
</p></form></td>
</tr>
<tr>
<td colspan="2"><div align="center"><img src="images/credit-cards-150x26.gif" width="150" height="26" align="middle"></div></td>
</tr>