finally got round to doing my uni project, on final page of site
but am stuck on one part of it, im doing a user search page, the results will show all the pics that the user has uploaded
i can get it to show the results, as its just calling it from the database, but the file name the pic is saved as just comes up as text, i need it to be a clickable link so the pic can be viewed when opened
im guessing i may need image tags so it displays the image instead of the filename - i dont really ant to do it this way though, i just want a clicky link - i been told something about anchor tags
so far the code looks like this -
<HTML>
<HEAD>
<TITLE>User Gallery Search</TITLE>
</HEAD>
<BODY>
<H1>Results from your search</H1>
<!--#include file= "Lib/ASPLib.asp"-->
<%
SET myConn = SERVER.CreateObject("adodb.connection")
DBpath = SERVER.MapPath("db")
strConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strConn = strConn & DBpath
strConn = strConn & "\cars.mdb;"
myConn.Open (strConn)
SQLStr="SELECT [User Name], [File Name], [Description] from Files WHERE "
SQLStr=SQLStr & " [User Name]='" & request("dname") & "'"
' see the string generated
'response.write ("'" & SQLStr &"'")
CALL query2table(SQLStr,myConn)
myConn.Close
%>
</BODY>
</HTML>
any pointers in the right direction will be appreciated
but am stuck on one part of it, im doing a user search page, the results will show all the pics that the user has uploaded
i can get it to show the results, as its just calling it from the database, but the file name the pic is saved as just comes up as text, i need it to be a clickable link so the pic can be viewed when opened
im guessing i may need image tags so it displays the image instead of the filename - i dont really ant to do it this way though, i just want a clicky link - i been told something about anchor tags
so far the code looks like this -
<HTML>
<HEAD>
<TITLE>User Gallery Search</TITLE>
</HEAD>
<BODY>
<H1>Results from your search</H1>
<!--#include file= "Lib/ASPLib.asp"-->
<%
SET myConn = SERVER.CreateObject("adodb.connection")
DBpath = SERVER.MapPath("db")
strConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strConn = strConn & DBpath
strConn = strConn & "\cars.mdb;"
myConn.Open (strConn)
SQLStr="SELECT [User Name], [File Name], [Description] from Files WHERE "
SQLStr=SQLStr & " [User Name]='" & request("dname") & "'"
' see the string generated
'response.write ("'" & SQLStr &"'")
CALL query2table(SQLStr,myConn)
myConn.Close
%>
</BODY>
</HTML>
any pointers in the right direction will be appreciated