Jump to content
Fórum Script Brasil
  • 0

Passar Parametro


Question

Uma duvida , está correto o que eu fiz abaixo , nessa parte

<a href="admin.php?acao=adiministrador&id=<% consulta1("id") %>">Adiministrador</a> esta correta esta parte ?

<%
set DB = createobject("adodb.connection")
constr = "Driver={Microsoft Access Driver (*.mdb)};DBQ="&Server.Mappath("bd.mdb")
DB.open constr

DB2.open constr

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

strSQL = "SELECT * FROM usuarios"
consulta1.Open strSQL,DB,3,1

%>

<a href="admin.php?acao=adiministrador&id=<% consulta1("id") %>">Adiministrador</a>

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Se eu não me engano, você quer que quando clique no link, vá para um parametro, com id que vai aparecer os dados desse id... Se for isto, o certo seria:

<%

set DB = createobject("adodb.connection")

constr = "Driver={Microsoft Access Driver (*.mdb)};DBQ="&Server.Mappath("bd.mdb")

DB.open constr

DB2.open constr

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

strSQL = "SELECT * FROM usuarios where id="&request.querystring("id")&""

consulta1.Open strSQL,DB,3,1

%>

<a href="admin.php?acao=adiministrador&id=<% consulta1("id") %>">Adiministrador</a>

Link to post
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

Cloud Computing


  • Forum Statistics

    • Total Topics
      148888
    • Total Posts
      644902
×
×
  • Create New...