![]() |
| ||
| Linking username to profile... 2 Attachment(s) Posting this for a friend here is his question... Thanks in Advance. hey, this is my first post on these forums, i have just started learning php after doing no coding whatsoever for a while. i have to successfully get past this first, so here goes. i have a site, where you login in, and then i want to show stats (name, favourite football club, games played, goals scored etc) i have this file called view_profile.php that then links to view_profile.tpl.php. the error im getting is 'There was no username entered in the URL.' I think all that need to happen is for it to get the right username that your logged in under, but this is not showing it, can someone tell me what is missing? Also, if you fancy helping to complete this website, and play fifa 08/09, please give me a shout <?php |
| ||
| Re: Linking username to profile... Anyone? Please? |
| ||
| Re: Linking username to profile... copy the url from the address bar and post it and I'll tell you what is wrong. |
| ||
| Re: Linking username to profile... Hi there, I believe the problem here is this may not be entirely your system (correct me if i'm wrong here). If you've just started coding PHP, as you've stated, I doubt you'll have reached templating or advanced security coding like this. However, the problem lies in the following statement: if(!$_GET['get_username']) The page is expecting a GET parameter named "get_username", which means your url should look like this: view_profile.php?get_username=heenix As a side note, .tpl.php or .tpl files are usually Smarty Template files so I'm not sure as to why you would want to link to them? Christopher Lord. |
| ||
| Re: Linking username to profile... The above posters are correct, it's looking for a variable passed to it through the address bar. If this is user data make sure you that the function "secure_input()" is properly sanitizing the information. What php functions is this function using? |
| All times are GMT -4. The time now is 3:21 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC