Jump to content

Classic ASP to php


gsc1ugs

Recommended Posts

Hi

 

Seems PHP is more popular now than asp, can someone convert this to PHP give me a start?

 

sub count

 

Dim strConn

Set rsUpdate = Server.CreateObject("ADODB.Recordset")

Set strConn = Server.CreateObject("ADODB.Connection")

typeid = Request.Querystring("typeid")

identityid = Request.Querystring("identity")

 

strConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" &server.MapPath("bad.mdb")&";"

mySQL="UPDATE advertTable set clicks=clicks+1 WHERE companyid="&typeid&" and locationid="&identityid

'Response.Write mySQL

rsUpdate.Open mySQL, strConn, 2, 1

Set rsUpdate = nothing

 

select case typeid

case 1

Response.Redirect "http://www.s1.com"

case 2

Response.Redirect "http://www.s2.co.uk"

case 3

Response.Redirect "https://www.s3.co.uk/main.cgi?aff=2895"

case 4

Response.Redirect "http://www.s4.co.uk/forum/index.php"

case else

Response.Redirect "http://www.s5.co.uk"

end select

 

 

end sub

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.