Forum Moderators: coopster

Message Too Old, No Replies

PHP - Parse error: parse error, unexpected T_STRING, expecting ',' or

Script error

         

SubmitRegistry

11:34 am on May 5, 2003 (gmt 0)

10+ Year Member



The error:

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/submitr/public_html/order/modules/commbank.php on line 178

The Code(line 178 is 2nd line from top):

if ($payment == "commbank") {
echo " <form action=\"https://URL DELETED" method=\"POST\" name=commbank>";
echo " <input type=\"hidden\" name=\"cmd\" value=\"_xclick\">";
echo " <input type=\"hidden\" name=\"amount\" value=\"$amount\">";
echo " <input type=\"hidden\" name=\"business\" value=\"$commbank_email\">";
echo " <input type=\"hidden\" name=\"return\" value=\"$commbank_url\">";
echo " <input type=\"hidden\" name=\"item_name\" value=\"$commbank_desc\">";
echo " <input type=\"hidden\" name=\"item_number\" value=\"001\">";
echo " <input type=\"hidden\" name=\"custom\" value=\"$invoiceid\">";
echo "</form>";

I am playing with a payment module and do not great knowledge of PHP. I do know I am supposed to be missing a "," or a ";"
Could you kindly assist me in this script error please.
Kind Regards
Travis

dmorison

11:43 am on May 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Travis,

Before you deleted the URL was there an escape character on the terminating double quotes of the URL?

The code above is incorrect because of this, but you might have deleted by mistake when clearing the URL...

echo " <form action=\"https://URL DELETED" method=\"POST\" name=commbank>";

should be:

echo " <form action=\"https://URL DELETED\" method=\"POST\" name=commbank>";

SubmitRegistry

12:05 pm on May 5, 2003 (gmt 0)

10+ Year Member



Hi dmorison
You are very correct, one backslash and I am on my merry way.
I appreciate your help.
Thanks
Travis