Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Need Help With a Simple Post Form

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,25881
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Need Help With a Simple Post Form
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Need Help With a Simple Post Form - 9/13/2005 5:05:57 AM   
  starbug0

 

Posts: 1
Score: 0
Joined: 9/13/2005
Status: offline
I'm new to vb scripting. All i'm trying to do is make a simple post form. I've posted my code below.

I want to be able to post a persons name, email and message to the same page after the user has filled in the form and clicked on submit.

The condition formula:
If the form is completed fully then all details will be displayed.
Else a message will be displayed saying that a form field/s hasen't been completed.

Please help.


<form action="contact.asp" method="post">

Name: <input type="text" name="uname" size="20" />
<br>
E-mail: <input type="text" name="email" size="20" />
<br>
Message: 
<textarea name="message" cols="50" rows="5"></textarea>
<br>
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />
<br>

</form>


<%

dim uname
dim email
dim message


uname=Request.Form("uname")
email=Request.Form("email")
message=Request.Form("message")


If name<>"" & email<>"" & message<>"" Then

Response.Write("You have not filled all the fields in the form!")

Else

Response.Write("Name: " & uname & "<br />")
Response.Write("E-mail: " & email & "<br />")
Response.Write("Message: " & message & "<br />")

%>



Regards,

_____________________________

Wayne
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Need Help With a Simple Post Form Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts