i try to Include this File to the Defualt.asp page But i get eror
this is the Page that i want to include
<%Response.Buffer = True%>
<!--#include file="variables.asp"-->
<%open_recordset rs_getQuote,"select * from quote"
open_recordset rs,"select * from idate"
idate1 = month(now()) & "/" & day(now()) & "/" & year(now())
'if month(now()) < 10 then
'imonth = "0"& month(now())
'else
'imonth = month(now())
'end if
'idate1 = day(now()) & "/" & imonth & "/" & year(now())
idate2 = formatdatetime(rs("iday"),2)
rs.close
Randomize Timer
intRnd = (Int(RND * rs_getQuote.RecordCount))
if iquote_of_the_day = "1" then
if idate1 <> idate2 then
sql_update = "update config set config_value="&intRnd&" where config_variable = 'number_quote_of_the_day' "
conn.Execute(sql_update)
sql_update = "update idate set iday='"&now()&"'"
conn.Execute(sql_update)
rs_getQuote.Move intRnd
else
rs_getQuote.Move inumber_quote_of_the_day
end if
else
if session("id") = intRnd then
do while session("id") = intRnd
intRnd = (Int(RND * rs_getQuote.RecordCount))
loop
end if
rs_getQuote.Move intRnd
session("id") = intRnd
end if
%>
<link rel="stylesheet" href="freekot/quote.css" type="text/css">
<table cellpadding="0" cellspacing="0" border="0" align=center>
<tr>
<td bgcolor="black">
<table width="<%=iwidth%>" height="<%=iheight%>" cellpadding="3" cellspacing="1" border="0" height=100% width=100%>
<tr>
<td height=20 bgcolor="<%=background2%>" class="titlebold">
<font style="color:<%=textcolor2%>">Quote of the Day</font>
</td>
</tr>
<tr>
<td valign=top bgcolor="<%=background1%>" class="text">
<font style="color:<%=textcolor1%>"><div style="text-align:justify;"><%=rs_getQuote("quote")%></div></font>
</td>
</tr>
<tr>
<td height=20 bgcolor="<%=background2%>" class="text" align=right>
<i><font style="color:<%=textcolor2%>"><%=rs_getQuote("author")%></font></i>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
rs_getQuote.Close
Set rs_getQuote = Nothing
%>
i add the Include code :
<!--#include file="zadax/zadax.asp" -->
and i get Eror :
Variable is undefined: 'conn'
/zadax/zadax.asp, line 5
ITS DRIVING ME CRAZY !!
if i go to the Zadax.asp it work Good but whan i try to include it i get the undefined: 'conn' ! somone have idea ?
Edited by zadax