Welcome to Dream.In.Code
Become an Expert!

Join 149,528 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,482 people online right now. Registration is fast and FREE... Join Now!




Post Forms

 
Reply to this topicStart new topic

Post Forms

Dilerious
30 May, 2007 - 05:49 AM
Post #1

D.I.C Regular
Group Icon

Joined: 30 Dec, 2005
Posts: 267



Thanked: 1 times
Dream Kudos: 365
My Contributions
I got the code to post data from w3schools.

that being:
CODE
<form name="input" action="html_form_action.asp"
method="get">
Username:
<input type="text" name="user">
<input type="submit" value="Submit">
</form>


and I changed the "html_form_action.asp" to a html page, but the data wasn't posted to the other page.
Any help?
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Post Forms
30 May, 2007 - 06:15 AM
Post #2

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 15,262



Thanked: 61 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
You trying to GET or POST ? If your .asp page is looking for POST data, then method="get" won't work, you'll have to change it to post.
User is offlineProfile CardPM
+Quote Post

Dilerious
RE: Post Forms
30 May, 2007 - 06:19 AM
Post #3

D.I.C Regular
Group Icon

Joined: 30 Dec, 2005
Posts: 267



Thanked: 1 times
Dream Kudos: 365
My Contributions
Like I said, I changed the .asp page to a .html page.
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Post Forms
30 May, 2007 - 07:08 AM
Post #4

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
An HTML page is not interpreted, so it won't read any data (get or post), it is served as is.
User is offlineProfile CardPM
+Quote Post

Dilerious
RE: Post Forms
30 May, 2007 - 07:11 AM
Post #5

D.I.C Regular
Group Icon

Joined: 30 Dec, 2005
Posts: 267



Thanked: 1 times
Dream Kudos: 365
My Contributions
Do I have to use asp?
or could I use a php page or something?
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Post Forms
30 May, 2007 - 07:31 AM
Post #6

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
php or any serverside scripting / programming is ok.
User is offlineProfile CardPM
+Quote Post

Dilerious
RE: Post Forms
30 May, 2007 - 08:22 AM
Post #7

D.I.C Regular
Group Icon

Joined: 30 Dec, 2005
Posts: 267



Thanked: 1 times
Dream Kudos: 365
My Contributions
QUOTE(1lacca @ 30 May, 2007 - 08:31 AM) *

php or any serverside scripting / programming is ok.


Okay, thanks.
But do I have to put something on the receiving page to display the data?
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Post Forms
30 May, 2007 - 08:29 AM
Post #8

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 15,262



Thanked: 61 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
Nope, you just leave it blank and it magically works wink2.gif


Of course. You can reference post data in php like this:

CODE
<?php echo $_POST["name"]; ?>


That will take the form field on the prior page called "name" and output it.
User is offlineProfile CardPM
+Quote Post

Dilerious
RE: Post Forms
30 May, 2007 - 08:38 AM
Post #9

D.I.C Regular
Group Icon

Joined: 30 Dec, 2005
Posts: 267



Thanked: 1 times
Dream Kudos: 365
My Contributions
QUOTE(skyhawk133 @ 30 May, 2007 - 09:29 AM) *

Nope, you just leave it blank and it magically works wink2.gif


Of course.


Well there is that possibility isn't there? =D

And thanks.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 08:52PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month