| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: Leeds, UK
Posts: 263
![]() | Driving me bonkers (simple PHP) Hello. Is it possible to take the end of a link e.g. .com/?id=123 and insert the '123' into the into a field of a registration page using PHP so I can log which users have referred others. Thanks.
__________________ Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre
Last edited by noswad; 05-25-2006 at 10:08 PM.
|
| |
| | #2 (permalink) |
| NamePros Member Join Date: Dec 2003 Location: Oregon
Posts: 110
![]() | It is both possible and easy. If you had x.com/page.php?id=xx and PHP Code: |
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: Leeds, UK
Posts: 263
![]() | Thanks v much!
__________________ Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre |
| |
| | THREAD STARTER #4 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: Leeds, UK
Posts: 263
![]() | Hi I got this working at first by changing the code a little bit but for some reason I can't get it to work any more. Could anyone help me please? Its driving me nuts. David ![]() P.S. The field doesn't have to be hidden although I would prefer it to be
__________________ Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre
Last edited by noswad; 05-25-2006 at 09:53 PM.
|
| |
| | #5 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Merged your threads ![]() Really isn't that hard either.. and would suggest the same as xemiterx. PHP Code: |
| |
| | THREAD STARTER #6 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: Leeds, UK
Posts: 263
![]() | Excellent thanks. One little problem though - If register.php?id=[text] the form is submitting '0' but if the id=[numbers] it's submitting correctly. Any clues? Thanks again
__________________ Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre
Last edited by noswad; 05-26-2006 at 05:40 AM.
|
| |
| | #7 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Ok, I was assuming the 'id' was just numerical, well, you could do the following: PHP Code: |
| |
| | THREAD STARTER #8 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: Leeds, UK
Posts: 263
![]() | Thanks v much. V grateful.
__________________ Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre |
| |