phentalmyst
Programmer
hey all,
im simply trying to pull the data from a form and then update the database with the new stuff, but the form values are passing properly. any help with this will be GREATLY appreciated!
my form submit looks like this:
************
<%@ Language=VBScript %>
<!--#include file="securitylevel3required.asp"-->
<%
strConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\ set conn = server.createobject("ADODB.Connection"
conn.open strConnectionString
%>
<html>
<head>
<title>\\ moongroover -- the official website //</title>
<link rel="stylesheet" href="../moon.css">
<%
groover = Request.Querystring("groover"
SQL="SELECT groover, first_name, last_name, instruments, email, influences, justin, brian, joel, kris, nishan, unknown_fact FROM bios Where groover="&groover
set admin = conn.Execute(SQL)
' justin thoughts
justinstr = "<div id=normtxtgrey>Thoughts on Justin: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "justin" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java01str = "document.bioedit.justin.value=" & chr(34) & admin(6) & chr(34) & "; "
' brian thoughts
brianstr = "<div id=normtxtgrey>Thoughts on Brian: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "brian" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java02str = "document.bioedit.brian.value=" & chr(34) & admin(7) & chr(34) & "; "
' joel thoughts
joelstr = "<div id=normtxtgrey>Thoughts on Joel: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "joel" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java03str = "document.bioedit.joel.value=" & chr(34) & admin(8) & chr(34) & "; "
' kris thoughts
krisstr = "<div id=normtxtgrey>Thoughts on Kris: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "kris" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java04str = "document.bioedit.kris.value=" & chr(34) & admin(9) & chr(34) & "; "
' nishan thoughts
nishanstr = "<div id=normtxtgrey>Thoughts on Nishan: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "nishan" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br>"
java05str = "document.bioedit.nishan.value=" & chr(34) & admin(10) & chr(34) & "; "
' justins thought string
If groover = "1" Then
thoughtstr = brianstr & joelstr & krisstr & nishanstr
End if
If groover = "1" Then
javastr = java02str & java03str & java04str & java05str
End if
' brians thoughts
If groover = "2" Then
thoughtstr = justinstr & joelstr & krisstr & nishanstr
End if
If groover = "2" Then
javastr = java01str & java03str & java04str & java05str
End If
' joels thoughts
If groover = "3" Then
thoughtstr = justinstr & brianstr & krisstr & nishanstr
End if
If groover = "3" Then
javastr = java01str & java02str & java04str & java05str
End If
' kris thoughts
If groover = "4" Then
thoughtstr = justinstr & brianstr & joelstr & nishanstr
End if
If groover = "4" Then
javastr = java01str & java02str & java03str & java05str
End If
' neeshs thoughts
If groover = "5" Then
thoughtstr = justinstr & brianstr & joelstr & krisstr
End If
If groover = "5" Then
javastr = java01str & java02str & java03str & java04str
End If
%>
<script language="javascript">
<!--
function toss_info(){
document.bioedit.instruments.value = <%=chr(34) & admin(3) & chr(34)%>;
document.bioedit.email.value = <%=chr(34) & admin(4) & chr(34)%>;
document.bioedit.influences.value = <%=chr(34) & admin(5) & chr(34)%>;
document.bioedit.unknown_fact.value = <%=chr(34) & admin(11) & chr(34)%>;
<%=javastr%>;
}
//-->
</script>
<script language="javascript">
<!--
function update(){
document.bioedit.submit();
}
//-->
</script>
</head>
<body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#000000">
<div align="center">
<center>
<table border="0" width="660" cellspacing="0" cellpadding="0">
<tr>
<td height="40">
<div id="head01"><b> Moongroover - the official website</b></div>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<div id="normtxtwhite">
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" width="120"><img src="../images/i_spc01.gif" width="1" height="35"></td>
<td rowspan="2" width="420">
<p> </p>
</td>
<td rowspan="2" width="120"> </td>
</tr>
<tr> </tr>
<tr>
<td valign="top"> </td>
<td valign="top">
<div id="head02"></div>
<form name="bioedit" method="post" action=" <table width="420" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div id="normtxtwhite">Hey <%=admin(1)%>, here's your
bio, so play wif it already!</div>
<br>
<div id="normtxtgrey">Instrument(s): (<font color="#006699">max
255 characters of text</font>)</div>
<input type="text" name="instruments" value="test" maxlength="255" size="50">
<div id="normtxtgrey"><br>
Email: (<font color="#006699">max 255 characters of
text</font>)</div>
<input type="text" name="email" maxlength="255" size="30">
<div id="normtxtgrey"><br>
Influences: (<font color="#006699">max 255 characters
of text</font>)</div>
<textarea name="influences" cols="45" rows="4"></textarea>
<div id="normtxtgrey"><br>
<%=thoughtstr%></div>
<div id="normtxtgrey">
<p>Unknown Fact About Mr. <%=admin(2)%> (<font color="#006699">max
255 characters of text</font>)<br>
<input type="text" name="unknown_fact" maxlength="255" size="50">
<input type="hidden" name="groover" value="<%=admin(0)%>">
</p>
</div>
</td>
</tr>
<tr align="center">
<td><br><br><input type="submit" name="submit" value="submit"></td>
</tr>
</table>
</form>
</td>
<td valign="top"> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
************
and the submit page is here:
************
<%@ LANGUAGE = VBScript %>
<html>
<head>
<title>moongroover editor</title>
<%
' declaring variables
' not neccesary but a good habit
Dim DataConn
Dim CmdUpdateRecord
Dim MYSQL
Set DataConn = Server.CreateObject("ADODB.Connection"
Set CmdUpdateRecord = Server.CreateObject("ADODB.Recordset"
' The line below shows how to use a system DSN instead of a DNS-LESS connection
' DataConn.Open "DSN=System_DSN_Name"
DataConn.Open "DBQ=" & Server.Mappath("../data/bios.mdb" & ";Driver={Microsoft Access Driver (*.mdb)};"
edited = request("groover"
instruments = request("instruments"
MYSQL = "SELECT instruments FROM bios WHERE groover="&edited
CmdUpdateRecord.Open MYSQL, DataConn, 1, 3
CmdUpdateRecord.Fields("instruments" = instruments
CmdUpdateRecord.Update
' closing objects and setting them to nothing
' not neccesary but a good habit
CmdUpdateRecord.Close
Set CmdUpdateRecord = Nothing
DataConn.Close
Set DataConn = Nothing
%>
</head>
<body>
<center>Good job <%=edited%>!!</center><br><br><%= request("instruments" %>
</body>
</html>
******************
thanks!!!
im simply trying to pull the data from a form and then update the database with the new stuff, but the form values are passing properly. any help with this will be GREATLY appreciated!
my form submit looks like this:
************
<%@ Language=VBScript %>
<!--#include file="securitylevel3required.asp"-->
<%
strConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\ set conn = server.createobject("ADODB.Connection"
conn.open strConnectionString
%>
<html>
<head>
<title>\\ moongroover -- the official website //</title>
<link rel="stylesheet" href="../moon.css">
<%
groover = Request.Querystring("groover"
SQL="SELECT groover, first_name, last_name, instruments, email, influences, justin, brian, joel, kris, nishan, unknown_fact FROM bios Where groover="&groover
set admin = conn.Execute(SQL)
' justin thoughts
justinstr = "<div id=normtxtgrey>Thoughts on Justin: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "justin" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java01str = "document.bioedit.justin.value=" & chr(34) & admin(6) & chr(34) & "; "
' brian thoughts
brianstr = "<div id=normtxtgrey>Thoughts on Brian: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "brian" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java02str = "document.bioedit.brian.value=" & chr(34) & admin(7) & chr(34) & "; "
' joel thoughts
joelstr = "<div id=normtxtgrey>Thoughts on Joel: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "joel" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java03str = "document.bioedit.joel.value=" & chr(34) & admin(8) & chr(34) & "; "
' kris thoughts
krisstr = "<div id=normtxtgrey>Thoughts on Kris: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "kris" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br><br>"
java04str = "document.bioedit.kris.value=" & chr(34) & admin(9) & chr(34) & "; "
' nishan thoughts
nishanstr = "<div id=normtxtgrey>Thoughts on Nishan: (<font color=006699>max 255 characters of text</font>)</div><textarea name=" & chr(34) & "nishan" & chr(34) & " cols=" & chr(34) & "45" & chr(34) & " rows=" & chr(34) & "4" & chr(34) & "></textarea><br>"
java05str = "document.bioedit.nishan.value=" & chr(34) & admin(10) & chr(34) & "; "
' justins thought string
If groover = "1" Then
thoughtstr = brianstr & joelstr & krisstr & nishanstr
End if
If groover = "1" Then
javastr = java02str & java03str & java04str & java05str
End if
' brians thoughts
If groover = "2" Then
thoughtstr = justinstr & joelstr & krisstr & nishanstr
End if
If groover = "2" Then
javastr = java01str & java03str & java04str & java05str
End If
' joels thoughts
If groover = "3" Then
thoughtstr = justinstr & brianstr & krisstr & nishanstr
End if
If groover = "3" Then
javastr = java01str & java02str & java04str & java05str
End If
' kris thoughts
If groover = "4" Then
thoughtstr = justinstr & brianstr & joelstr & nishanstr
End if
If groover = "4" Then
javastr = java01str & java02str & java03str & java05str
End If
' neeshs thoughts
If groover = "5" Then
thoughtstr = justinstr & brianstr & joelstr & krisstr
End If
If groover = "5" Then
javastr = java01str & java02str & java03str & java04str
End If
%>
<script language="javascript">
<!--
function toss_info(){
document.bioedit.instruments.value = <%=chr(34) & admin(3) & chr(34)%>;
document.bioedit.email.value = <%=chr(34) & admin(4) & chr(34)%>;
document.bioedit.influences.value = <%=chr(34) & admin(5) & chr(34)%>;
document.bioedit.unknown_fact.value = <%=chr(34) & admin(11) & chr(34)%>;
<%=javastr%>;
}
//-->
</script>
<script language="javascript">
<!--
function update(){
document.bioedit.submit();
}
//-->
</script>
</head>
<body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#000000">
<div align="center">
<center>
<table border="0" width="660" cellspacing="0" cellpadding="0">
<tr>
<td height="40">
<div id="head01"><b> Moongroover - the official website</b></div>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<div id="normtxtwhite">
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" width="120"><img src="../images/i_spc01.gif" width="1" height="35"></td>
<td rowspan="2" width="420">
<p> </p>
</td>
<td rowspan="2" width="120"> </td>
</tr>
<tr> </tr>
<tr>
<td valign="top"> </td>
<td valign="top">
<div id="head02"></div>
<form name="bioedit" method="post" action=" <table width="420" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div id="normtxtwhite">Hey <%=admin(1)%>, here's your
bio, so play wif it already!</div>
<br>
<div id="normtxtgrey">Instrument(s): (<font color="#006699">max
255 characters of text</font>)</div>
<input type="text" name="instruments" value="test" maxlength="255" size="50">
<div id="normtxtgrey"><br>
Email: (<font color="#006699">max 255 characters of
text</font>)</div>
<input type="text" name="email" maxlength="255" size="30">
<div id="normtxtgrey"><br>
Influences: (<font color="#006699">max 255 characters
of text</font>)</div>
<textarea name="influences" cols="45" rows="4"></textarea>
<div id="normtxtgrey"><br>
<%=thoughtstr%></div>
<div id="normtxtgrey">
<p>Unknown Fact About Mr. <%=admin(2)%> (<font color="#006699">max
255 characters of text</font>)<br>
<input type="text" name="unknown_fact" maxlength="255" size="50">
<input type="hidden" name="groover" value="<%=admin(0)%>">
</p>
</div>
</td>
</tr>
<tr align="center">
<td><br><br><input type="submit" name="submit" value="submit"></td>
</tr>
</table>
</form>
</td>
<td valign="top"> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
************
and the submit page is here:
************
<%@ LANGUAGE = VBScript %>
<html>
<head>
<title>moongroover editor</title>
<%
' declaring variables
' not neccesary but a good habit
Dim DataConn
Dim CmdUpdateRecord
Dim MYSQL
Set DataConn = Server.CreateObject("ADODB.Connection"
Set CmdUpdateRecord = Server.CreateObject("ADODB.Recordset"
' The line below shows how to use a system DSN instead of a DNS-LESS connection
' DataConn.Open "DSN=System_DSN_Name"
DataConn.Open "DBQ=" & Server.Mappath("../data/bios.mdb" & ";Driver={Microsoft Access Driver (*.mdb)};"
edited = request("groover"
instruments = request("instruments"
MYSQL = "SELECT instruments FROM bios WHERE groover="&edited
CmdUpdateRecord.Open MYSQL, DataConn, 1, 3
CmdUpdateRecord.Fields("instruments" = instruments
CmdUpdateRecord.Update
' closing objects and setting them to nothing
' not neccesary but a good habit
CmdUpdateRecord.Close
Set CmdUpdateRecord = Nothing
DataConn.Close
Set DataConn = Nothing
%>
</head>
<body>
<center>Good job <%=edited%>!!</center><br><br><%= request("instruments" %>
</body>
</html>
******************
thanks!!!