nicx Posted December 22, 2008 Share Posted December 22, 2008 Guys,please help me. I have some wrong with my code,i need your help to correction it. The code: <?php header("Content-type: text/html"); header("Cache-control: no-cache"); print("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"); print("<html>"); echo "<head> <title>Frengo SMS</title> </head> <body bgcolor=\"#c7c7c7\"> "; function SendSms($name, $message, $country_code, $rmsisdn, $msisdn) { $serverRequest = "http://site.Com"; $serverRequest .= "?name=".urlencode($name); $serverRequest .= "&message=".urlencode($message); $serverRequest .= "&country_code=".$country_code; $serverRequest .= "&rmsisdn=".$rmsisdn; $serverRequest .= "&msisdn=".$msisdn; $serverResult = file_get_contents($serverRequest); if (!$serverResult) return "Returned error while trying to connect to Gateway"; $xml = simplexml_load_string($serverResult); if ($xml->ErrorDescription == "recom") //please explain what fuction for this tag $result = $xml->sent; else $result = $xml->ErrorDescription; return $result; } if ($_SERVER["REQUEST_METHOD"] == "POST") { $text=$_POST["message"]." [www.Mysite.Com] "; $smsres = sendSms($_POST["name"], "$text", $_POST["country_code"], $_POST["rmsisdn"], $_POST["msisdn"]); if (preg_match("/^\d+$/",strip_tags($smsres))) { echo "<b>[Err!] Sms Failed</b><br/> "; } else { echo "<b>[OK!] Sms Sent Successfully</b><br/>"; } echo "<br/>"; } print("<form action=\"{$_SERVER["PHP_SELF"]}\" method=\"post\">"); print("Name:<input type=\"text\" value=\"\" name=\"name\"/><br/> Text:<br/><textarea name=\"message\"></textarea><br/> Country:</br> <select name=\"country_code\"><option selected=\"selected\" value=\"62\">Indonesia (+62)</option><option value=\"44\">UK (+44)</option><option value=\"60\">Malaysia (+60)</option><option value=\"63\">Philippines (+63)</option><option value=\"65\">Singapore (+65)</option><option value=\"852\">Hong Kong (+852)</option><option value=\"67\">Brunei (+67)</option></select> <br/> Recipient: ex. 8561233xxx<br/> <input type=\"text\" mini:hint=\"phone\" value=\"8\" name=\"rmsisdn\"/><br/> Your Account: must reg at m.frengo.com to get free 100sms a day<br/> <input type=\"text\" name=\"msisdn\" value=\"\"/><br/> <input type=\"submit\" name=\"submit\" value="Send"/>"); print("</form>"); echo " </body> </html>"; ?> that shown Parse error : syntax error, unexpected T_STRING in /home2/nabrakb/public_h tml/test/index.php on line 62 whats my wrong? Help Link to comment https://forums.phpfreaks.com/topic/138073-help-parse-error-syntax-error-unexpected-t_string-on-line-62/ Share on other sites More sharing options...
revraz Posted December 22, 2008 Share Posted December 22, 2008 Forgot to escape your last bit of quotes value="Send"/>"); Link to comment https://forums.phpfreaks.com/topic/138073-help-parse-error-syntax-error-unexpected-t_string-on-line-62/#findComment-721741 Share on other sites More sharing options...
nicx Posted December 22, 2008 Author Share Posted December 22, 2008 Okay,i will try. Thanks bro Link to comment https://forums.phpfreaks.com/topic/138073-help-parse-error-syntax-error-unexpected-t_string-on-line-62/#findComment-721752 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.