I am new, new, new, new! I have a good understanding for html and can figure out certain things. But im new to scripts and php. I am trying to link a web form I've created to an online merchant account (YourPay.com). I was able to create the web form (based on "sample code" provided by YourPay's website). I also uploaded some .php files up to the webserver in the cgi-bin/ and the public_html/ dir. I had to modify the files to point to my "merchantstore" and their "linkpoint" server.
Unfortunately, since I lack the experience, I keep getting the following error:
"Parse error: syntax error, unexpected '%' in /home/edgelea/public_html/PHP_FORM_MAX.php on line 118"
This website is a favor for a kids horse camp and I'm doing this as a favor. The webform I created is a hodgepodge of code I found around the web and Im not sure if thats the reason why or if I am missing some basic parameters.
PLEASE HELP!
This is the code from the webform to the "PHP posting" form:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<form name="form1" method="post" action="PHP_FORM_MAX.php">
<title>Summer Camp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css"><!--
.style4 {font-size: 36px;
font-family: Arial, Helvetica, sans-serif;
}
body,td,th {
color: #03037b;
}
body {
background-color: #dedee0;
}
a:link {
color: #03037b;
}
.style6 {
font-size: 12px;
font-weight: bold;
}
.style7 {font-size: 10px}
.style8 {font-size: 14px; font-weight: bold; }
.style10 {
font-size: 16
}
--></style>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('RegisterButtonSMALLinvert.JPG')">
<p align="center"></p>
<div align="center">
<table height="727" width="857" border="0">
<tbody>
<tr>
<td valign="top" align="left" width="208" height="723">
<p> <img height="284" alt="Cartoon Horse" width="140" src="cartoon.horse.gif" /></p>
<p align="center"><strong>REGISTRATION OPTIONS</strong></p>
<ol>
<li>
<div align="left">Register & Pay Online by Credit Card</div><br />
</li>
<li>
</p></td></tr>
<tr>
<td align="right" height="24">
<p align="right"><strong>Billing Address:</strong></p></td>
<td>
<p align="left"><input name="ponumber" /></p></td></tr>
<tr>
<td align="right" height="24">
<p align="right"><strong>City:</strong></p></td>
<td>
<p align="left"><input name="taxexempt" /> </p></td></tr>
<tr>
<td align="right" height="24">
<p align="right"><strong>State:</strong></p></td>
<td>
<p align="left"><input name="terminaltype" /> </p></td></tr>
<tr>
<td align="right" height="24">
<p align="right"><strong>Zip:</strong></p></td>
<td>
<p align="left"><input name="ip" /> </p></td></tr>
<tr>
<div align="right"></div>
<th colspan="2">
<div align="center"><br />
<p>PAY ONLINE</p></div></th>
<div></div></tr>
<tr>
<td align="right" colspan="2">
<form name="myform" method="post" action="PHP_FORM_MAX.php">
<div align="right"><select name="mydropdown">
<option value="VISA" selected="selected">VISA</option>
<option value="Mastercard">Mastercard</option>
<option value="American Express">American Express</option>
<option value="Discover">Discover</option></select> </div></form></td></tr>
<tr>
<td align="right">
<p align="right"><strong>Card Number:</strong></p></td>
<td>
<p align="left"><input name="cardnumber" /></p></td></tr>
<tr>
<td align="right">
<p align="right"><strong>Month:</strong></p></td>
<td>
<p align="left"><input name="cardexpmonth" /></p></td></tr>
<tr>
<td align="right">
<p align="right"><strong>Year:</strong></p></td>
<td>
<p align="left"><input name="cardexpyear" /></p></td></tr>
<tr>
<td align="right">
<p align="right"><strong><a title="" href="/CVV-CVC%20code%20Definition%20and%20Examples.htm">3/4 Digit Code</a>:</strong></p></td>
<td>
<p align="left"><input name="cvmvalue" /></p></td></tr>
<tr>
<td align="right">
<div align="right"><input type="radio" value="$450 (Full Payment)" name="group1" /> </div></td>
<td colspan="2">
<div align="left">$450 (Full Payment)</div></td></tr>
<tr>
<td align="right">
<div align="right"><input type="radio" value="$250 (Non Refundable Deposit)" name="group1" /> </div></td>
<td colspan="2">
<div align="left">$250 <span class="style7">(Non Refundable Deposit)</span></div></td></tr>
<tr>
<td align="right">
<div align="right"><input type="radio" value="Online Registration" name="group1" /> </div></td>
<td colspan="2">
<div align="left">Register Online Only</span></div></td></tr></tbody></table></td>
<td valign="top" align="right" width="226">
<p> <strong><u><img title="" style="width: 212px; height: 242px" height="223" alt="" width="200" src="/logo_small.gif" /></u></strong></p>
<p align="center"><strong><u><br />
Camp Sessions</u></strong></p>
<p align="center">Monday through Friday continuously from 8:00 am to 2:30 pm:</p>
<ul>
<li>
<div align="left">Session 1: June 2-6, 2008</div></li>
<li>
<div align="left">Session 2: June 9-13, 2008</div></li>
<li>
<div align="left">Session 3: June 16-20, 2008</div></li>
<li>
<div align="left">Session 4: June 23-27, 2008</div></li></ul>
<p class="style6" align="center">Questions?<br />
<img height="70" alt="" width="47" src="questions.jpg" /></p>
<p class="style8" align="center"><u><a title="" </a></u></p>
<p class="style8 style10" align="center"> </p></td></tr></tbody></table>
<form method="post" action="PHP_FORM_MAX.php" _wpro_ACTION="PHP_FORM_MAX.php">
<form name="form1" action="PHP_FORM_MAX.php" method="post">
<table>
<tbody>
<tr>
<td align="middle" width="10"><input type="submit" value="Submit" /></td></tr></tbody></table>
<p> </p></form></div><a href="http://www.yourpay.com"><img height="54" alt="Payments processed via the YourPay Secure Payment Gateway, Powered By LinkPoint. Click for more information." width="155" border="0" src="https://www.yourpay.com/internalpages/images/yppoweredbylp_logo.gif" /></a>
</body>
</html>