Well, when you log a user in, you set some values in $_SESSION, do you not?
You need to grab the users ID from your Database and insert it into $_SESSION['uid'], otherwise you have no value in $_SESSION['uid'], and trying to grab a value from a variable with no value isn't the easiest thing to do.
Search found 1179 matches
- Sat Jun 15, 2013 9:36 pm
- Forum: PHP
- Topic: Session Uid in A href
- Replies: 12
- Views: 7941
- Sat Jun 15, 2013 9:20 pm
- Forum: PHP
- Topic: Session Uid in A href
- Replies: 12
- Views: 7941
Re: Session Uid in A href
That's because you don't have a value in $_SESSION['uid'].
Where are you storing the logged in user ID?
Where are you storing the logged in user ID?
- Sat Jun 15, 2013 7:01 pm
- Forum: PHP
- Topic: Session Uid in A href
- Replies: 12
- Views: 7941
Re: Session Uid in A href
Oh, that would be really simple :P <a href="Profiles/profile.php?uid=<?php echo $_SESSION['uid'];?>"><i class="icon-user"></i>Profile</a></li> If you have the users ID stored in $_SESSION['ui'd], and your profile.php page is located in Profiles/, then this will work.
- Sat Jun 15, 2013 4:54 pm
- Forum: PHP
- Topic: Session Uid in A href
- Replies: 12
- Views: 7941
Re: Session Uid in A href
$_SESSION['uid'] will always be the ID of the currently logged in user, so using that in your url will be the equivalent of a "My Profile" link. I.E it will always take you to your own profile. There are a multitude of ways to get an id into the url, but I'm gonna need more info on what yo...
- Sat Jun 15, 2013 4:50 pm
- Forum: General Chat
- Topic: Minecraft!
- Replies: 29
- Views: 23705
Re: Minecraft!
Sweet :) I'll have this set up for the next weekend. Hopefully I'll have time to play then. My life just got super hectic. The next two weeks at least. Trying to get my driving license, so I'll be doing that 12 hours a day 5 days a week for two weeks, as well as moving apartments the 29th & 30th...
- Fri Jun 14, 2013 9:28 pm
- Forum: General Chat
- Topic: Minecraft!
- Replies: 29
- Views: 23705
Re: Minecraft!
It would be whenever everyone has time
Not going to take this too seriously.
Playing through the entire mod is a real adventure taking hundreds of hours, so I'm not expecting us to finish it

Not going to take this too seriously.
Playing through the entire mod is a real adventure taking hundreds of hours, so I'm not expecting us to finish it

- Fri Jun 14, 2013 2:24 pm
- Forum: General Chat
- Topic: Minecraft!
- Replies: 29
- Views: 23705
Re: Minecraft!
I think we should be at least 3 players to get the most out of it, so if anyone else is game I'll set it upkillfrog47 wrote:hmmmmm I may be a little late but id be down!

- Thu Jun 13, 2013 8:34 pm
- Forum: SQL
- Topic: Deleting nothing
- Replies: 2
- Views: 4152
Re: Deleting nothing
Well, it's wasted computing power. But I don't think it's harmful if thats what you mean.
- Tue Jun 11, 2013 1:53 am
- Forum: PHP
- Topic: SQL sanitation
- Replies: 9
- Views: 2807
Re: SQL sanitation
Try it for your self? 
Everything comes pre-installed, so all you need to do is write the code and run it.

Everything comes pre-installed, so all you need to do is write the code and run it.
- Mon Jun 10, 2013 4:26 pm
- Forum: PHP
- Topic: SQL sanitation
- Replies: 9
- Views: 2807
Re: SQL sanitation
Seeing as MySQL functions are going to be removed in the future I want to switch over. The less maintenance, the better. They are?! That's more than I knew. Also, using the normal file-structure in Jacek's videos, how would I sanitize and execute SQL in function stored in different files? You only ...
- Mon Jun 10, 2013 11:44 am
- Forum: PHP
- Topic: Best way to store user-submitted HTML in SQL?
- Replies: 4
- Views: 1924
Re: Best way to store user-submitted HTML in SQL?
Mysql_real_escape_string would work just fine. You still need to prevent xss attacks and some html tags. You don't want users to be able to use all of the html tags. That could wreak some real havoc on the layout of your site :P If you create a list of accepted tags, you wouldn't even need to clean ...
- Mon Jun 10, 2013 11:18 am
- Forum: PHP
- Topic: SQL sanitation
- Replies: 9
- Views: 2807
Re: SQL sanitation
As far as I know, mysql_real_escape_string is still fine to use since it does the same exact thing as mysqli_real_escape_string or the pdo version of it. Mysqli stands for Mysql Improved. It's a class with everything you need to handle Mysql. It's not too difficult to start using. Take an hour or tw...
- Mon Jun 10, 2013 11:07 am
- Forum: General Chat
- Topic: Minecraft!
- Replies: 29
- Views: 23705
Re: Minecraft!
Jacek did a series on the Aether in 2011.
http://www.youtube.com/playlist?list=PLCA4C502639365ECC
Too bad he stopped. I was actually enjoying it
http://www.youtube.com/playlist?list=PLCA4C502639365ECC
Too bad he stopped. I was actually enjoying it

- Mon Jun 10, 2013 6:40 am
- Forum: General Chat
- Topic: Minecraft!
- Replies: 29
- Views: 23705
Minecraft!
I have a brilliant idea! The Aether II mod for Minecraft is about to be released ( or was just released, I'm not sure ) and I heard that it will have Multiplayer enabled so I had the idea of maybe trying to get you guys in on it. Please let me know if you'd be interested in playing this mod with a t...
- Mon Jun 10, 2013 6:35 am
- Forum: General Chat
- Topic: Temor 1000 post party!
- Replies: 1
- Views: 6231
Re: Temor 1000 post party!
I didn't even notice that myself
Also, thank you

Also, thank you

- Sun Jun 09, 2013 4:25 pm
- Forum: Suggestions
- Topic: Two Factor Authentication
- Replies: 4
- Views: 10619
Re: Two Factor Authentication
I heard through a friend of a project currently in development that allows for two-step authentication through Skype. It would be able to use both the chat function and the call function to send the code.
It sounds pretty cool if it actually works. I'll try to get a link or a name to the project.
It sounds pretty cool if it actually works. I'll try to get a link or a name to the project.
- Sun Jun 09, 2013 4:15 pm
- Forum: General Chat
- Topic: I would just like to thank you all
- Replies: 4
- Views: 7363
Re: I would just like to thank you all
Nice is the only way to be! No one likes a negative person 

- Wed May 29, 2013 10:01 pm
- Forum: Code
- Topic: JQuery Chat
- Replies: 6
- Views: 6492
Re: JQuery Chat
Looking good! I will try this out tomorrow 

- Wed May 29, 2013 9:57 pm
- Forum: General Chat
- Topic: Classes
- Replies: 3
- Views: 9058
Re: Classes
I myself use classes because I want to learn how to use classes properly. Versatility is power... or something.
- Sun May 12, 2013 12:34 am
- Forum: Suggestions
- Topic: Any more?
- Replies: 4
- Views: 5145
Re: Any more?
It's this one:
http://betterphp.co.uk/XHBB/?page=index
I don't think that has been updated since 2011 though
http://betterphp.co.uk/XHBB/?page=index
I don't think that has been updated since 2011 though

- Fri May 03, 2013 12:09 pm
- Forum: Tutorials
- Topic: Blog (including comment) Invalid Post ID
- Replies: 3
- Views: 2640
Re: Blog (including comment) Invalid Post ID
Well, the most obvious place to start would be to check if the post ID is valid. Do you have a post with the ID of 1 in the database?
And are you sure that your table names and whatnot are spelled correctly?
And are you sure that your table names and whatnot are spelled correctly?