Page 1 of 1
PHP forms no longer working
Posted: Mon Jan 11, 2010 12:15 pm
by BBalls
For years I've been using a simple php script to make forms that email me and the person filling out the form. But now the forms don't work anymore. The info entered into the fields don't pass from the first page to the confirmation page, and they don't get passed along to the emails.
Does anyone know why this would happen? The only thing I can think of is that either 1) the current php version doesn't support this form's language, or 2) something is amiss because my site was recently moved to another server for the first time in years.
I'm a photographer, not a programmer, so I hope I don't have to look for another script to modify. Hopefully it's a simple fix.
Here are two of my forms. One old one, and one I was just trying to put up when I noticed they weren't working:
https://www.caleventphoto.com/soccer08/order.php
https://www.caleventphoto.com/payments/payment.php
Thanks.
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:19 pm
by JNettles
Can you post the PHP script you're using on payment.php? Probably won't be able to help you unless I can see it.
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:31 pm
by BBalls
This is what is up above the first <html>. But a lot of it isn't used because I actually used the page from the first link as a template and didn't erase it. I'll post next the php from the old page because I know that one was working and everything is in it for a reason:
<?
// - First, we need to set few Variables to handle all the dirty work!
$SiteCompanyName = "Caleventphoto.com";
$SiteEmail = "
support@caleventphoto.com";
$SiteURL = "
http://www.caleventphoto.com";
$SitePhone = "(323)924-1800";
$SiteName = "CalEventPhoto.com";
$ThankYouMessage = "Your Order Confirmation from CalEventPhoto.com";
$SiteUserName = "Brandon E.";
$numF = $numA * 6;
$numG = $numB * 7;
$numO = $numP * 35;
$numH = $numC * 20;
$numI = $numD * 25;
$numJ = $numE * 35;
$numK = $numF + $numG + $numO + $numH + $numI + $numJ;
$numL = $numK * .08;
$numM = 2;
$numN = $numK + $numL + $numM;
// - That's it! That's All You Need To Do!!
?>
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:33 pm
by infolock
Along with what JNettles asked, i would also ask if if the files you wrote in the past relied upon GLOBALS being turned on for post data? If so, you may need to update your code use to the $_POST superglobal or turn on globals (but this is NOT recommended due to security concerns).
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:34 pm
by infolock
BBalls wrote:This is what is up above the first <html>. But a lot of it isn't used because I actually used the page from the first link as a template and didn't erase it. I'll post next the php from the old page because I know that one was working and everything is in it for a reason:
First off, you may not have shorttags enabled. They are disabled by default. Try checking your ini settings to verify.
Secondly, again, it seems to me as though you're using the post from with globals enabled. You may want to update the code to use the $_POST superglobal...
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:39 pm
by BBalls
Here's that whole order page at soccer08/order.php:
Code: Select all
<html>
<head>
<title>2008 Action Shots Order Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#333333" link="#000000" vlink="#000000" alink="#000000">
<div align="center">
<table width="907" border="0">
<tr>
<td width="402" height="9"> </td>
<td width="93" height="9"> </td>
<td width="372" height="9"> </td>
<td width="22" height="9"> </td>
</tr>
<tr>
<td width="402"><img src="../images/CEP-logo.gif" width="402" height="56"></td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
<tr>
<td width="402" height="56"> </td>
<td width="93" height="56"> </td>
<td width="372" height="56"> </td>
<td width="22" height="56"> </td>
</tr>
<tr>
<td width="402">
<div align="right"></div>
</td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
<tr>
<td width="402"> </td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
</table>
<table width="716" border="0">
<tr>
<td height="2" width="1"> </td>
<td height="2" colspan="4"> </td>
</tr>
<tr>
<td height="44" width="1"> </td>
<td height="44" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#333333">To
use this form simply fill in the file numbers of the images you want in
the space provided. For example: "<b><font color="#000000">Images:
G6_Johnson_F_8233, 8244, 8367, 8533, 8544</font></b>"--You get the
idea. Please don't forget to list the total quantity in the appropriate
space. If you are ordering a 5X7 Package , put a "1" in the
quantity box, unless you want more than one set of pictures.</font></td>
</tr>
<tr>
<td height="44" width="1"> </td>
<td height="44" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#333333">Shipping
is just <font color="#000000">$2</font> per order (not $2 per item).</font></td>
</tr>
<tr>
<td height="54" width="1"> </td>
<td height="54" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each
order is reviewed by hand before it is processed. You'll get an second
invoice in your email when the order has been approved and processed.</font></td>
</tr>
<tr>
<td height="44" width="1"> </td>
<td height="44" colspan="4"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#333333">If
you have any questions or comments just call <font color="#996600">(323)
924-1800</font>, or </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="mailto:support%5Bat%5Dcaleventphoto.com"><font color="#996600">email</font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#333333">.</font></td>
</tr>
<tr>
<td width="1"> </td>
<td width="482">
<div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Thanks,</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
</font></div>
</td>
<td width="2"> </td>
<td width="73"> </td>
<td width="136"> </td>
</tr>
<tr>
<td width="1"> </td>
<td colspan="2">
<div align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#996600">Brandon
</font></div>
</td>
<td width="73"> </td>
<td width="136"> </td>
</tr>
</table>
<table width="713" border="0" bgcolor="#666666">
<tr>
<td width="31" height="533"> </td>
<td width="630" height="533" bgcolor="#666666">
<div align="center">
<form action="order2.php" method="post">
<table width="100%" border="0">
<tr bgcolor="#666666">
<td align=right height="65" colspan="2">
<div align="center">
<table width="284" border="0" cellspacing="0" cellpadding="0" bgcolor="#666666">
<tr>
<td height="34" width="1"> </td>
<td height="34" bordercolor="#FFFFFF" width="275">
<div align="center"><font face="Verdana,Arial" size="1"><b><font color="#FFFFFF">2008
Soccer </font><font color="#CCCCCC"><font color="#FFFFFF"></font>
Action Shots Secure Order Form</font></b></font></div>
</td>
<td height="34" width="10"> </td>
</tr>
</table>
</div>
</td>
</tr>
<tr bgcolor="#666666">
<td align=right height="2" colspan="2" bordercolor="#666666"> </td>
</tr>
<tr bgcolor="#666666">
<td align=right height="46" colspan="2" bordercolor="#666666">
<div align="right"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font></div>
</td>
</tr>
<tr>
<td align=right height="37" colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<div align="center"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"><img src="5X7-logo.jpg" width="448" height="96"></font></div>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#CCCCCC">
<td align=right height="58" width="13%">
<div align="center"><font face="Verdana,Arial" size="1" color="#666666">
Quantity:
<input type="text" name="numB" size="7">
</font></div>
</td>
<td align=right height="58" width="87%">
<div align="left"><font color="#666666" size="1" face="Verdana, Arial, Helvetica, sans-serif">List
Image Numbers Here:</font><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
<font size="1">
<textarea name="Notes5x7" cols="58" wrap="VIRTUAL">Images:
Notes:</textarea>
</font></font></div>
</td>
</tr>
<tr bgcolor="#666666">
<td align=right height="48" colspan="2" bordercolor="#666666">
<div align="right"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font></div>
</td>
</tr>
<tr>
<td align=right height="37" colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<div align="center"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"><img src="5X7set-logo.jpg" width="448" height="96"></font></div>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#CCCCCC">
<td align=right height="58" width="13%">
<div align="center"><font face="Verdana,Arial" size="1" color="#666666">
Quantity:
<input type="text" name="numP" size="7">
</font></div>
</td>
<td align=right height="58" width="87%" valign="top">
<div align="left"><font color="#666666" size="1" face="Verdana, Arial, Helvetica, sans-serif">List
Image Numbers Here:</font><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
<font size="1">
<textarea name="Notes5x7pack" cols="58" wrap="VIRTUAL">Images:
Notes:</textarea>
</font></font></div>
</td>
</tr>
<tr bgcolor="#666666">
<td align=right height="48" colspan="2" bordercolor="#666666"> </td>
</tr>
<tr bgcolor="#666666">
<td align=right width="13%" height="85" bordercolor="#666666"> </td>
<td width="87%" height="85" bordercolor="#666666">
<div align="left"> <font face="Verdana,Arial" size="1" color="#FFFFFF">
<input type="submit" value="Continue To Page 2..." name="submit">
</font></div>
</td>
</tr>
</table>
</form>
</div>
</td>
<td width="38" height="533"> </td>
</tr>
<tr>
<td width="31" height="2"> </td>
<td width="630" height="2"> </td>
<td width="38" height="2"> </td>
</tr>
</table>
<table width="906" border="0">
<tr>
<td><img src="../images/CEP-copyright.gif" width="271" height="15"></td>
<td> </td>
</tr>
</table>
<p> </p>
</div>
</body>
</html>
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:40 pm
by BBalls
Here's the page it goes to:
Code: Select all
<html>
<head>
<title>2008 Action Shots Order Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#333333" link="#000000" vlink="#000000" alink="#000000">
<div align="center">
<table width="907" border="0">
<tr>
<td width="402" height="9"> </td>
<td width="93" height="9"> </td>
<td width="372" height="9"> </td>
<td width="22" height="9"> </td>
</tr>
<tr>
<td width="402"><img src="../images/CEP-logo.gif" width="402" height="56"></td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
<tr>
<td width="402" height="56"> </td>
<td width="93" height="56"> </td>
<td width="372" height="56"> </td>
<td width="22" height="56"> </td>
</tr>
<tr>
<td width="402">
<div align="right"></div>
</td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
<tr>
<td width="402"> </td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
</table>
<table width="716" border="0">
<tr>
<td height="2" width="1"> </td>
<td height="2" colspan="4"> </td>
</tr>
<tr>
<td height="44" width="1"> </td>
<td height="44" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#333333">To
use this form simply fill in the file numbers of the images you want in
the space provided. For example: "<b><font color="#000000">Images:
G6_Johnson_F_8233, 8244, 8367, 8533, 8544</font></b>"--You get the
idea. Please don't forget to list the total quantity in the appropriate
space. If you are ordering a 5X7 Package , put a "1" in the
quantity box, unless you want more than one set of pictures.</font></td>
</tr>
<tr>
<td height="44" width="1"> </td>
<td height="44" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#333333">Shipping
is just <font color="#000000">$2</font> per order (not $2 per item).</font></td>
</tr>
<tr>
<td height="54" width="1"> </td>
<td height="54" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Each
order is reviewed by hand before it is processed. You'll get an second
invoice in your email when the order has been approved and processed.</font></td>
</tr>
<tr>
<td height="44" width="1"> </td>
<td height="44" colspan="4"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#333333">If
you have any questions or comments just call <font color="#996600">(323)
924-1800</font>, or </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="mailto:support%5Bat%5Dcaleventphoto.com"><font color="#996600">email</font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#333333">.</font></td>
</tr>
<tr>
<td width="1"> </td>
<td width="482">
<div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Thanks,</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
</font></div>
</td>
<td width="2"> </td>
<td width="73"> </td>
<td width="136"> </td>
</tr>
<tr>
<td width="1"> </td>
<td colspan="2">
<div align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#996600">Brandon
</font></div>
</td>
<td width="73"> </td>
<td width="136"> </td>
</tr>
</table>
<table width="713" border="0" bgcolor="#666666">
<tr>
<td width="31" height="533"> </td>
<td width="630" height="533" bgcolor="#666666">
<div align="center">
<form action="order2.php" method="post">
<table width="100%" border="0">
<tr bgcolor="#666666">
<td align=right height="65" colspan="2">
<div align="center">
<table width="284" border="0" cellspacing="0" cellpadding="0" bgcolor="#666666">
<tr>
<td height="34" width="1"> </td>
<td height="34" bordercolor="#FFFFFF" width="275">
<div align="center"><font face="Verdana,Arial" size="1"><b><font color="#FFFFFF">2008
Soccer </font><font color="#CCCCCC"><font color="#FFFFFF"></font>
Action Shots Secure Order Form</font></b></font></div>
</td>
<td height="34" width="10"> </td>
</tr>
</table>
</div>
</td>
</tr>
<tr bgcolor="#666666">
<td align=right height="2" colspan="2" bordercolor="#666666"> </td>
</tr>
<tr bgcolor="#666666">
<td align=right height="46" colspan="2" bordercolor="#666666">
<div align="right"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font></div>
</td>
</tr>
<tr>
<td align=right height="37" colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<div align="center"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"><img src="5X7-logo.jpg" width="448" height="96"></font></div>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#CCCCCC">
<td align=right height="58" width="13%">
<div align="center"><font face="Verdana,Arial" size="1" color="#666666">
Quantity:
<input type="text" name="numB" size="7">
</font></div>
</td>
<td align=right height="58" width="87%">
<div align="left"><font color="#666666" size="1" face="Verdana, Arial, Helvetica, sans-serif">List
Image Numbers Here:</font><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
<font size="1">
<textarea name="Notes5x7" cols="58" wrap="VIRTUAL">Images:
Notes:</textarea>
</font></font></div>
</td>
</tr>
<tr bgcolor="#666666">
<td align=right height="48" colspan="2" bordercolor="#666666">
<div align="right"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font></div>
</td>
</tr>
<tr>
<td align=right height="37" colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<div align="center"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"><img src="5X7set-logo.jpg" width="448" height="96"></font></div>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#CCCCCC">
<td align=right height="58" width="13%">
<div align="center"><font face="Verdana,Arial" size="1" color="#666666">
Quantity:
<input type="text" name="numP" size="7">
</font></div>
</td>
<td align=right height="58" width="87%" valign="top">
<div align="left"><font color="#666666" size="1" face="Verdana, Arial, Helvetica, sans-serif">List
Image Numbers Here:</font><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
<font size="1">
<textarea name="Notes5x7pack" cols="58" wrap="VIRTUAL">Images:
Notes:</textarea>
</font></font></div>
</td>
</tr>
<tr bgcolor="#666666">
<td align=right height="48" colspan="2" bordercolor="#666666"> </td>
</tr>
<tr bgcolor="#666666">
<td align=right width="13%" height="85" bordercolor="#666666"> </td>
<td width="87%" height="85" bordercolor="#666666">
<div align="left"> <font face="Verdana,Arial" size="1" color="#FFFFFF">
<input type="submit" value="Continue To Page 2..." name="submit">
</font></div>
</td>
</tr>
</table>
</form>
</div>
</td>
<td width="38" height="533"> </td>
</tr>
<tr>
<td width="31" height="2"> </td>
<td width="630" height="2"> </td>
<td width="38" height="2"> </td>
</tr>
</table>
<table width="906" border="0">
<tr>
<td><img src="../images/CEP-copyright.gif" width="271" height="15"></td>
<td> </td>
</tr>
</table>
<p> </p>
</div>
</body>
</html>
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:41 pm
by BBalls
...and here's the last confirmation page...
Code: Select all
<?
$SiteCompanyName = "Caleventphoto.com";
$SiteEmail = "support@caleventphoto.com";
$SiteURL = "www.caleventphoto.com";
$SitePhone = "(323)924-1800";
$SiteSubject = "Purchase-Cal Event Photo";
$ThankYouMessage = "Order Confirmation from Cal Event Photo";
$SiteUserName = "Brandon E.";
?>
<html>
<head>
<title>Order Confirmation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" link="#CC6600" vlink="#CC6600" alink="#CC6600">
<div align="center">
<table width="907" border="0">
<tr>
<td width="402" height="9"> </td>
<td width="93" height="9"> </td>
<td width="372" height="9"> </td>
<td width="22" height="9"> </td>
</tr>
<tr>
<td width="402"><img src="../images/CEP-logo.gif" width="402" height="56"></td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
<tr>
<td width="402" height="56"> </td>
<td width="93" height="56"> </td>
<td width="372" height="56"> </td>
<td width="22" height="56"> </td>
</tr>
<tr>
<td width="402">
<div align="right"></div>
</td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
<tr>
<td width="402"> </td>
<td width="93"> </td>
<td width="372"> </td>
<td width="22"> </td>
</tr>
</table>
<table width="567" border="0">
<tr>
<td height="7"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333"></font></td>
<td height="7">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333">Thanks
for ordering!. </font></div>
</td>
<td height="7"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333"></font></td>
</tr>
<tr>
<td height="2"> </td>
<td height="2">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333">A
confirmation email has been sent to<font color="#CC6600"> <?php echo $UserEmail?></font>.
</font></div>
</td>
<td height="2"> </td>
</tr>
<tr>
<td height="2"> </td>
<td height="2">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333">Your
card will not be charged until the order is reviewed. </font></div>
</td>
<td height="2"> </td>
</tr>
<tr>
<td height="2"> </td>
<td height="2">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333"><font color="#333333"><font size="1"><font size="1"></font></font></font></font></div>
</td>
<td height="2"> </td>
</tr>
<tr>
<td height="2"> </td>
<td height="2">
<div align="center"></div>
</td>
<td height="2"> </td>
</tr>
<tr>
<td height="45"> </td>
<td height="45">
<div align="center"></div>
</td>
<td height="45"> </td>
</tr>
<tr>
<td> </td>
<td>
<div align="center"><font color="#333333" size="1" face="Verdana, Arial, Helvetica, sans-serif"><font color="#333333"><font size="1"><font size="1">Please
<a href="mailto:support%20%5Bat%5D%20caleventphoto.com">email</a> if
you have any further questions or comments.</font></font></font></font></div>
</td>
<td> </td>
</tr>
</table>
<p><?
$UserMessage = "\nThank you for ordering from Caleventphoto.com.\n\n";
$UserMessage .= "Please review your submitted information.\n";
$UserMessage .= "If anything is incorrect, simply submit another order,\nor email me with your changes. Unless another arrangement has been made,\n";
$UserMessage .= "please allow 10 business days for your order to be shipped.\n\n";
$UserMessage .= " $numA 4x6 photos for $$numF\n";
$UserMessage .= " $Notes4x6\n";
$UserMessage .= " $numB 5x7 photos for $$numG\n";
$UserMessage .= " $Notes5x7\n";
$UserMessage .= " $numP 5x7 packages for $$numO\n";
$UserMessage .= " $Notes5x7pack\n";
$UserMessage .= " $numC 8x10 photos for $$numH\n";
$UserMessage .= " $Notes8x10\n";
$UserMessage .= " $numD 10x13 photos for $$numI\n";
$UserMessage .= " $Notes10x13\n";
$UserMessage .= " $numE CD's for $$numJ\n";
$UserMessage .= " $NotesCD\n";
$UserMessage .= " Subtotal = $$numK\n";
$UserMessage .= " Tax = $$numL\n";
$UserMessage .= " Shipping = $2\n";
$UserMessage .= " Total = $$numN\n\n";
$UserMessage .= "Name: $UserNameFirst $UserNameLast\n";
$UserMessage .= "Kid's Name: $UserNameKid\n";
$UserMessage .= "League: $UserLeague\n";
$UserMessage .= "Division: $UserDivision\n";
$UserMessage .= "Team: $UserTeam\n";
$UserMessage .= "Billing Address: $UserBillAddress\n";
$UserMessage .= "City: $UserCity\n";
$UserMessage .= "State: $UserState\n";
$UserMessage .= "Zip: $UserZip\n";
$UserMessage .= "Country: $UserCountry\n";
$UserMessage .= "Daytime Phone: $UserDayPhone\n";
$UserMessage .= "Evening Phone: $UserEvePhone\n";
$UserMessage .= "Email: $UserEmail\n";
$UserMessage .= "Shipping Address: $UserShipAddress\n";
$UserMessage .= "Card Type: $UserCard\n";
$UserMessage .= "Name on Card: $UserCardName\n";
$UserMessage .= "Card Number: **** **** **** ****\n";
$UserMessage .= "Card Expiration: $UserCardExpiration\n\n";
$UserMessage .= "Notes: $UserNotes\n\n";
$UserMessage .= "Thanks Again!\n$SiteUserName\n$SiteURL \n$SiteEmail \n$SitePhone";
mail("$UserEmail", "$ThankYouMessage", $UserMessage, "From: Cal Event Photo");
$AdminMessage .= "New Cal Event Photo Order:\n\n";
$AdminMessage .= " $numA 4x6 photos for $$numF\n";
$AdminMessage .= " $Notes4x6\n";
$AdminMessage .= " $numB 5x7 photos for $$numG\n";
$AdminMessage .= " $Notes5x7\n";
$AdminMessage .= " $numP 5x7 packages for $$numO\n";
$AdminMessage .= " $Notes5x7pack\n";
$AdminMessage .= " $numC 8x10 photos for $$numH\n";
$AdminMessage .= " $Notes8x10\n";
$AdminMessage .= " $numD 10x13 photos for $$numI\n";
$AdminMessage .= " $Notes10x13\n";
$AdminMessage .= " $numE CD's for $$numJ\n";
$AdminMessage .= " $NotesCD\n";
$AdminMessage .= " Subtotal = $$numK\n";
$AdminMessage .= " Tax = $$numL\n";
$AdminMessage .= " Shipping = $2\n";
$AdminMessage .= " Total = $$numN\n\n";
$AdminMessage .= "Name: $UserNameFirst $UserNameLast\n";
$AdminMessage .= "Kid's Name: $UserNameKid\n";
$AdminMessage .= "League: $UserLeague\n";
$AdminMessage .= "Division: $UserDivision\n";
$AdminMessage .= "Team: $UserTeam\n";
$AdminMessage .= "Billing Address: $UserBillAddress\n";
$AdminMessage .= "City: $UserCity\n";
$AdminMessage .= "State: $UserState\n";
$AdminMessage .= "Zip: $UserZip\n";
$AdminMessage .= "Country: $UserCountry\n";
$AdminMessage .= "Daytime Phone: $UserDayPhone\n";
$AdminMessage .= "Evening Phone: $UserEvePhone\n";
$AdminMessage .= "Email: $UserEmail\n";
$AdminMessage .= "Shipping Address: $UserShipAddress\n";
$AdminMessage .= "Card Type: $UserCard\n";
$AdminMessage .= "Name on Card: $UserCardName\n";
$AdminMessage .= "Card Number: $UserCardNumber\n";
$AdminMessage .= "Card Expiration: $UserCardExpiration\n\n";
$AdminMessage .= "Notes: $UserNotes\n\n";
$AdminMessage .= "Info: $HTTP_USER_AGENT\n";
mail("$SiteEmail", "$SiteSubject", $AdminMessage, "From: $UserEmail");
?></p>
<p> </p>
<p> </p>
<p> </p>
<table width="906" border="0">
<tr>
<td><img src="../images/CEP-copyright.gif" width="271" height="15"></td>
<td> </td>
</tr>
</table>
</div>
</body>
</html>
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 12:48 pm
by BBalls
I don't know anything about enabling shorttags or globals.
So maybe this is something specific to this new server that I can change in cPanel or in my code?
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 1:24 pm
by infolock
From looking at your code, you are indeed coding for the idea of globals being enabled.
Put this at the top of your page that you are submitting to and it will fix it without much other technical know-how:
Also, make sure that you change things that look like <? to be <?php instead.
Re: PHP forms no longer working
Posted: Mon Jan 11, 2010 2:06 pm
by BBalls
Thanks. I'll give that a shot later today and post back.
Re: PHP forms no longer working
Posted: Wed Jan 13, 2010 12:09 pm
by BBalls
Thanks--it worked. Not sure why it would suddenly stop working, but it's functional now.
I'm not sure if you wanted me to replace the <? at the very top with <?php but I did. And that was the only place I did.