scott100 Posted March 15, 2006 Share Posted March 15, 2006 Do you need to have 2 seperate pages to submit/process a form with ASP, one for collecting user info and then the other for processing it.For example i can do this with one php page like so. <?php ini_set ('display_errors', 1);error_reporting (E_ALL & ~E_NOTICE);if ( isset ($_POST['submit'])) // Check if the form has been submitted.{ $user=$_POST['username']; print"<p>Thank you for pressing submit: $user</p>";} else // page not submitted, display form{ print '<form action="test.php" method="post"> <p>Username: <input type="text" name="username" size="20" /><br /> <input type="submit" name="submit" value="Log In!" /></p> </form>';}?> isset ($_POST['submit'])I can use this function to check if the form has been submitted, if form not submitted display form, if form submitted process form.This is all done within one page, can asp do this?thanks. Link to comment Share on other sites More sharing options...
Xenon Design Posted March 16, 2006 Share Posted March 16, 2006 Yes it would be easilly done in ASP...when I get home I will make an example script for you Link to comment Share on other sites More sharing options...
scott100 Posted March 16, 2006 Author Share Posted March 16, 2006 ah glad to hear it can be done, look forward to seeing the code Link to comment Share on other sites More sharing options...
raviprakashg Posted March 16, 2006 Share Posted March 16, 2006 in asp u Submit the in same page:1. Give same pageName as Action in Form tag2. get submit Button value in var dim Button_Val Button_val = request.form ("FormName") if Button_val <> "" then <write the statement here> end if Link to comment Share on other sites More sharing options...
Xenon Design Posted March 16, 2006 Share Posted March 16, 2006 This is the same sort of idea I use for my login script...ill make it blank and if you want more help just ask and I can fill it in 'First find if there is any form informationIf Request.Form<>"" Then'If there is information thenResponse.write("Usernmae is:" & Request.Form("user"))Else'If no form informationRespnse.write("No Username inputted")End If Now if you want to make a login script you need to make a recordset and do alot of processing of the form data. If you want me to continue with the script just add me to your MSN (alex.xenondesign[at]gmail.com) Link to comment Share on other sites More sharing options...
raviprakashg Posted March 17, 2006 Share Posted March 17, 2006 hi Xenon Design,pls go thru. then topic linked belowhttp://w3schools.invisionzone.com/index.php?showtopic=3092help me if u can, Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now