%@ language=JavaScript %>
<%
//these variable set the access needed for the page
var required_login = "false"; //'true' or 'false'
var required_status = "user"; //'user' or 'admin'
var asp_dir = "asp/"; //state where asp folder is in relation to this one
%>
<%
if (Request("action") == "add_tip"){
tipsshow = "false";
var user_tip = String(Request("tip_text"));
user_tip = user_tip.replace(/'/g,"'"); //Replace all the ' with HTML code
sql_insert = "INSERT into tips_table (tips_text, tips_show) values ('" + user_tip + "', " + tipsshow + ")";
Conn.Execute(sql_insert);
%> Thank you for submitting your item. We'll check it out, and if we like
it we'll add it to the list thats shown on the site! In
case you missed it, it was :
<%
}
else {
%> All the current bits in our archive : <%
sql = "SELECT * from tips_table where tips_show=true"
rs = Server.CreateObject("ADODB.RecordSet");
rs.Open (sql, Conn, 2,3);
if (rs.EOF){
Response.Write("No tips found...come back soon.");
}
else{
tips_array = new Array ();
i = 0;
while (! rs.EOF){
Response.Write("
" + rs.Fields.item("tips_text") + "
");
rs.Move(1);
i ++
} //end while
} //close else
rs.Close ();
%>
Think the list is missing some great idea or other? Submit one of
your own: