luvskyline
asked on
convert ASP to PHP
i am an ASP beginner and have developed a feedback form using ASP but later got to know that my linux server does not support ASP ! how can i convert it into PHP? i have no knowledge in PHP.
Thank you.
Thank you.
ASP under unix (but some ASP functions or types do not work)
http://www.chilisoft.com
http://www.chilisoft.com
If you post the code, I can probably change it from ASP to PHP... the above programs are pretty inaccurate... or cost money...
I would just take a look at a few PHP tutorials....
here is the basics that you will need to know/do:
- get rid of the dim variables...
- make sure all of your variable have a $ in front of them
- if you are using a DB to store the feedback info, then you will need to change out the Access stuff to MySQL
PHP is pretty simple once you get a feel for it... it also gives you better error messages...
post your code...
rp
I would just take a look at a few PHP tutorials....
here is the basics that you will need to know/do:
- get rid of the dim variables...
- make sure all of your variable have a $ in front of them
- if you are using a DB to store the feedback info, then you will need to change out the Access stuff to MySQL
PHP is pretty simple once you get a feel for it... it also gives you better error messages...
post your code...
rp
ASKER
Total pages :3
first page : contactus.asp
<html>
<head>
<title>Batt Broadbent-Solicitors-Salis bury</titl e>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script LANGUAGE="JavaScript">
<!--
function checkIt(input)
{
if (document.form1.name.value == "") {
document.form1.name.focus( )
alert("Please enter your name");
return false;
}
if (document.form1.address1.v alue == "") {
document.form1.address1.fo cus()
alert("Please enter your address");
return false;
}
if (document.form1.postcode.v alue == "") {
document.form1.postcode.fo cus()
alert("Please enter your Postcode");
return false;
}
if (document.form1.email.valu e == "") {
document.form1.email.focus ()
alert("Please enter a Email Address");
return false;
}
/*if(txtUserMail.value.sea rch(/[\w]+ (\.[\w]+)? \@+[\w]+\. [\w]+(\.[\ w]+)?/) < 0)*/
if((document.form1.email.v alue.index Of("@") == -1) || (document.form1.email.valu e.indexOf( ".") == -1)) {
alert("Please enter a valid email address. e.g myname@domain.com");
document.form1.email.focus ();
return false;
}
if(document.form1.email.va lue.indexO f("%") > -1 || document.form1.email.value .indexOf(" '") > -1) {
alert("The email cannot contain special characters");
document.form1.email.focus ();
return false;
}
return true;
}
// -->
</script>
<style type="text/css">
A:link {font-family:Times New Roman;font-size:11px; color:#000000;text-decorat ion:none;}
A:visited{font-family:Time s New Roman;font-size:11px; color:#990000;text-decorat ion:none;}
A:hover {font-family:Times New Roman;font-size:11px; color:#990000;text-decorat ion:underl ine;}</sty le>
</head>
<body bgcolor="#FFFFE2">
<div align="center">
<table width="95%" border="0" height="100%">
<tr>
<td width="200" valign="top" height="426">
<div align="left">
<p> <img src="logo.gif" width="160" height="187" border="0">
</p>
<p> </p>
<table width="90%" border="0">
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><a href="file:///E%7C/Shadowp uppet/clie nts/Battbr oadbent/ht ml/index.h tml"><b><f ont size="-1">HOME</font></b>< /a></td>
</tr>
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><font face="Times New Roman" size="-1"><b><a href="file:///E%7C/Shadowp uppet/clie nts/Battbr oadbent/ht ml/conveya ncing.html ">PRACTICE
AREA</a></b></font></td>
</tr>
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><b><font face="Times New Roman" size="-1"><a href="file:///E%7C/Shadowp uppet/clie nts/Battbr oadbent/ht ml/solicit ors.html"> SOLICITORS </a></font ></b></td>
</tr>
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><b><font face="Times New Roman" size="-1"><a href="file:///E%7C/Shadowp uppet/clie nts/Battbr oadbent/ht ml/wherewe are.html"> WHERE
WE ARE</a></font></b></td>
</tr>
</table>
</div>
</td>
<td valign="top" height="426">
<form name="form1" method="post" action="termsnconditions.a sp">
<p>In completing and submitting this form we undertake to response within
2 working days telling you:</p>
<p><img src="bullet.gif"> what you need to do<br>
<img src="bullet.gif"> what we can offer<br>
<img src="bullet.gif"> how much it is likely to cost you</p>
<p>Please supply the information bellow:</p>
<table width="491" border="0">
<tr>
<td width="135">NAME<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="name" size="40">
</td>
</tr>
<tr>
<td width="135">COMPANY</td>
<td width="342">
<input type="text" name="company" size="40" maxlength="50">
</td>
</tr>
<tr>
<td width="135">ADDRESS<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="address1" size="40">
</td>
</tr>
<tr>
<td width="135"> </td>
<td width="342">
<input type="text" name="address2" size="40">
</td>
</tr>
<tr>
<td width="135"> </td>
<td width="342">
<input type="text" name="address3" size="40">
</td>
</tr>
<tr>
<td width="135">POST CODE<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="postcode" size="20">
</td>
</tr>
<tr>
<td width="135">EMAIL ADDRESS<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="email" size="40">
</td>
</tr>
<tr>
<td width="135">DEPARTMENT</td >
<td width="342">
<select name="dept" size="1">
<option selected>Please Select</option>
<option>Conveyancing and Property Law</option>
<option>Business Matters</option>
<option>Wils and Estate Administraiton</option>
<option>Disputes, Injury Claims or Family Law</option>
</select>
</td>
</tr>
<tr>
<td width="135">QUESTION</td>
<td width="342">
<textarea name="question" cols="40" rows="3"></textarea>
</td>
</tr>
</table>
<p><font color="#FF0000" size="2">*</font> Required</p>
<p>
<input type="submit" value="Submit" name="Submit" onclick="return checkIt(this)">
<input type="reset" name="Reset" value="Reset">
</p>
</form>
<p align="left"> </p>
<p> </p>
</td>
</tr>
<tr>
<td width="200" valign="top" height="3">
<p><font face="Times New Roman, Times, serif" size="-1"><br>
</font></p>
</td>
<td height="3"> </td>
</tr>
</table>
</div>
</body>
</html>
second page: termsncondition.asp
<%response.buffer = True%>
<html>
<head>
<title>Batt Broadbent-Solicitors-Salis bury</titl e>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
</style>
<style type="text/css">
A:link {font-family:Times New Roman;font-size:11px; color:#000000;text-decorat ion:none;}
A:visited{font-family:Time s New Roman;font-size:11px; color:#990000;text-decorat ion:none;}
A:hover {font-family:Times New Roman;font-size:11px; color:#990000;text-decorat ion:underl ine;}</sty le>
<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='" +args[i+1] +"'");
}
//-->
</script>
</head>
<body bgcolor="#FFFFE2">
<div align="center">
<table width="669" border="0" height="100%">
<tr>
<td width="100" valign="top" height="420">
<img border="0" src="logosmaller.gif" width="80" height="93">
<p><font size="2">
</font>
</p>
<p>
</td>
<td valign="top" height="420" width="39">
</td>
<td valign="top" height="420" width="937">
<p align="center"><b>
Your Information:<br>
</b><font size="1" color="#800000">(Click the 'Back' button on your navigator's
window to edit your information)<br>
</font>
<form name="" method="post" action="feedbacksend.asp">
<p align="left"><font size="2">
<%
dim isElem
for Each isElem in Request.Form
%>
<%=isElem%>: <%=request.form(isElem)%>
<input type="hidden" name="<%=isElem%>" value="<%=request.form(isE lem)%>">
<br>
<%next%>
</font>
</form>
<p><font size="2">In submitting this form you will be bound by our Terms and
Conditions. Do you wish to continue?</font></p>
<p align="right">
<font size="2">
<input type="submit" value="Continue" name="submit"> <a href="http://www.geocities.com/ennydurman/battbroadbent/html/index.html"><input type="button" name="Button" value="Back to Home" onClick="MM_goToURL('paren t','index. html');ret urn document.MM_returnValue">
</a>
</font>
</p>
<p align="left"><b>
Terms and Conditions</b></p>
<p><font size="2">Batt Broadbent Terms and Conditions bla....bla....</font></p>
<p> </p>
<p align="center"> </p>
<p> </p>
<p align="left"> </p>
<p align="left"><b>
</b></p>
</td>
</tr>
</table>
</div>
</form>
</html>
third page: feedbacksend.asp
<html>
<head>
<title>Welcome to Batt Broadbent-Solicitors-Salis bury</titl e>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
A:link {font-family:Times New Roman;font-size:11px; color:#000000;text-decorat ion:none;}
A:visited{font-family:Time s New Roman;font-size:11px; color:#990000;text-decorat ion:none;}
A:hover {font-family:Times New Roman;font-size:11px; color:#990000;text-decorat ion:underl ine;}</sty le>
<script language="JavaScript">
</script>
</head>
<%
If request("submit") <> "" then
SendRegistration
Else
response.write "Error. Please check with your administrator"
End if
%>
<body topmargin="0" marginheight="0" bgcolor="#FFFFE2">
<form name="form" method="post" action="">
<table width="605" border="0" cellspacing="0" cellpadding="0" align="center" height="438">
<tr background="../images/back gd.jpg">
<td valign="top" height="113" colspan="2" width="654">
<p align="center"><img border="0" src="logo.gif" width="160" height="187"></p>
</td>
</tr>
<tr>
<td valign="top" height="304" width="581"><table width="595" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" height="354">
<tr>
<td width="12" valign="top" bgcolor="#FFFFE2"> </ td>
<td width="579" rowspan="3" valign="top" bgcolor="#FFFFE2">
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><b><font face="Times New Roman" size="2">Congratulations, your
information/question has been sent !</font></b></p>
<p align="center"><b><font color="#000000" size="2" face="Times New Roman">Thank you for
submitting your enquiries.</font></b></p>
<p align="center"><b><font color="#000000" size="2" face="Times New Roman">We will get back to you shortly...</font></b></p>
<p align="center">
</p>
<p align="center"><a href="file:///E:/Shadowpup pet/client s/Battbroa dbent/html /index.htm l"><font face="Times New Roman" size="2">Back
to homepage</font></a>
</p>
</td>
</tr>
<tr>
<td width="12" valign="top" bgcolor="#FFFFE2"> </ td>
</tr>
<tr>
<td width="12" valign="top" bgcolor="#FFFFE2"> </ td>
</tr>
</table></td>
<td height="304" width="71" valign="top" bgcolor="#FFFFE2"><br>
</td>
</tr>
<tr background="../images/back gd.jpg">
<td valign="bottom" width="581" height="21" bgcolor="#FFFFE2">
<div align="center">
</div>
<div align="center"> </div >
<div align="center"><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">Copyright
© 2002 Batt Broadbent. All rights reserved. </font></div>
</td>
<%
SUB SendRegistration
Dim Mailer
Set Mailer = Server.CreateObject("SMTPs vg.Mailer" )
Mailer.FromName = "Enquiries"
Mailer.FromAddress= "ennyyuliana@shadowpuppet. co.uk"
Mailer.RemoteHost = "mail.shadowpuppet.co.uk"
Mailer.AddRecipient "Enquiry", "ennyyuliana@shadowpuppet. co.uk"
Mailer.Subject = "Online Batt Broadbent Form"
Mailer.BodyText = "Dear Batt Broadbent Solicitors" & VbCrLf & VbCrLf & "You have received a Feedback" & VbCrLf & VbCrLf &_
" Name :" & request.form("name") & VbCrLf &_
" Company :" & request.form("company") & VbCrLf &_
" Address :" & request.form("address1") & VbCrLf &_
" :" & request.form("address2") & VbCrLf &_
" :" & request.form("address3") & VbCrLf &_
" Postcode :" & request.form("postcode") & VbCrLf &_
" E-mail Address :" & request.form("email") & VbCrLf &_
" Department :" & request.form("dept") & VbCrLf &_
" Question :" & request.form("question") & VbCrLf & VbCrLf& VbCrLf &_
"------------------------- ---------- ---------- ---------" & VbCrLf &_
"THANK YOU "
if Mailer.SendMail then
ThankYou
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
Set Mailer = nothing
END Sub
SUB ThankYou
response.write " <b><br> <font color=#000000></b></font>< br><br><br >"
END Sub
%>
<td width="71" height="21" bgcolor="#FFFFE2"> </ td>
</tr>
</table>
</form>
</body>
</html>
first page : contactus.asp
<html>
<head>
<title>Batt Broadbent-Solicitors-Salis
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script LANGUAGE="JavaScript">
<!--
function checkIt(input)
{
if (document.form1.name.value
document.form1.name.focus(
alert("Please enter your name");
return false;
}
if (document.form1.address1.v
document.form1.address1.fo
alert("Please enter your address");
return false;
}
if (document.form1.postcode.v
document.form1.postcode.fo
alert("Please enter your Postcode");
return false;
}
if (document.form1.email.valu
document.form1.email.focus
alert("Please enter a Email Address");
return false;
}
/*if(txtUserMail.value.sea
if((document.form1.email.v
alert("Please enter a valid email address. e.g myname@domain.com");
document.form1.email.focus
return false;
}
if(document.form1.email.va
alert("The email cannot contain special characters");
document.form1.email.focus
return false;
}
return true;
}
// -->
</script>
<style type="text/css">
A:link {font-family:Times New Roman;font-size:11px; color:#000000;text-decorat
A:visited{font-family:Time
A:hover {font-family:Times New Roman;font-size:11px; color:#990000;text-decorat
</head>
<body bgcolor="#FFFFE2">
<div align="center">
<table width="95%" border="0" height="100%">
<tr>
<td width="200" valign="top" height="426">
<div align="left">
<p> <img src="logo.gif" width="160" height="187" border="0">
</p>
<p> </p>
<table width="90%" border="0">
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><a href="file:///E%7C/Shadowp
</tr>
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><font face="Times New Roman" size="-1"><b><a href="file:///E%7C/Shadowp
AREA</a></b></font></td>
</tr>
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><b><font face="Times New Roman" size="-1"><a href="file:///E%7C/Shadowp
</tr>
<tr>
<td><font face="Times New Roman, Times, serif" size="3"><img src="bullet.gif" width="8" height="8"></font></td>
<td><b><font face="Times New Roman" size="-1"><a href="file:///E%7C/Shadowp
WE ARE</a></font></b></td>
</tr>
</table>
</div>
</td>
<td valign="top" height="426">
<form name="form1" method="post" action="termsnconditions.a
<p>In completing and submitting this form we undertake to response within
2 working days telling you:</p>
<p><img src="bullet.gif"> what you need to do<br>
<img src="bullet.gif"> what we can offer<br>
<img src="bullet.gif"> how much it is likely to cost you</p>
<p>Please supply the information bellow:</p>
<table width="491" border="0">
<tr>
<td width="135">NAME<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="name" size="40">
</td>
</tr>
<tr>
<td width="135">COMPANY</td>
<td width="342">
<input type="text" name="company" size="40" maxlength="50">
</td>
</tr>
<tr>
<td width="135">ADDRESS<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="address1" size="40">
</td>
</tr>
<tr>
<td width="135"> </td>
<td width="342">
<input type="text" name="address2" size="40">
</td>
</tr>
<tr>
<td width="135"> </td>
<td width="342">
<input type="text" name="address3" size="40">
</td>
</tr>
<tr>
<td width="135">POST CODE<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="postcode" size="20">
</td>
</tr>
<tr>
<td width="135">EMAIL ADDRESS<font color="#FF0000" size="2">*</font></td>
<td width="342">
<input type="text" name="email" size="40">
</td>
</tr>
<tr>
<td width="135">DEPARTMENT</td
<td width="342">
<select name="dept" size="1">
<option selected>Please Select</option>
<option>Conveyancing and Property Law</option>
<option>Business Matters</option>
<option>Wils and Estate Administraiton</option>
<option>Disputes, Injury Claims or Family Law</option>
</select>
</td>
</tr>
<tr>
<td width="135">QUESTION</td>
<td width="342">
<textarea name="question" cols="40" rows="3"></textarea>
</td>
</tr>
</table>
<p><font color="#FF0000" size="2">*</font> Required</p>
<p>
<input type="submit" value="Submit" name="Submit" onclick="return checkIt(this)">
<input type="reset" name="Reset" value="Reset">
</p>
</form>
<p align="left"> </p>
<p> </p>
</td>
</tr>
<tr>
<td width="200" valign="top" height="3">
<p><font face="Times New Roman, Times, serif" size="-1"><br>
</font></p>
</td>
<td height="3"> </td>
</tr>
</table>
</div>
</body>
</html>
second page: termsncondition.asp
<%response.buffer = True%>
<html>
<head>
<title>Batt Broadbent-Solicitors-Salis
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
</style>
<style type="text/css">
A:link {font-family:Times New Roman;font-size:11px; color:#000000;text-decorat
A:visited{font-family:Time
A:hover {font-family:Times New Roman;font-size:11px; color:#990000;text-decorat
<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"
}
//-->
</script>
</head>
<body bgcolor="#FFFFE2">
<div align="center">
<table width="669" border="0" height="100%">
<tr>
<td width="100" valign="top" height="420">
<img border="0" src="logosmaller.gif" width="80" height="93">
<p><font size="2">
</font>
</p>
<p>
</td>
<td valign="top" height="420" width="39">
</td>
<td valign="top" height="420" width="937">
<p align="center"><b>
Your Information:<br>
</b><font size="1" color="#800000">(Click the 'Back' button on your navigator's
window to edit your information)<br>
</font>
<form name="" method="post" action="feedbacksend.asp">
<p align="left"><font size="2">
<%
dim isElem
for Each isElem in Request.Form
%>
<%=isElem%>: <%=request.form(isElem)%>
<input type="hidden" name="<%=isElem%>" value="<%=request.form(isE
<br>
<%next%>
</font>
</form>
<p><font size="2">In submitting this form you will be bound by our Terms and
Conditions. Do you wish to continue?</font></p>
<p align="right">
<font size="2">
<input type="submit" value="Continue" name="submit"> <a href="http://www.geocities.com/ennydurman/battbroadbent/html/index.html"><input type="button" name="Button" value="Back to Home" onClick="MM_goToURL('paren
</a>
</font>
</p>
<p align="left"><b>
Terms and Conditions</b></p>
<p><font size="2">Batt Broadbent Terms and Conditions bla....bla....</font></p>
<p> </p>
<p align="center"> </p>
<p> </p>
<p align="left"> </p>
<p align="left"><b>
</b></p>
</td>
</tr>
</table>
</div>
</form>
</html>
third page: feedbacksend.asp
<html>
<head>
<title>Welcome to Batt Broadbent-Solicitors-Salis
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
A:link {font-family:Times New Roman;font-size:11px; color:#000000;text-decorat
A:visited{font-family:Time
A:hover {font-family:Times New Roman;font-size:11px; color:#990000;text-decorat
<script language="JavaScript">
</script>
</head>
<%
If request("submit") <> "" then
SendRegistration
Else
response.write "Error. Please check with your administrator"
End if
%>
<body topmargin="0" marginheight="0" bgcolor="#FFFFE2">
<form name="form" method="post" action="">
<table width="605" border="0" cellspacing="0" cellpadding="0" align="center" height="438">
<tr background="../images/back
<td valign="top" height="113" colspan="2" width="654">
<p align="center"><img border="0" src="logo.gif" width="160" height="187"></p>
</td>
</tr>
<tr>
<td valign="top" height="304" width="581"><table width="595" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" height="354">
<tr>
<td width="12" valign="top" bgcolor="#FFFFE2"> </
<td width="579" rowspan="3" valign="top" bgcolor="#FFFFE2">
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><b><font face="Times New Roman" size="2">Congratulations, your
information/question has been sent !</font></b></p>
<p align="center"><b><font color="#000000" size="2" face="Times New Roman">Thank you for
submitting your enquiries.</font></b></p>
<p align="center"><b><font color="#000000" size="2" face="Times New Roman">We will get back to you shortly...</font></b></p>
<p align="center">
</p>
<p align="center"><a href="file:///E:/Shadowpup
to homepage</font></a>
</p>
</td>
</tr>
<tr>
<td width="12" valign="top" bgcolor="#FFFFE2"> </
</tr>
<tr>
<td width="12" valign="top" bgcolor="#FFFFE2"> </
</tr>
</table></td>
<td height="304" width="71" valign="top" bgcolor="#FFFFE2"><br>
</td>
</tr>
<tr background="../images/back
<td valign="bottom" width="581" height="21" bgcolor="#FFFFE2">
<div align="center">
</div>
<div align="center"> </div
<div align="center"><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">Copyright
© 2002 Batt Broadbent. All rights reserved. </font></div>
</td>
<%
SUB SendRegistration
Dim Mailer
Set Mailer = Server.CreateObject("SMTPs
Mailer.FromName = "Enquiries"
Mailer.FromAddress= "ennyyuliana@shadowpuppet.
Mailer.RemoteHost = "mail.shadowpuppet.co.uk"
Mailer.AddRecipient "Enquiry", "ennyyuliana@shadowpuppet.
Mailer.Subject = "Online Batt Broadbent Form"
Mailer.BodyText = "Dear Batt Broadbent Solicitors" & VbCrLf & VbCrLf & "You have received a Feedback" & VbCrLf & VbCrLf &_
" Name :" & request.form("name") & VbCrLf &_
" Company :" & request.form("company") & VbCrLf &_
" Address :" & request.form("address1") & VbCrLf &_
" :" & request.form("address2") & VbCrLf &_
" :" & request.form("address3") & VbCrLf &_
" Postcode :" & request.form("postcode") & VbCrLf &_
" E-mail Address :" & request.form("email") & VbCrLf &_
" Department :" & request.form("dept") & VbCrLf &_
" Question :" & request.form("question") & VbCrLf & VbCrLf& VbCrLf &_
"-------------------------
"THANK YOU "
if Mailer.SendMail then
ThankYou
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
Set Mailer = nothing
END Sub
SUB ThankYou
response.write " <b><br>
END Sub
%>
<td width="71" height="21" bgcolor="#FFFFE2"> </
</tr>
</table>
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the language in PHP is closer to Javascript of Flash Actionscript than to VBScript...
you have to put a ";" at then end of every bit of code when you are ending it like Javascript...
let me know if you need more help
rp
you have to put a ";" at then end of every bit of code when you are ending it like Javascript...
let me know if you need more help
rp
ASKER
I have uploaded the pages, and I got an error. On clicking submit on the enquiry.php page, I received an error: Parse error: parse error in /usr/local/etc/httpd/htdoc s/battbroa dbentcouk/ php/termsn conditions .php on line 55 which appears to be:
foreach ($isElem ) {
The location of the page is: http://www.battbroadbent.co.uk/php/enquiry.php
foreach ($isElem ) {
The location of the page is: http://www.battbroadbent.co.uk/php/enquiry.php
I assumed you would be getting some errors...
I am not sure what you are doing with your ASP for each loop... maybe if you write out some psuedo code, and I can see what I can do...
rp
I am not sure what you are doing with your ASP for each loop... maybe if you write out some psuedo code, and I can see what I can do...
rp
ASKER
i was trying to make a enquiry form page with the first page called contactus.asp. then it will prompt the user to a terms and conditions page called termsnconditions.asp. when the user clicked on continue as an agreement to the terms n conditions, the user's enquiry will be sent to the company's mailbox. that's what the loops is trying to do for me in asp.
I don't think you need it do you? can't you just use an if then statement without a foreach loop...
like:
if($TandC = "agree"){
do something...
} else {
don't do something...
}
I don't know why you need to complicate things...
try that out and let me know...
rp
like:
if($TandC = "agree"){
do something...
} else {
don't do something...
}
I don't know why you need to complicate things...
try that out and let me know...
rp
ASKER
well, do u think we can use HTML to create those pages with ASP script i posted?
are you changing back to ASP? if so, then why?
your form can be an html page, but the processing or confirmation page needs to be either php or asp...
let me know what is going on with this one...
rp
your form can be an html page, but the processing or confirmation page needs to be either php or asp...
let me know what is going on with this one...
rp
ASKER
dear rp,
i am actually helping my friend. i developed the ASP pages for me until she told me that her company's server is using linux. so she asked if i could help her with PHP. i have no idea at all about PHP. i have told her to try out the script u posted as my server doesn't support PHP. she is quite blur and hasn't given me the feedback. she did ask if the whole thing could be in HTML so i redo the form her her in HTML.
i am actually helping my friend. i developed the ASP pages for me until she told me that her company's server is using linux. so she asked if i could help her with PHP. i have no idea at all about PHP. i have told her to try out the script u posted as my server doesn't support PHP. she is quite blur and hasn't given me the feedback. she did ask if the whole thing could be in HTML so i redo the form her her in HTML.
you can't use only HTML to process the page...
you have to use some middleware like PHP, ASP, or CGI/Perl to talk to the web server...
you wanted me to change out what you had in ASP to PHP, and that is the best I could do for you, without knowing everything...
I think that should have been enough for the points...
rp
you have to use some middleware like PHP, ASP, or CGI/Perl to talk to the web server...
you wanted me to change out what you had in ASP to PHP, and that is the best I could do for you, without knowing everything...
I think that should have been enough for the points...
rp
http://asp2php.naken.cc/download.php
I havent used this software but it will do your job
Harry