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?
Manipulating a form field with your URL?
Collapse
X
-
Tags: None
-
[Your URL]?id=your_value
Using PHP:
<INPUT TYPE=submit value=\"$id\">
Using Javascript something like:
would find the field value for idCode: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
Make Real Green with ORGANIC SEO | Blog post exchange | Non-index page trades | A-B C-D Trades [icq: 194-215-962] [mail: [email protected]]Comment


BUY MY SIG - 50$/Year
Comment