GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Manipulating a form field with your URL? (https://gfy.com/showthread.php?t=856084)

Angry Jew Cat - Banned for Life 09-19-2008 01:54 AM

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?

mikeyddddd 09-19-2008 02:50 AM

[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);
would find the field value for id

then use a javascript write to the value into the form:

Code:

<input type=submit value="<script language="JavaScript">document.write(id);</script>">

skinnay 09-19-2008 03:06 AM

make sure you do some input validation while you're at it :)

seeandsee 09-19-2008 04:11 AM

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