![]() |
Manipulating a form field with your URL?
Ok, say I have a signup form with a few text input fields and a submit button. Is it possible without any uber-fancy script or code to manipulate the input to one of those fields via the URL, to create a sort of referal link?
|
[Your URL]?id=your_value
Using PHP: <INPUT TYPE=submit value=\"$id\"> Using Javascript something like: Code:
id = location.href.substring(location.href.lastIndexOf(' '),location.href.lastIndexOf('id=')+3);then use a javascript write to the value into the form: Code:
<input type=submit value="<script language="JavaScript">document.write(id);</script>"> |
make sure you do some input validation while you're at it :)
|
I want to learn php :(
|
| All times are GMT -7. The time now is 07:51 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123