Jump to content

matthijs110

Members
  • Posts

    25
  • Joined

  • Last visited

matthijs110's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sure, LayoutController.php: function head(){ ?> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="author" content="matthijs110"> <link href='//fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> <!-- Bootstrap core CSS --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <!-- FontAwesome Icons --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"> <!-- Bootstrap Core JS --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <meta name="apple-mobile-web-app-title" content="Panel"> <meta name="apple-mobile-web-app-capable" content="yes"> </head> </html> <?php } ?> And in my profile.php:
  2. Hello, I've made a function that contains the html header (<head>). When I call that function in a other file, with the header file included, it puts the header function in the body. So all the meta tags are in the body, instead of the head. Would it be possible to load this all in the head? The head function does contain the html and head tags. However, without them, it still doesn't want to go to the head.
  3. Hello, How can I select multiple SQL tables? For example like this: $result = mysqli_query($con, "SELECT Username, Wins FROM Table1, Table2 ORDER BY Wins DESC"); I want to use it in 1: while ($row = mysqli_fetch_assoc($result)) { I know this is possible, but I can't find a clear way.
  4. Hello all, I made a table last night and was wondering: How can I get the latest NEW row from the SQL, put it on the place of Member1, move all old tables 1 to the right, and remove the latest table (Member 20). Its a bit hard to explain, but hopefully you know what I mean
  5. I tried multiple staff to convert the arguments to friendly URL's. It doesn't seems to work. Mod_rewrite is enabled in Apache <IfModule mod_rewrite.c> RewriteEngine On RewriteRule /(.*)/$ player/index.php?user=$1 </ifModule> I moved some stuff, thats why player and index.php is there. You can see it here: https://github.com/matthijs110/Minecraft-User-Info
  6. I just tried PDO with the link you gave. when I use it, the variables I made can't be reached anymore because some are in functions. But I will look into this when I got the code finished and try to make use of it, Thanks for the info about it, never heard of it. I got it working now member.php?user=matthijs110 is printing the right info now. When a user does not exists, it returns User not found! as it should for now Now my last question that follows (and no its not new problem, I asked it in my first post ) How would I convert: http://localhost/Minecraft-User-Info/member.php?user=matthijs110 To http://localhost/Minecraft-User-Info/user/matthijs110
  7. So like this? $data = mysql_query("SELECT * FROM Player_Data WHERE Username = {$MCUser} LIMIT 1;"); if ($data === false) { trigger_error(mysql_error(), E_USER_ERROR); } Its giving a other error indeed. When I browse to: member.php?user=matthijs110, it gives me this error: Fatal error: Unknown column 'matthijs110' in 'where clause' in /Applications/XAMPP/xamppfiles/htdocs/Minecraft-User-Info/member.php on line 19 Line 19 = trigger_error(mysql_error(), E_USER_ERROR); And this when going to member.php?user=username: Array ( [0] => matthijs110 [username] => matthijs110 [1] => 72bc0e6c93da4bacaa9b680936c4bd82 [uUID] => 72bc0e6c93da4bacaa9b680936c4bd82 [2] => IPHidden [iP] => IPHidden [3] => Owner [Rank] => Owner [4] => 12 [Tokens] => 12 ) I changed my IP address to IPHidden. How would I fix this? What comes after =, should be searched in the SQL database column: Username. If it has been found, it should return the other data ( I know how to do this). If it isn't found, then go back to the home page.
  8. I use the or die(mysql_error()) When developing the webpage. If its all done, I remove it because I don't expect issues. Outside of that, I actually appreciate the copy paste. Don't worry about learning it, I understand the code when I see it pretty quickly. Mainly because I code Java too. But I'm not saying you aren't right.
  9. When I do this, it results something, I used member.php?user=username. like you said, but then it returns: Array ( [0] => matthijs110 [username] => matthijs110 [1] => 72bc0e6c93da4bacaa9b680936c4bd82 [uUID] => 72bc0e6c93da4bacaa9b680936c4bd82 [2] => IPHidden [iP] => IPHidden [3] => Owner [Rank] => Owner [4] => 12 [Tokens] => 12 ) I changed my IP address to IPHidden. When I go to member.php?user=matthijs110, It returns: Unknown column 'matthijs110' in 'where clause'
  10. Okay, I tried it, and it kinda works This is my code so far: https://github.com/matthijs110/Minecraft-User-Info/blob/master/member.php But when I go to: http://localhost/Minecraft-User-Info/member.php?MCUser=about It returns: Notice: Undefined index: Username in /Applications/XAMPP/xamppfiles/htdocs/Minecraft-User-Info/member.php on line 2 This is the home page How can I fix this? And how can I check if the parameter that is given in the URL exists in a database row?
  11. I do this on the index.php file or member.php ? btw, I'm going to make this without login/register possibilities. I got a other way to push info TO the MySQL database.
  12. Okay, I'm stuck now. I just don't know how to get that parameter after the member.php :/
  13. I do know how to get info from the Database. How do you mean: for the name from the URL?
  14. The only code I have is a login/register page that works fine after you registered. I don't know how to do that what you said I have to do. Thats why I'm asking it here. But here is my code with the working login/register code: https://github.com/matthijs110/Login-Project
  15. Ah right, you make exactly clear what I mean So my question follows: How would I do that?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.