Click to See Complete Forum and Search --> : Asp Script?


petrocan
02-25-2003, 10:13 AM
My form MAILTO: is seemingly NOT going to work due to some firewall/blah, blah problems...

...does anyone have a ASP script/code for posting simple form data to a page. This is solely for internal purposes and will not be used for making money, etc...

...I can give full credit to the owner in comment tags, but again, no one will see this as it will be on a internal server.

Any help would be greatly appreciated.

petrocan

jpmoriarty
02-25-2003, 10:27 AM
posting data to a page isnt really asp - it's asp that you'd have on tha page to interpret the data that is posted to it, but the page that actually posts the data can be html.

and all you'd need would be a form with it's action set to "page.asp" and method set to post : so something like


<form action="page.asp" method="POST">
<input type="text" name="text_box">
<input type="submit" value="Send this text">
</form>

I'm not too hot on the asp side, but in PHP all you'd do would be:

echo "You entered the text $HTTP_POST_VARS['text_box']";

petrocan
02-25-2003, 11:44 AM
Sounds good jp...I have the form created, but don't I have to have the document (page.asp) created along with the form.html (for example)?

...and how do I incorporate this PHP aspect into my form?...sounds easy...

jpmoriarty
02-25-2003, 03:38 PM
the action page (i used the example page.asp) just has to exist on the server - what goes into it is completely up to you. If you did it in php and all it contained was the line i gave you above, you would get a web page with that line on it, nothing else. Now obviously if you wanted to include anything else, or do a bit of formatting on it, or take values and add them to a database for example, then that needs to be coded into the asp / php page too- it just depends on what you want to do.

This of course also all relies on you being able to run asp or php pages on your site.

If you're delving into php, then you might want to join us at php builder (http://www.phpbuilder.com/board/) .