I am needing help translating this code from ASP to PHP. Can anyone help me with this? Here is the code:
<%@LANGUAGE=“VBSCRIPT”%>
<%
Dim Recordset1__varMan
Recordset1__varMan = “zxc”
If (Request(“ID”) <> “”) Then
Recordset1__varMan = Request(“ID”)
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject(“ADODB.Recordset”)
Recordset1.ActiveConnection = MM_ServerConn_STRING
Recordset1.Source = “SELECT Distinct ModelNo, ID, Manufacturer FROM UK_Trade WHERE Manufacturer = '” + Replace(Recordset1__varMan, “’”, “’’”) + “’ AND Trade_Price > 0 ORDER BY ModelNo”
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject(“ADODB.Recordset”)
Recordset2.ActiveConnection = MM_ServerConn_STRING
Recordset2.Source = "SELECT Distinct Manufacturer FROM UK_Trade WHERE Trade_Price > 0 ORDER BY Manufacturer "
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
Then this is in my body
<% If Not Recordset2.EOF Or Not Recordset2.BOF Then %>
Select Projector Manufacturer <% While (NOT Recordset2.EOF) %> " <%If (Not isNull(Request("ID"))) Then If (CStr(Recordset2.Fields.Item("Manufacturer").Value) = CStr(Request("ID"))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(Recordset2.Fields.Item("Manufacturer").Value)%> <% Recordset2.MoveNext() Wend If (Recordset2.CursorType > 0) Then Recordset2.MoveFirst Else Recordset2.Requery End If %> <% End If 'Not Recordset2.EOF Or Not Recordset2.BOF %> <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %> Select Projector Model <% While (NOT Recordset1.EOF) %> "><%=(Recordset1.Fields.Item("ModelNo").Value)%> <% Recordset1.MoveNext() Wend If (Recordset1.CursorType > 0) Then Recordset1.MoveFirst Else Recordset1.Requery End If %>