Page 1 of 1

Invisible Parse error

Posted: Tue Nov 19, 2002 4:06 pm
by matthiasone
I am getting a parse error that I am not seeing.

Here is the code

Code: Select all

<?

function cc_payment($form_vars)
&#123;
?>
  <table border="0" cellpadding="0" cellspacing="0">
	<tr>  
	  <td valign="top">  
		<table border="0" cellpadding="0" cellspacing="0">
		  <tr>	
		    <td colspan="2"><font size="2"><b>Client Info</b></font></td>
		  </tr>
		  <tr>	
		    <td width="10">&nbsp;</td>
			<td><font size="2"><?=$_SESSION&#1111;'client']&#1111;'cname']?></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2">Billing Address:<br><?=$_SESSION&#1111;'client']&#1111;'baddress']?></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2">
			    <?=$_SESSION&#1111;'client']&#1111;'bcity'].",".$_SESSION&#1111;'client']&#1111;'bstate']." ".$_SESSION&#1111;'client']&#1111;'bzip']?></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2">Shipping Address:<br><?=$_SESSION&#1111;'client']&#1111;'address']?></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2"><?=$_SESSION&#1111;'client']&#1111;'loc']?></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2"><?=$_SESSION&#1111;'client']&#1111;'phone']?></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2"><?=$_SESSION&#1111;'client']&#1111;'email']?></font></td>
		  </tr>
		</table>
	  </td>  
	  <td valign="top" width="20">&nbsp;</td>  
	  <td valign="top">  
		<table border="0" cellpadding="0" cellspacing="0">
		  <tr>	
		    <td colspan="2"><font size="2"><b>Payment Info</b></font></td>
		  </tr>
		  <tr>	
		    <td width="10">&nbsp;</td>
			<td><font size="2"><form method="post" action="staffpage.php?area=sales&view=ccrun">
			  CC Type:<select name="cctype"><option></option><option>VISA</option>
			  <option>MasterCard</option><option>Discover</option><option>Am Express</option></select></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2">Card Num:<input type="text" name="cardnum" size="15"></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2">Exp Date:<input type="text" name="expdate" size="7"></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td><font size="2">Amount:<input type="text" name="amount" size="7" value="<?=$form_vars&#1111;'amt']?>"></font></td>
		  </tr>
		  <tr>
		    <td width="10">&nbsp;</td>
		    <td align="right"><input type="submit" value="Send">
			  <input type="hidden" name="ttype" value="<?=$form_vars&#1111;'ttype']?>">
			  <input type="hidden" name="ptype" value="<?=$form_vars&#1111;'ptype']?>">
			  </form></td>
		  </tr>
		</table>
	  </td>
	</tr>
  </table>	    
<?
&#125;

function gateway_connection(form_vars)
&#123;
  $URL = "certification.authorize.net/gateway/transact.dll";
  $data = "x_Version=3.1&x_Delim_Data=True&x_Login=******&x_Password=******&x_Delim_Data=True&".
		  "x_Invoice_Num=".$_SESSION&#1111;'order']&#1111;'rid']."&x_Description=Manual Media Order&x_Method=CC&".
		  "x_Type=AUTH_CAPTURE&x_Cust_ID=".$_SESSION&#1111;'client']&#1111;'cid']."&x_First_Name=".
		  $_SESSION&#1111;'client']&#1111;'fname']."&x_Last_Name=".$_SESSION&#1111;'client']&#1111;'lname'].
		  "&x_Address=".$_SESSION&#1111;'client']&#1111;'baddress']."&x_City=".$_SESSION&#1111;'client']&#1111;'bcity'].
		  "&x_State=".$_SESSION&#1111;'client']&#1111;'bstate']."&x_Zip=".$_SESSION&#1111;'client']&#1111;'bzip'].
		  "&x_Phone=".$_SESSION&#1111;'client']&#1111;'phone']."&x_Email=".$_SESSION&#1111;'client']&#1111;'email'].
		  "&x_Ship_To_First_Name=".$_SESSION&#1111;'client']&#1111;'fname']."&x_Ship_To_Last_Name=".$_SESSION&#1111;'client']&#1111;'lname'].
		  "&x_Ship_To_Address=".$_SESSION&#1111;'client']&#1111;'saddress']."&x_Ship_To_City=".$_SESSION&#1111;'client']&#1111;'scity'].
		  "&x_Ship_To_State=".$_SESSION&#1111;'client']&#1111;'sstate']."&x_Ship_To_Zip=".$_SESSION&#1111;'client']&#1111;'szip'].
		  "&x_Card_Num=".$form_vars&#1111;'cardnum']."&x_Exp_Date=".$form_vars&#1111;'expdate']."&x_Amount=".$form_vars&#1111;'amount'];

  exec("/usr/local/bin/curl -m 120 -d "$data" https://$URL -L",$return_message_array, $return_number);

  for ($i = 0; $i < count($return_message_array); $i++) &#123;
    $results = $results.$return_message_array&#1111;$i];
  &#125;

  $res = explode(";",$results);

  if ($res&#1111;0]=="1") 
  &#123;
    add_trans($form_vars);
  &#125;
  else 
  &#123;
    $query = "SELECT * FROM responsecodes WHERE responsecode = ".$res&#1111;0]." AND reasoncode = ".$res&#1111;1];
    $result = query_db($query, "2");
    $code = mysql_fetch_array($result); 
    trans_form($code&#1111;'reasontext']);
  &#125;
&#125;
I get this error message
Parse error: parse error, unexpected T_STRING, expecting ')' in /usr/wwws/users/faog/staffpages/mediadb_cc_fns.php on line 82

which is the line that "function gateway_connection(form_vars)" is on.

See anything I am not

Posted: Tue Nov 19, 2002 4:22 pm
by volka
function gateway_connection($form_vars)
;)

Posted: Tue Nov 19, 2002 4:23 pm
by matthiasone
Okay so I need glasses......LOL

:oops: