Guest swamwise Posted May 15, 2006 Share Posted May 15, 2006 ok... i'm building a website for this company with tonnes of products. good thing i learned asp before i came here. but the prblem is... their server is a linux server. i found out that linux server only support .php items, not .asp. so i'm in deep trouble. all i need to do is learn how to convert. below are samples of the code.(not all cause i want to learn)This is the first part of the menu page that will send the hardcoded codes to the next page. <table border=0 cellspacing=1 cellpadding=1 width=500><tr><td width=250 valign=top><a href="prod.asp?catId=1">B&W Multifunctionals</a><br><font face="Verdana" size=2>The Ricoh family of copier based Aficio products provide you with a wide variety of standalone and networked printing and document solutions.<br><font color=#ff0000>........................................</font></td><td width=250 valign=top><a href="prod.asp?catId=2">Colour Multifunctionals</a><br><font face="Verdana" size=2>Ricoh Aficio multifunction Color Systems will meet your requirements and deliver dependable digital output for any general office, professional, Central Reprographics or print-for-pay environment.<br><font color=#ff0000>........................................</font></td></tr><tr><td width=250 valign=top><a href="prod.asp?catId=3">Fascimiles</a><br><font face="Verdana" size=2>Ricoh offers a full line of feature-rich facsimile machines ranging from affordable multifunction models that provide convenience copying and printing to our high speed, encryption enabled SecureFax products.<br><font color=#ff0000>........................................</font></td><td width=250 valign=top><a href="prod.asp?catId=4">Scanners</a><br><font face="Verdana" size=2>Ricoh offers a full line of document scanners that deliver unsurpassed image quality, speed, and advanced paper handling to meet the needs of any user in a workgroup or departmental environment.<br><font color=#ff0000>........................................</font></td ></tr><tr><td width=250 valign=top><a href="prod.asp?catId=5">Laser Printers</a><br><font face="Verdana" size=2>Ricoh offers a complete line of network capable printers that print in black and white, color, or both.<br><font color=#ff0000>........................................</font></td><td width=250 valign=top> </td></tr></table> This one is for retrieving the values from the database sent in from the category page. <%Dim conn, rsSet conn = Server.CreateObject("ADODB.Connection")conn.Provider = "Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("ricohlist.mdb"))Set rs = server.CreateObject("ADODB.recordset")rs.Open "SELECT * from Listall where catId= '" &_request.querystring("catId") & "'", conn%><% do until rs.eof %> <tr> <td><a href="Description.asp?pid=<%= rs("pid")%>"> <%= rs("Model")%> </a></td> <td><font face=Verdana size=2><%= rs("pSpeed")%></font></td> <td align=center><font face=Verdana size=2><%= rs("Copy")%></td> <td align=center><font face=Verdana size=2><%= rs("Print")%></td> <td align=center><font face=Verdana size=2><%= rs("Scan")%></td> <td align=center><font face=Verdana size=2><%= rs("Fax")%></td> </tr><% rs.moveNext loop%> this is only like 10% of the total asp i have to change. so don't worry. i'm not abusing your help. just need some examples to show me how php works...thanks. Link to comment Share on other sites More sharing options...
boen_robot Posted May 15, 2006 Share Posted May 15, 2006 Look at the second question on this page. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 15, 2006 Share Posted May 15, 2006 If you still want to convert, here's how to handle form variables:http://www.php.net/manual/en/language.variables.external.phpInstead of response.querystring, you use the $_GET array, or $_POST instead of response.form. PHP doesn't have support for dealing with MS Access, but here is the reference for SQL server:http://www.php.net/manual/en/ref.mssql.phpYou would use mssql_connect and mssql_query to connect and query the database. Or you can also use MySQL functions if you are dealing with a MySQL database. Link to comment Share on other sites More sharing options...
boen_robot Posted May 15, 2006 Share Posted May 15, 2006 PHP doesn't have support for dealing with MS Access Really? Then what's that thing about ODBC which W3Schools demonstrates in the PHP tutorial? I thought it handles mdb and other kind of DB files. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 15, 2006 Share Posted May 15, 2006 That's true, it can connect through ODBC, but it doesn't have the explicit support that it gives to SQL Server or MySQL through the function libraries. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now