Forums
This topic is locked
Form Posting Popblem :S
Posted 23 May 2002 04:44:13
1
has voted
23 May 2002 04:44:13 LiToZ LiToZ posted:
Well, i have made a register.asp having a form that insert into a DB table using the [ UD Insert Form ] !! fine, it works good, and it redirect to page welcome.asp !! now on that page i made a command that Automatically inserts one record in ANOTHER table in the DB with the SAME username he JUST registered!! but i found out that the form doesnt post anything to welcome.asp... so any suggestions on how to make the form post the username the user choosed to welcome.asp ? or there may be an easier way which is to put that COMMAND in the register.asp instead of welcome.asp but i dont know how to make the command run ONLY when the submit button is pressed, and will it be able to accept the variable passed from the text feild [ username ] of the form sumitted on the same page ????i know this seems so quizzy and messy but i hope someone have a solution 4 that <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>
Thanks
Replies
Replied 26 May 2002 21:27:16
26 May 2002 21:27:16 David Thomas replied:
How about setting up a simple Session Variable on Welcome.asp "MM_Username" so that when he/she has registered and submitted their info you can display a welcome for them like as they enter the page.
I hope i'm on the right track for your question here, if not please explain a bit better what you need
"Nobody ever said this stuff was easy"
I hope i'm on the right track for your question here, if not please explain a bit better what you need
"Nobody ever said this stuff was easy"
Replied 26 May 2002 23:36:29
26 May 2002 23:36:29 Owen Eastwick replied:
To make the command run only when the submit button is presed:
If you are using an actual button:
<%
If Request("Submit" <> "" Then
INSERT, UPDATE OR DELETE COMMAND CODE
End If
%>
If you are using an image field this won't work, an easy work around is to use a bit of JavaScript to update a hidden field, something like:
<input type="image" border="0" name="imageField" src="Images/linuxhosting.gif" width="150" height="50" onClick="UpdateField()">
Then create your JavaScript Function:
function UpdateField(){
document.FormName.HiddenFieldName.value = 1
}
Then your command code:
<%
If Request("HiddenFieldName" = 1 Then
INSERT, UPDATE OR DELETE COMMAND CODE
End If
%>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
If you are using an actual button:
<%
If Request("Submit" <> "" Then
INSERT, UPDATE OR DELETE COMMAND CODE
End If
%>
If you are using an image field this won't work, an easy work around is to use a bit of JavaScript to update a hidden field, something like:
<input type="image" border="0" name="imageField" src="Images/linuxhosting.gif" width="150" height="50" onClick="UpdateField()">
Then create your JavaScript Function:
function UpdateField(){
document.FormName.HiddenFieldName.value = 1
}
Then your command code:
<%
If Request("HiddenFieldName" = 1 Then
INSERT, UPDATE OR DELETE COMMAND CODE
End If
%>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 27 May 2002 20:24:05
27 May 2002 20:24:05 David Behan replied:
Have a look at this post.
www.udzone.com/forum/topic.asp?TOPIC_ID=18033&FORUM_ID=3&CAT_ID=2&Topic_Title=Tutorial+request&Forum_Title=Dreamweaver+UltraDev
Instead of using the mail script just after the insert, use an insert stored procedure instead of on your home page.
Regards,
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2
www.udzone.com/forum/topic.asp?TOPIC_ID=18033&FORUM_ID=3&CAT_ID=2&Topic_Title=Tutorial+request&Forum_Title=Dreamweaver+UltraDev
Instead of using the mail script just after the insert, use an insert stored procedure instead of on your home page.
Regards,
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2