Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help

Featured Replies

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

require "global.php";
$body = new template(TPL_ROOT);
check_login();

if(!$_GET['get_username'])
{
full_error("Error", "There was no username entered in the URL.");
exit;
}
$get_username = secure_input($_GET['get_username']);
$get_username = str_replace("_", " ", $get_username);
$user_query = $mysql->query("SELECT username, user_level, real_name, favourite_clubs, age, short_bio, nationality, second_nationality, positions, register_timestamp, lastlogin_timestamp  FROM users WHERE username='".$get_username."'");
if($mysql->num_rows($user_query) < 1)
{
full_error("Error", "There is no user with the name of, <strong>".$get_username."</strong>.");
exit;
}
$user_results = $mysql->fetch_array($user_query);
$title = $user_results['username'];

$body->set('user_results', $user_results);

$tpl->set('title', $title);
$body->set('error', null);
$tpl->set('body', $body->fetch("view_profile.tpl.php"));

echo $tpl->fetch('template.tpl.php');

$mysql->close();

?>

view_profile.php

view_profile.tpl.php

What page are you accesing an what parameters are you passing in the URL ?

 

If you just access view_profile.php you'll probably get that error.

If you access view_profile.php?get_username=username something should happen.

  • Author
What page are you accesing an what parameters are you passing in the URL ?

 

If you just access view_profile.php you'll probably get that error.

If you access view_profile.php?get_username=username something should happen.

 

hi mihai, thanks for your reply!

 

tbh, even if i put that manually into the url browser, it gives the same error. there is something not quite right about it all, but i have no idea what.

 

ill send u a link to the page and maybe u can decipher what the issue is from there?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.