I converted one asp code into php. then i checked in localhost, it was working fine but when i uploaded in server and checked it's showing an error. So, I need some help please!
The asp code is :
Code:
<%@ Language=VBScript %>
<%
Company_Email_address="info@rushlimousine.com"
Email_Server="relay-hosting.secureserver.net"
FromEmail="website@rushlimousine.com"
%>
<%if trim(Request.Form("Submitit")) = "Send" then
msg = "--[ Sender ]--------------------------"+Chr(13)+Chr(13)
msg = msg + " Name: " + Request("Name") + "."+Chr(13)+Chr(13)
msg = msg + " URL: " + Request("url") + "."+Chr(13)+Chr(13)
msg = msg + " E-mail: " + Request("email") + "."+Chr(13)+Chr(13)
msg = msg + "Subject: " + Request("subj") + "."+Chr(13)+Chr(13)
msg = msg + "Message: "+Chr(13)
msg = msg + Request("msg") + "."+Chr(13)+Chr(13)
msg= msg +"Have a nice day!"+Chr(13)+Chr(13)
sSubject="You got mail! [Form: rushlimousine.com]"
StrSmartHost=Email_Server
ToEmail=Company_Email_address
EmailSubject=sSubject
EmailBody=msg
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = FromEmail
objMail.Subject = sSubject
objMail.To = ToEmail
objMail.Body = EmailBody
objMail.Send
Set objMail = Nothing
curMsg = "<div align='left' style='color: #66B022; font: bold 12px Tahoma;'>Message sent. Thank you.</div>"
else
curMsg=""
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Chicago Limousine | Chicago Area Limo Service | Chicago Ohare Limo | Contact us</title>
<meta name="description" content="Chicago Limousine Service in Chicago Rush Ground Transportation providing chicago area limo service, chicago ohare limo, chicago airport limo.">
<meta name="keywords" content="Chicago, CEO Charter, VIP Charter, VIP Coauch Bus, VIP Van Charter, VIP VAN, VIP Limo Bus, VIP limousine,chicago limousine, chicago area limo service, chicago limo, chicago ohare limo, limo service in chicago, chicago airport limo">
<link href="main.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="OtherFunctions.js"></script>
</head>
<body bgcolor="#FFFFFF">
<table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="60" valign="middle"><div class="logo"><a href="index.html"><img src="img/welcome.png" width="301" height="30" hspace="75" border="0"></a></div>
<div class="header">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><a href="corpserv.asp"><img src="img/_corp.gif" width="141" height="17" border="0"></a></td>
<td ><a href="corpapp.asp"><img src="img/_corp1.gif" width="155" height="17" border="0"></a></td>
</tr>
</table>
</div></td>
</tr>
</table>
<table width="100%" height="1%" border="0" cellpadding="0" cellspacing="0" style="border-bottom:2px solid white">
<tr>
<td width="50" height="18" align="right" valign="top" bgcolor="#FFFFFF"><img src="img/p.gif" width="64" height="1"></td>
<td width="1%" height="18" align="left" valign="top" style="background-image:url(img/angle_l_t.png); background-repeat:no-repeat"><img src="img/p.gif" width="15" height="1"></td>
<td width="6%" align="center" valign="middle" class="menu" ><a href="index.html">Home</a></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="flight.html">Flight Crew Services</a></td>
<td width="5%" align="center" valign="middle" nowrap class="menu" ><a href="fleet.html">Rush Fleet</a></td>
<td align="center" valign="middle" nowrap class="menu" ><a href="load.html">Loading Procedures </a></td>
<td width="6%" align="center" valign="middle" nowrap class="menu" ><a href="rates.html">Rates</a></td>
<td align="center" valign="middle" nowrap class="menu" ><a href="reservations.asp">Reservations</a></td>
<td align="center" valign="middle" nowrap class="menu" ><a href="regulations.html">Regulations</a></td>
<td align="center" valign="middle" nowrap class="menusel" >Contact us</td>
<td width="40%" align="left" valign="top" class="menu" > </td>
</tr>
<tr>
<td height="18" align="right" valign="top" bgcolor="#FFFFFF"> </td>
<td colspan="10" align="center" valign="middle" nowrap bgcolor="#0A53A2" style="border-left:solid 1px white; border-top:solid 1px white" ><table width="100%" border="0" cellspacing="0">
<tr>
<td width="10" align="center" valign="middle" nowrap class="menuttt" ><img src="img/p.gif" alt="1" width="11" height="1"></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="pickup_chicago.html">Pickup Chicago Limousine</a></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="pickup.html">Pickup O'Hare Limousine </a></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="pickup_w.html">Pickup Midway Limousine </a></td>
<td width="95%" class="menu"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="239" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="bottom" bgcolor="#C5D6DE" style="background-image:url(img/bg_1700.jpg); background-repeat:no-repeat">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="420" valign="bottom"><div style="position:relative">
<div style="position:absolute; left:-20px; top:-170; width: 438px;"><img src="img/tech_cont.png" width="437" height="254"></div>
<div style="position:absolute; left:350px; top:-220px;"><a href="index.html"><img src="img/logo.png" border="0"></a></div>
<div style="position:absolute; left:400px; top:-200px;"><img src="img/flight.png" width="224" height="23"></div>
</div></td>
<td width="40%" align="right" valign="top"><a href="index.html"><img src="img/home.png" width="16" height="16" hspace="5" vspace="45" border="0"></a><a href="mailto:info@rushlimousine.com"><img src="img/email.png" width="16" height="16" hspace="10" vspace="45" border="0"></a></td>
<td width="30%"><img src="img/p.gif" width="1" height="239"></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="90" valign="bottom"><img src="img/p.gif" width="420" height="1"></td>
<td width="80%" rowspan="2" align="left" valign="top" class="main" style="border-bottom:1px solid #EAEAEA">
<div class="ttl"><img src="img/ttl_17.png" width="118" height="25" align="absmiddle"><%=curMsg%></div>
<div>
<script language="JavaScript">
function chk(it) {
if(!StringTest(it.name, "Your Name is required")) {
return(false);
}
if(!isEmail(it.email.value)) {
it.email.focus();
return(false);
}
if(it.subj.value.length < 3) {
alert("Subject field is required.");
it.subj.focus();
return(false);
}
if(it.msg.value.length < 3) {
alert("Message field is required.");
it.msg.focus();
return(false);
}
return (true);
}
</script>
<form id="contactform" method="post" onSubmit="return chk(this)">
<input type="hidden" name="posted" value="1" />
<table cellpadding="0" cellspacing="0" class="form1" style=" border-top:3px solid #CCCCCC; border-bottom:3px solid #CCCCCC;">
<tr>
<td><strong>Name:</strong><font color="#ff0000"> *</font></td>
<td><input name="name" class="formnamelong" tabindex="1" value="" /></td>
</tr>
<tr>
<td><label for="email"><strong>E-mail:</strong><font color="#ff0000"> *</font></label></td>
<td><input name="email" class="formnamelong" value=""/></td>
</tr>
<tr>
<td><label for="url"><strong>Url:</strong></label></td>
<td><input name="url" class="formnamelong" value=""/></td>
</tr>
<tr>
<td><label for="subj"><strong>Subject:</strong><font color="#ff0000"> *</font></label></td>
<td><input name="subj" class="formnamelong" value=""/></td>
</tr>
<tr>
<td><label for="msg"><strong>Message:</strong><font color="#ff0000"> *</font></label></td>
<td><textarea name="msg" rows="10" cols="45"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Send" name="Submitit" class="gobutt"></td>
</tr>
</table>
</form>
</div></td>
</tr>
<tr>
<td height="92" align="right" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" align="right" valign="bottom" nowrap class="shad" style="padding:0px 10px 5px 10px"><a href="mailto:info@rushlimousine.com"><img src="img/arr.png" width="5" height="10" hspace="5" border="0" align="absmiddle">info@rushlimousine.com</a> </td>
<td width="50%" align="center" valign="middle" class="shad"><img src="img/contact.png" width="206" height="71" hspace="5" vspace="5" border="0"></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
</body>
</html>
and the php code is
Code:
<?php
/*
ASP Translator Messages (These can be removed later)
----------------------------------------------------
1. All "Dim" statements have been changed to comments for reference.
*/
?>
<?@ $Language=$VBScript ?>
<?
$Company_Email_address="info@rushlimousine.com";
$Email_Server="relay-hosting.secureserver.net";
$FromEmail="website@rushlimousine.com";
?>
<?if (trim(@$_POST["Submitit"]) == "Send") {
$msg = "--[ Sender ]--------------------------"+chr(13)+chr(13);
$msg = $msg + " Name: " + Request("Name") + "."+chr(13)+chr(13);
$msg = $msg + " URL: " + Request("url") + "."+chr(13)+chr(13);
$msg = $msg + " E-mail: " + Request("email") + "."+chr(13)+chr(13);
$msg = $msg + "Subject: " + Request("subj") + "."+chr(13)+chr(13);
$msg = $msg + "Message: "+chr(13);
$msg = $msg + Request("msg") + "."+chr(13)+chr(13);
$msg= $msg +"Have a nice day!"+chr(13)+chr(13);
$sSubject="You got mail! [Form: rushlimousine.com]";
$StrSmartHost=$Email_Server;
$ToEmail=Company_Email_address;
$EmailSubject=$sSubject;
$EmailBody=$msg;
//dim $objMail;
Set $objMail = Server.CreateObject("CDONTS.NewMail");
$objMail.$From = $FromEmail;
$objMail.$Subject = $sSubject;
$objMail.To = $ToEmail;
$objMail.$Body = $EmailBody;
$objMail.$Send;
Set $objMail = Nothing;
$curMsg = "<div align='left' style='color: #66B022; font: bold 12px Tahoma;'>Message sent. Thank you.</div>";
} else {
$curMsg="";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Chicago Limousine | Chicago Area Limo Service | Chicago Ohare Limo | Contact us</title>
<meta name="description" content="Chicago Limousine Service in Chicago Rush Ground Transportation providing chicago area limo service, chicago ohare limo, chicago airport limo.">
<meta name="keywords" content="Chicago, CEO Charter, VIP Charter, VIP Coauch Bus, VIP Van Charter, VIP VAN, VIP Limo Bus, VIP limousine,chicago limousine, chicago area limo service, chicago limo, chicago ohare limo, limo service in chicago, chicago airport limo">
<link href="main.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="OtherFunctions.js"></script>
</head>
<body bgcolor="#FFFFFF">
<table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="60" valign="middle"><div class="logo"><a href="index.html"><img src="img/welcome.png" width="301" height="30" hspace="75" border="0"></a></div>
<div class="header">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><a href="corpserv.asp"><img src="img/_corp.gif" width="141" height="17" border="0"></a></td>
<td ><a href="corpapp.asp"><img src="img/_corp1.gif" width="155" height="17" border="0"></a></td>
</tr>
</table>
</div></td>
</tr>
</table>
<table width="100%" height="1%" border="0" cellpadding="0" cellspacing="0" style="border-bottom:2px solid white">
<tr>
<td width="50" height="18" align="right" valign="top" bgcolor="#FFFFFF"><img src="img/p.gif" width="64" height="1"></td>
<td width="1%" height="18" align="left" valign="top" style="background-image:url(img/angle_l_t.png); background-repeat:no-repeat"><img src="img/p.gif" width="15" height="1"></td>
<td width="6%" align="center" valign="middle" class="menu" ><a href="index.html">Home</a></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="flight.html">Flight Crew Services</a></td>
<td width="5%" align="center" valign="middle" nowrap class="menu" ><a href="fleet.html">Rush Fleet</a></td>
<td align="center" valign="middle" nowrap class="menu" ><a href="load.html">Loading Procedures </a></td>
<td width="6%" align="center" valign="middle" nowrap class="menu" ><a href="rates.html">Rates</a></td>
<td align="center" valign="middle" nowrap class="menu" ><a href="reservations.asp">Reservations</a></td>
<td align="center" valign="middle" nowrap class="menu" ><a href="regulations.html">Regulations</a></td>
<td align="center" valign="middle" nowrap class="menusel" >Contact us</td>
<td width="40%" align="left" valign="top" class="menu" > </td>
</tr>
<tr>
<td height="18" align="right" valign="top" bgcolor="#FFFFFF"> </td>
<td colspan="10" align="center" valign="middle" nowrap bgcolor="#0A53A2" style="border-left:solid 1px white; border-top:solid 1px white" ><table width="100%" border="0" cellspacing="0">
<tr>
<td width="10" align="center" valign="middle" nowrap class="menuttt" ><img src="img/p.gif" alt="1" width="11" height="1"></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="pickup_chicago.html">Pickup Chicago Limousine</a></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="pickup.html">Pickup O'Hare Limousine </a></td>
<td width="10%" align="center" valign="middle" nowrap class="menu" ><a href="pickup_w.html">Pickup Midway Limousine </a></td>
<td width="95%" class="menu"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="239" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="bottom" bgcolor="#C5D6DE" style="background-image:url(img/bg_1700.jpg); background-repeat:no-repeat">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="420" valign="bottom"><div style="position:relative">
<div style="position:absolute; left:-20px; top:-170; width: 438px;"><img src="img/tech_cont.png" width="437" height="254"></div>
<div style="position:absolute; left:350px; top:-220px;"><a href="index.html"><img src="img/logo.png" border="0"></a></div>
<div style="position:absolute; left:400px; top:-200px;"><img src="img/flight.png" width="224" height="23"></div>
</div></td>
<td width="40%" align="right" valign="top"><a href="index.html"><img src="img/home.png" width="16" height="16" hspace="5" vspace="45" border="0"></a><a href="mailto:info@rushlimousine.com"><img src="img/email.png" width="16" height="16" hspace="10" vspace="45" border="0"></a></td>
<td width="30%"><img src="img/p.gif" width="1" height="239"></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="90" valign="bottom"><img src="img/p.gif" width="420" height="1"></td>
<td width="80%" rowspan="2" align="left" valign="top" class="main" style="border-bottom:1px solid #EAEAEA">
<div class="ttl"><img src="img/ttl_17.png" width="118" height="25" align="absmiddle"><?=$curMsg?></div>
<div>
<script language="JavaScript">
function chk(it) {
if(!StringTest(it.name, "Your Name is required")) {
return(false);
}
if(!isEmail(it.email.value)) {
it.email.focus();
return(false);
}
if(it.subj.value.length < 3) {
alert("Subject field is required.");
it.subj.focus();
return(false);
}
if(it.msg.value.length < 3) {
alert("Message field is required.");
it.msg.focus();
return(false);
}
return (true);
}
</script>
<form id="contactform" method="post" onSubmit="return chk(this)">
<input type="hidden" name="posted" value="1" />
<table cellpadding="0" cellspacing="0" class="form1" style=" border-top:3px solid #CCCCCC; border-bottom:3px solid #CCCCCC;">
<tr>
<td><strong>Name:</strong><font color="#ff0000"> *</font></td>
<td><input name="name" class="formnamelong" tabindex="1" value="" /></td>
</tr>
<tr>
<td><label for="email"><strong>E-mail:</strong><font color="#ff0000"> *</font></label></td>
<td><input name="email" class="formnamelong" value=""/></td>
</tr>
<tr>
<td><label for="url"><strong>Url:</strong></label></td>
<td><input name="url" class="formnamelong" value=""/></td>
</tr>
<tr>
<td><label for="subj"><strong>Subject:</strong><font color="#ff0000"> *</font></label></td>
<td><input name="subj" class="formnamelong" value=""/></td>
</tr>
<tr>
<td><label for="msg"><strong>Message:</strong><font color="#ff0000"> *</font></label></td>
<td><textarea name="msg" rows="10" cols="45"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Send" name="Submitit" class="gobutt"></td>
</tr>
</table>
</form>
</div></td>
</tr>
<tr>
<td height="92" align="right" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" align="right" valign="bottom" nowrap class="shad" style="padding:0px 10px 5px 10px"><a href="mailto:info@rushlimousine.com"><img src="img/arr.png" width="5" height="10" hspace="5" border="0" align="absmiddle">info@rushlimousine.com</a> </td>
<td width="50%" align="center" valign="middle" class="shad"><img src="img/contact.png" width="206" height="71" hspace="5" vspace="5" border="0"></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
</body>
</html>
It's showing
Parse error: syntax error, unexpected T_VARIABLE in
/home/content/83/7149483/html/rushlimo/contact.php on line
35