Coding Thread, HTML forms - how to get the full address/parameters when submitted? in Coding and Web Development; When a submit button on a form is clicked, the form does what it needs to with the relevant info ...
-
8th December 2011, 11:57 AM #1 HTML forms - how to get the full address/parameters when submitted?
When a submit button on a form is clicked, the form does what it needs to with the relevant info but is there a way to extract the link or the config it uses when submitted?
Example:
Code:
<form method="post" name="Form1" action="/page">
<input type="hidden" name="action" value="doaction"/>
<input type="text" name="name"/>
etc..
the associated link of this (I think) would be http://www.site.com/page?action=doaction&name=NAMEINPUT.
This is rather simple but what I am working with is a bit more complex with checkboxes in the form that it checks.
I've tried to explain best I can, but really I just want to know what parameters are being passed when the submit button is clicked.
-
-
IDG Tech News
-
11th December 2011, 06:57 PM #2 To see the submitted values in the query string like you suggested, you need to change your form method to get. That will pass the values after the question mark. Unless you have a good reason i wouldn't recommend passing values with the query string. If your using PHP to process your form you can still see what the values are by printing out the POST Array.
PHP Code:
print_r($_POST);
or an individual field PHP Code:
print_r($_POST("name"));
Last edited by jamiess; 11th December 2011 at 07:04 PM.
-
-
11th December 2011, 07:28 PM #3 Yes as mentioned above you would need use some server side scripting. How do you want to record the data? Email, database etc?
-
SHARE: 
Similar Threads
-
By IT_Freek in forum How do you do....it?
Replies: 3
Last Post: 20th January 2010, 09:56 PM
-
By stevenlong1985 in forum Other Stuff
Replies: 6
Last Post: 21st July 2009, 09:54 AM
-
By tickmike in forum Windows
Replies: 5
Last Post: 9th July 2006, 03:42 PM
-
By MrDylan in forum Windows
Replies: 8
Last Post: 11th April 2006, 11:55 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules