PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I got the following code from a client, they state that it is PHP but I have never seen anything like this and having never seen ASP, that is what I believe it is. Anyhow, we want to make a redirect based on a form select dropdown and that should be the action (from what I can make out)... can someone help me to put the proper PHP code in place of whatever this is.
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#003366">
<center>
<table width="326" border="0" cellpadding="0" cellspacing="2" bordercolor="#999999">
<tr>
<td><span class="whitebold">How did you hear about us? </span>
<form action = "<%= Request.ServerVariables("SCRIPT_NAME")%>" method="post">
<span class="linkswh"><br>
<input type = "radio" name = "page" value = "search" >
Online Search Engine<br>
<input type = "radio" name = "page" value = "marty">
Member<br>
<input type = "radio" name = "page" value = "print">
Print Media (newspaper, magazine, publication)<br>
<input type = "radio" name = "page" value = "radio">
Radio<br>
<input type = "radio" name = "page" value = "tv">
TV Advertisement</span><br>
<br>
<input type = "submit" value = "continue >>">
</form>
<%
'get the users selection from the form
strURL = Request.Form("page")
'depending on the users selection redirect to that page
Select Case lcase(strURL)
Case "search"
Response.Redirect "/index.php"
Case "memeber"
Response.Redirect "/contact.php"
Case "print"
Response.Redirect "/faqs.php"
Case "radio"
Response.Redirect "/maintenance.php"
Case "tv"
Response.Redirect "/pc_repair.php"
End Select
%></td>
</tr>
</table>
</center>
</body>
</html>
-
??
I also have never seen asp, but if you know any website related coding, you know what the asp? does here and to redo the same in a switch clause and a new header.
I am not sure if I understand why, but in reading the documentation, I assume it is because globals are off? Anyhow, below is my code as it works fine on PHP 5.0.3 on my machine but fails on the 4.3.x server it is meant to run on.