₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,066 members, 8,424,817 topics. Date: Thursday, 11 June 2026 at 04:37 PM

Toggle theme

Pak's Posts

Nairaland ForumPak's ProfilePak's Posts

1 2 3 4 5 6 7 8 ... 25 26 27 28 29 30 31 32 33 (of 58 pages)

Art, Graphics & VideoRe: Kelvin Okafor's Truly Amazing Drawings by pak: 7:59am On Jan 31, 2013
Shollypopz: The Rhianna's pic is a drawing?! I need to show my friend this, what number of pencil did he use for her jeans? Are u sure a Lil "editing" is not involved??
I'll go with you on this. This guy is soooooooooo good, it gets too good to be true.

This is the most amazing talent I've seen in years
CultureRe: Scarification In African Cultures by pak: 9:24pm On Jan 30, 2013
THIS SHOULD BE STOPPED IMMEDIATELY....

Of what benefit is such practice in this time and age ?

I marvel at Africa, our inability to know what to promote, what values to follow and what cultural practices should be abolished.

It might be understandable if someone in the 18th century blasts his child's face with tribal marks but in this age, how in this world will that be of any benefit to that child ?

And in some cases (many cases actually), children with tribal marks end up being susceptible to inferiority complex on the account of their looks.

Please anybody planning to scarify his child face should please refrain. When the child is old enough, if he's so much in love with marks on his body, he'll simply get a tattoo
SportsRe: Is Keshi's Eagles The Worst Nigerian Team Ever ? by pak(op): 2:24pm On Jan 30, 2013
Jarus: I was about saying here was a team with 17 out of the 23 players never featuring in AFCON before. But then I remember Ghana came to ANC 2010 with their under-20 boys and stipped reached final, pipping Nigeria along the way.

My own belief is that Nigeria doesn't have quality talents again. Just a bunch of average players we hype.
Adding insult to their injury, other African countries are improving.

Now, is it the worst? Comparatively, it is. But I don't think they are irredeemably bad. They have the potential. I still don't rule them off yet.

I can't bank on them, but when I remember what these guys are capable of doing, I get some relief:

Mikel has played and made impact at the highest level: UCL final
Moses dazzles in EPL, arguably the best league
Musa dazzles in Russia, scoring up to 10 goals already this season
Uche the typical La Liga player - skilful
Ambrose may not be in the league of the Kolo Toures but is gradually coming up and did well in UCL, against - wait for it - Messi's Barca
Enyeama has stopped even Messi in the past
Ideye proved himself in Fench ligue 1, scoring up to 15 league goals, doing same in Ukraine
We also all know what Emenike can do


When I look at all these, it becomes difficult for me to write off these boys
I absolutely love your comments but it should be noted that a team is not just about the players but also the tactical formation they are made to play in as a group.
ProgrammingRe: Your Future As A Software Developer by pak: 10:31am On Jan 30, 2013
2buff,

I wish every young programmer will read your article.

The story mirrors mine (infact, at some point, I thought you might have been talking about me).

At the end of the day, I had to quit the company and start my own establishment.

Also, that stuff about your course of study was exactly the same reason why I studied computer Engineering.

Before gaining admission, I almost had enough to function has a software developer in the Nigerian Market so I personnally felt that Comp. Eng. will at least give me a leg in the Engineering side of things. Which it did.

Though, I ended in software development, if not for funds and other limitations, I defo would have preferred to delve into embedded circuits
SportsRe: AFCON 2013: This Is One Of The Best Teams To Represent Nigeria - Keshi by pak: 10:22am On Jan 30, 2013
If this report is true, then mental/psychological tests should be a basic requirement before hiring any National team coach.
SportsRe: Is Keshi's Eagles The Worst Nigerian Team Ever ? by pak(op): 10:17am On Jan 30, 2013
jhydebaba: KOREA/JAPAN 2002 Onigbinde's team was not in ur list.


In my view, this is the worst Nigeria ever presented but I believe in miracles. When we least expect, God can make things happen.
Thanks for your observation Jide.

... ..but then, I do not believe in this your kind of miracles. Are you trying to insinuate that the ivorians are pagans ?
SportsRe: How Do We Play Cote D'ivoire - Suggestions And Advice by pak: 9:39am On Jan 30, 2013
maclatunji: I was going to create a thread for this.

To beat Ivory Coast, the Super Eagles have to adopt the 4-4-2 formation at the beginning of the match. Play a very high line in defence (Yobo should lead the line), then play Mikel, Igiebor, Moses and Emenike as your attacking quartet. This four will press the Ivorians from their half when they are without the ball and will strive to score a goal or two as early as possible in the game.

The orientation of this line-up is attacking through the middle. The Ivorian defence is its weakest link, we need to run at them without fear. The objective is to put the ball in the back of their net as many times as possible not to look at their names or faces.

Once we score and can defend it into the 2nd half, we will change the formation into a modified 4-3-3 formation. It will be 4-4-2 when we defend and 4-3-3 when we attack, at this point the Ivorians will be tiring. We must exploit the spaces at the back of their defence.

Defence
The essence of playing a high line in defence is to use the offside trap as best we can. The Ivorians will have a few chances when they beat the trap but I expect quick recovery times from our defenders and a world class performance from our goalkeeper.

Penalty Kicks
Our team needs to be proficient at taking penalty kicks whilst Enyeama has to get better at stopping them. Players who don't know how to take penalty kicks should be taught how. The easier way to succeed as a penalty taker is to watch the movement of the goal keeper and place the ball in the opposite direction, blindly kicking the ball will mean a higher chance of you missing it or the keeper saving it.

The Ivorians have not won the African Cup of Nations since 1992. Why? Other teams have defeated them, the Super Eagles can do the same. tongue
Oga Tunji, You're making me laugh in swahili. .. .

Is this a description of how to prepare fufu ?

Admittedly, you made a good analysis but all these means nada in the face of the elephants.

Nigeria can only win if the Ivorians are not prepared or decide to give the match away.


and about the High defence line, I hope you remember that such a tactic can only work with highly intelligent and quick defenders who have a good understanding of one another. . . . .

Even Chelsea had a problem adjusting in the VIlla Boas era not to talk of a Super Eagles team that has not played up to ten matches together.


I will advice you as a friend, to just get a good drink and relax in front of your couch on Sunday with no expectations whatever on your mind
SportsIs Keshi's Eagles The Worst Nigerian Team Ever ? by pak(op): 9:21am On Jan 30, 2013
I saw the second half of the game against Ethiopia and though we eventually got two goals.
The match left a bitter taste in my mouth.

I could not believe my eyes as a 'Ten Man' ! Ethopian !! side ran the eagles

ragged in the latter part of the game. The hapless 'stars' could not string

even half decent passes together and Ahmed Musa seemed incapable of

controlling even the simplest of contacts with the ball.

It got me thinking - Is this the worst super eagles squad of all times ?
I'll say most likely.

I've been following the SENIOR national team actively and 'live' since 1988.

and I since then, we've put out squads for 14 different tourneys

MAROC 88
SEOUL 88
Algiers 90
Senegal 92
Tunisia 94
USA 94
King Fah'd Intercontinental 95
France 98
Nig/Gha 2000
Mali 02
Tunisia 04
Egypt 06
Ghanna 08
ANgola 2010

Of this lot, I'll say 3 of the teams can be described as 'absolutely terrible' - SEOUL 88, Ghana 08, and Angola 2010. WIth Berti Vogts' 08 side taking the top (or is it bottom) honours.

However, having seen this side play 3 matches, I am of the opinion that Keshi's team actually sinks Nigerian football lower than Vogts.
In the case of Vogts, we lost to a ten man Ghanian (Giants of African soccer) side who were playing in front of their home fans but Keshi has no excuse for being outplayed by Ethiopa ! None at all.

Most likely come sunday, after the quarter final, we will all wish we never even qualified in the first place.

So the question is, do you agree that Keshi's side is the worst Nigerian team ever ?
SportsRe: Parody Eboue Account Taunt Nigerians On Twitter by pak: 9:19am On Jan 30, 2013
This reminds me of the case of the lizard and a crack in the wall
EducationRe: 116 UNN Students Bag First Class Degrees by pak: 3:24am On Jan 28, 2013
Musiwa, I will only agree with your arguments on one condition !

If you can get satellite pictures of UNN and Unilorin side by side to prove your points.

Pictures of buildings are not convincing because they can easily be manipulated but satellite pictures are more all encompassing.

So do yu agree to post the pictures and settlr this issue once and for all ?
Car TalkRe: "Servicing The Injector Nozzles" - Meaning In Nigerian Context? by pak: 12:56am On Jan 23, 2013
Ogojohn: DOES IT MEAN THEN THAT THOSE 93 MODEL CARS THAT THROW CHECK ENGINE LIGHT ARE NOT OBD COMPLIANT?
pak: OBD II compliance started circa '96
Note the bolded
Car TalkRe: "Servicing The Injector Nozzles" - Meaning In Nigerian Context? by pak: 12:15am On Jan 23, 2013
Ogojohn: what year of manufacture is a car known to be OBD compliant?
OBD II compliance started circa '96
Car TalkRe: "Servicing The Injector Nozzles" - Meaning In Nigerian Context? by pak: 11:28pm On Jan 22, 2013
Ikenna351: Na wa o! I don here am today!

Let me try again.

The component on the engine called Fuel Injector, your mecho /clown or Nigerian mechanic calls it Nozzles. It is on this thread that i realised that they have upgraded it to injector nozzles, which is not even closed. I will explain.

Again, the component on the engine called Throttle body, your Nigerian mechanic calls it Injector. When you open your bonnet, you will see something that looks like a cylinder, the tube from AirFilter box connects to it. The throttle body is mounted on the intake manifold, likewise the injectors. Let me not confuse you more. Will leave it at that.

Now, the new name "injector nozzles" means: the nozzles of the injector or the nozzles on the injector. What they mean is " the injectors of the throttle body or the injectors on the throttle body". Unfortunately, the injectors are not mounted on the throttle body (except the cold start injector), they are mounted on intake manifold, the same way throttle body is mounted on the intake manifold. Each of the components does it own work, though dependent on each other to make the engine run (mixture of air & fuel in intake manifold). That is, injector brings in fuel in intake manifold, while throttle body brings in metered air into the same intake manifold, where the air and fuel now mixes and then goes into the combustion chambers via intake valve.

Now, would you say because the uninformed people call Vulcanizers "Forkniser" and you call them the same because that is what everyone is calling it?

Ikenna.
Fantastic elucidation.

You really tried bro !
Car TalkRe: "Servicing The Injector Nozzles" - Meaning In Nigerian Context? by pak: 11:11pm On Jan 22, 2013
ldpele: @siena am so sori for comin across d thread late,but i rili need ua help, i got this diagonsing machine(ads 1;automatic diagnosing scanner) from the US,bt have been unable to use it,my friend that helpd me secure it has told me he used it over there,and i av made contact with the makers of it severaly. what the chinese guy is suggest is i use a VISTA processing system,that window 7 which am currently using znt compactable wit the operating software of my scanner. we cn mke do wit this email if u oblige. akasat@live.com. wil rili appreciate
Bros, using diagnostic machine is not rocket science. You didn't actually state what problem you are having. Are you trying to use an OBD II device on a non compliant car or the reverse.
What's the issue you are having with operating system and all this what's not.
Have you successfully plugged the device in your OBD 2 port, have you been able to take any readings ?

Maybe when you let us know what exactly the problem is then it will be easier to assist.
Car TalkRe: "Servicing The Injector Nozzles" - Meaning In Nigerian Context? by pak: 7:51pm On Jan 22, 2013
@Ikenna,
I was quite surprised when you cautioned against the use of fuel injector cleaners. All along I've been told its a good practice to at least do so once a month so much so that I actually have a 'reserve' bottle in my car all the time.

First off, I travel a lot and I start to panic when my car passes the half tank line so I don't think I ever driven my car on reserve tank, not even during fuel scarcity.

two, I only use one type of injector cleaner, can't remember the name but its green in colour and I make sure I buy from NNPC mega station (in Jos) to avoid being sold fakes.

three, my fixation for that type of injector cleaner came over a year ago when I used the cleaner after buying a full tank. Believe me bro, I immediately noticed significant gains in fuel consumption and I wasn't just imagining things, I actually have a scan gauge fixed in my car that monitors fuel consumption in Km/ltrs for every trip. Right now, I have purchased a total fuel injector cleaner to be used on my next refill (since I can't get my preffered choice).


Also, many of the sites I checked actually recommend periodic use of fuel injector cleaners like the one below
http://fuelinjectorcleaninginfo.com/


Please will you care to shed more light on your stance for the education of forum memebers
SportsRe: The Price For Live Transmission Of AFCON Was High - Maku by pak: 6:31pm On Jan 22, 2013
Maxymilliano: Why We Couldn't Pay For Live Transmission Of AFCON 2013 – Maku


He said that broadcast stations would have ran at a loss because no telecommunications company would have advertised knowing that this year’s Nations Cup was sponsored by Orange, also a telecommunications company.  

http://www.vanguardngr.com/2013/01/why-we-couldnt-pay-for-live-transmission-of-afcon-2013-maku/
Excuse me sir, how come MTN is advertising prominently on DSTV during the live telecasts of the AFCON ?
SportsRe: Nigeria's Draw Against Burkina-Faso, Who Do You Blame? by pak: 8:37am On Jan 22, 2013
bennyraz: getting the job done is the most important thing even if the play isn't good. Amodu did just that.The only problem we had was, Amodu in his style, sits quitely on the coach's bench and start to chew kolanut.. He would sit all through the match and We never wanted this. In fact, i expected Amokachi to pass out instruction yesterday but he kept mute.. Atleast we know Amokachi is a football pundit or didn't he see what his boys were playing? Or was the syndrome of easy to talk hard to do working against him?
were !!!!! grin grin grin
SportsRe: Player Rating: Nigeria Vs Burkina Faso by pak: 8:21am On Jan 22, 2013
The funny thing is, If I had the opportunity to be eagles coach, I would only have started just 1 of the outfield players - Mikel.

And even then, I will ensure he sticks to one touch football. His (lack of) pace suppresses Nigeria's fast attacking abilities.

I certainly wont be playin ambrose, Yobo, Obajana(or what's is name again ?) and elderson in defence.

No Nosa or Ogude in midfield

and though, I'll admit the attack wasn't that bad but fitness issues aside my selection for the fron three would have been

Moses, Anichebe, Uche
FamilyRe: Why Do Parents Send Their Kids To Boarding Schools? by pak: 4:03am On Jan 19, 2013
jidegirl12: Loyola college Ibadan, st. Patric's , ISI , ohhh goner those days early '90s grin grin listing to Keith sweat ummmm reminiscing grin
. . .then you're younger than I thought.

In my Jss 1, the vogue then was arrested development (loved everyday people to bits), boys 2 men, MC hammer and Bobby Brown. Keith sweat didn't have his break through yet.

On the local scene, there was this - 'sotey you carry O - e belle' song, one very razz song but gained a lot traction.

The good ol days of FGCID
PoliticsRe: Gombe Governor Involved In Auto Crash by pak: 1:56pm On Jan 18, 2013
holyvirgin: Are you alright? How comes you are the only one who keep saying the road is bad?
Men yola-gombe road is purely a smooth road without potholes. Billiri, cham road that use to be a bad road has been awarded and maintained by ferma since last year.
Next time try and travel by road, using a boat is not same as car...
The lord our God is a good God. By the grace of God. I'll be leaving Yola for Gombe tommorow. And for the first time. I'll take full pictures for all to see . . . . .
PoliticsRe: Gombe Governor Involved In Auto Crash by pak: 11:06pm On Jan 17, 2013
kutchs: Just shut ur bucal cavity and stop spreading lies on a public forum.

Honestly the way u guys lie on nairaland makes me wonder why Nigeria hasnot broken up. Yola-Gombe rd is unarguably one of the best roads in the NE zone if not Nigeria.
Mind you I travel on that road at least once a week.
bros lets not get insultive here but am beginning to wonder if something is not going wrong on Nairlaland tonight.

Yola - Gombe Rd good ? Holy Cows. (Hope you're not confusing this road with Gombe-Bauch ?)


Have you ever passed through the strecth of road that's about 50km before Numan ? Where you cant even drive faster than 30km/hr. Where even FERMA had to put signs - one reading 'drive carefully -road washout ahead' or is it the massive craters on the part thats close to the school of remedial studies that we want to talk about. What about the road along Akko, Biliri and Kaltungo ? I am shocked at the responses am receiveing about the most horrible road I have travelled in yet in Nigeria.
PoliticsRe: Gombe Governor Involved In Auto Crash by pak: 9:55pm On Jan 17, 2013
KokoBeware: That road is actually a very good road.....it might be time to introduce and enforce speed limits...
holyvirgin: The yola - Gombe road is in a good shape now, it was repaired last year. I just came back from yola yesterday.
The road was not the cause, read the article again
What in the world are you talking about ?

I travel to Yola at almost every month and I'm presently in Yola. That road has got to be the worst in the world !!!
CelebritiesRe: A Recent Photo Of Azadus by pak: 3:51am On Jan 17, 2013
youngbilly1: I couldn't believe my eyes seeing AZADUS in my area, Isheri-Oshun, Lagos. O boy this guy don crash gan oooh....
@poster,
This place looks more like 'ishefun oshin' ?
Car TalkRe: Oba Of Ugbo Is The First Black Man To Own A 2014 Bentley by pak: 3:42am On Jan 17, 2013
Let me debunk some common myths has evidenced on this thread,

Ugbo (just like the entire Ilaje) is an oil producing community.

OBAT's wealth has little do with him being an oba or the olugbo (the crown is not even a first class traditional title). He is a business man (This not in any way vouching for his integrity).

As for those saying Ilajes are one of the poorest set of people in Nigeria, you can't be 'wronger'. My paternal grandmother is from Ugbo Kingdom and I can tell you there are lots of illustrious people - businessmen, lawyers, politicians et all from the place.
The reason why the entire Ilaje kingdom seem a bit underdeveloped is because of the difficult terrain. If x million naira can be used in carrying out a developmental project in say Akure, you will need 5x million to do same in Ilaje but despite this, things are happening albeit a bit slowly.


As regards the issue of the car, I am not really a fan of ostentation but just like sienna, I'll say it's his money not mine.

At least he's better than the actors/musicians who buy bentleys and the likes while supposedly earning 100k/200k from shows or the actress who earns about 100k per movie but ends up buying a 2012 range rover.

And as regards developmental projects, OBAT has actually, in his little, way tried to contribute to the development of his people. he was influential in the procuring of a 19 billion naira road project a while back at Ugbo. You can check out this site below to see for yourself.

http://ilajeeseodo.com/pages_ugbonla.php

http://ilajeeseodo.com/photo_gallery.php?gallery=ugbo_oghoye

(obat is the man by the far right in white agbada beside mimiko)
SportsRe: Lance Armstrong Admits To Using Performance Enhancing Drugs by pak: 12:07pm On Jan 15, 2013
. . . . .The most shocking was not just that he took PEDs but the way he vehemently denied it even after being caught. such nerve !

This guy is fit to be a Nigerian politician !!!
Christianity EtcRe: Quote Me, Pastors Use Juju To Hold Their Members! --- Guru Maharaj Ji’s by pak: 8:14am On Jan 15, 2013
loabb2: Are you saying that pastors use juju?

Yes. Quote me: all of them use juju. How can a pastor touch somebody and he falls down? That one is juju at work. Our people are very foolish and ignorant. How can you touch somebody and he falls down? There is something behind this.

Today, we are in a world of falsehood. And if you look at what is happening, you wouldn’t blame the pastors, you would blame our law, which is lax. I said this because if some of these pastors that have been duping people had been brought to book, there would have been sanity. These pastors that are pushing people down, and are saying they are healing them, they should tell us the source of their power. If, as a pastor, you receive your power from Ifa, Ogun or Orunmila, and you are giving credit to another person, this means that you are a saboteur. You are in actual fact a murderer because you are robbing Peter to pay Paul.

Is it true, as some people have claimed, that some religious leaders often come to your headquarters here in Ibadan to consult you?

It is true. At times, they send their representatives. But I clearly remember that the General Overseer of Deeper Life Bible Church, Pastor William Kumuyi, came to see me at our Lagos headquarters in Iju, Lagos, sometime in 1987. It is a public place, he was there, and people saw him. But he went back, never to come back to fulfill his promise to come for knowledge. And without knowledge, there is no way anybody can make it


http://sunnewsonline.com/new/specials/icon/guru-maharaj-jis-bombshell-quote-me-pastors-use-juju-to-hold-their-members/
If Kumuyi has not 'made it' then who has ?
ProgrammingRe: Redirecting Back To Original Page After Login. by pak: 8:10am On Jan 15, 2013
spikes C: Thats good, i have understood your concept.
But actually differs from what i thought you had in mind.

i would have loved it if the entityClass is the only one who knows what your session names are.
Therefore, you have only one place to edit the names if need be.

example

class entityClass(){

private $user_id = 0;

private function __construct($entity_id = 0){

//the user probably checks for login before this
if($entity_id = 0){$this->user_id = $_SESSION['USER_ID'];}

}

}

example methods:
$entity = new entityClass();


$entity->get_id();
$entity->get_personal_details();
etc.

therefore, based on this your code.



I did rather just

$entity = new entityClass();

or

$a_different_entity = 2;

$entity = new entityClass($a_different_entity);

So, if it's a group development (which is the point of OOP lipsrsealed )

No developer would include the $_SESSION variable in his code, except ofcourse, he knows what he's doing.




Finally, thanks for your tutorial. Really appreciate the time and effort. PHP lives on wink

SEUN, pls give us a CODE tag.
Makes sense . . . . .
ProgrammingRe: Redirecting Back To Original Page After Login. by pak: 11:32pm On Jan 14, 2013
spikes C: Still makes a lot'a sense, seriously, you're teaching me OOP grin
But lets have an example, there's one class which cannot follow this rule. The session setter class(basically the login class. it needs to set the needed sessions, right?).
But maybe, as you might be thinking, the names and values of the sessions should be passed to a session setter class.
***I need your comment on this***
Coding techniques differ. and different frameworks might implement things in diff ways.
Where I work, we use an in house developed framework for our apps.
In php for example, a loose code sample to deal with sessions might look like this in my app

to set

auth_obj = new testingClass(username, password) ;

$session[entityid] = auth_obj->getValidLogin() ; //techniques differ but here a value of 0 indicates invalid login, a value represents valid login and id of the entity



---------------


to retrieve user details after validating successfully logged in user on each page

$entitty_id = $_SESSION['entityid'] ;

$entity = new entityClass($entitty_id ) ;


// now with your entity object instantiated as local to your code, you can have access to any info you want about the entity without overusing sessions.

Just my two cents - more consistent, neater, easier to maintain



For brevity sake, i ignored stuffs like sanitizing inputs and so on . .. . .
ProgrammingRe: Redirecting Back To Original Page After Login. by pak: 10:28pm On Jan 14, 2013
I agree with most of what you wrote bro . . . .
but let me point out the parts I don't agree with.


spikes C: Yes, super globals are highly avoided but this can be wrong. There're a few basic things i store in my sessions.

.The logged in User's ID.
You can't actually get this variable from database without doing another username|password login (very bad to hold a user's password)

.The logged in flag (e.g $_SESSION['LOGGED_IN'] = TRUE)
.The logged in user's account status(e.g $_SESSION['ACTIVE'] = TRUE)
.The logged in user's email validation status(e.g $_SESSION['EMAIL_VALID'] = TRUE)
.The logged in user's username (e.g $_SESSION['USER'])if this is highly used around the application

Others might be unread messages count, unread notifications count etc.

The above are variables you use on every page load, do you expect someone to keep getting those data from the DB everytime.
Yes i do, when it is neccessary. Most of my codes use OOP technique. I am more comfortable dealing with object properties and methods. I'll rather have the logged in user as an object. It just makes your coding easier thru the life span of your app. E.g. a point might come when you might need to have access to a user whose id is coming from another source - e.g from post or as a output of some other computational activities. Just plug in the id to your class and you're good. Or maybe some unique situations/modules where you have two different entities you are dealing with at a time. Just create two instances and your data is better managed.



The OOP/reusable code problem. actually people don't use session variables in distributed codes, unless the particular module sets and uses it. You don't expect a session management class or even a login management class not to set, use and insert $_SESSION variable in their code....(maybe am misunderstanding you here)
I keep telling ma peeps , never set/use sessions IN your classes. (The operative word here is IN). If your session needs to interact with you class. Let them be introduced as ARGUMENTS not in the class/method definition itself but rather in the code that calls the methods. That way the modularity of your code is preserved.


Now, i think you're misusing setting cookies and setting sessions.
My chairman, if the browser doesn't return the session ID, PHP will not identify the user, and your application will ask the user to login again.
Via setting cookies, always check if your cookie is set first and sanitise the returned value before using it.
You just dont get what am trying to explain here . . do you ? lets just let this one lie . . .


Exactly, store only IDENTITY. cool

This part makes a whole lot'a sense and i can tell you, am guilty of this crime a few times (I think just once, am still trying to refactor that code)
I believe, that sessions should be used to store only sitewide/general application data
(e.g user's prefered display language, user's ID, logged in details)
Not modular application's variables (with exemptions like variables needed on every pageload (USE NAMESPACING))

But lets talk practical.
Database: the biggest problem in application development. DB is costly, very costly...this is why most developers store slightly reusable variables in sessions. Something that might be used only on even 2 or 4 seperate pages.
It's like debating DB normalization. In theory, it should be, practically, na your server go hear am grin

Another thing is documentation. A very important thing that is always left out.
It doesn't take much to describe what your super global variables are, when they're set and when they're used
I agree with initial part of the last paragraph but the bolded ? . . . .

well constructed Classes are far easier to documented, PHPDOCS anyone ?

secondly, when you have an app with over a 1000 files, where do you start from in trying to locate where a session is set? and when they are used ? especially for those that set sessions indiscriminately in codes, which I am against.
But with classes your variables become local and you know where all your properties and methods are defined - in the library
ProgrammingRe: Redirecting Back To Original Page After Login. by pak: 9:14pm On Jan 14, 2013
spikes C:
i don't really think you understand what sessions are... do you mean setting cookies?


The only thing that ur browser knows about the session is your session ID.

and seriously, i don't actually understand why you're saying classes and DB against sessions. Pls, if possible, can you show me a sample code. Don't be offended, i really want to understand, I believe we all are learners
Sure I don't . . . .


How would I explain this . . . . .

1. global vs local - Its advisable to always use local variables as opposed to globals when you can (we shouldn't be going thru this again man . . ) Sessions are 'super globals'.

2. code reuse/ modularity - I have seen cases where sessions are used inside functions and classes. I find it gross. The idea about modules is to ensure they can be used in several places and application when needed. If I do not have the same session bank as the module you were working on when developing the said class/function. then I'll be stuck reusing the said class in my module. I have had to refactor a lot of (other people's) code with this problem and it wasn't a nice experience

3. The browser issue I talked about involves a situation where some browsers store session information across every open tab while some don't. Yes, some versions of IE and some other browser actually keep session information on different tabs seperate. So if information about the current user is stored in a session, things can get quite messy. believe me I have been there. The issue is that with local variables you have ABSOLUTE control over how your variables are passed around.

4. Classes/DB - Best practice, IMHO is to only use sessions to store the IDENTITY of the current user/state. Info about the user should be retrieved from DB and preferably stored as an object. You get neater easier to maintain codes that way and most importantly. Variables don't just jump at the developer from anywhere . Don't u just get mad when you're working on someone else's code and you just start to wonder where a var suddenly appears from/ where it was set. Thats the 'effect' of session misuse. You just get variables lying around in your applications without knowing how they got there or what they hold. Making teamwork a nasty experience. Even with register_globals off. Its still sickening to have a session value being used in application without knowing exactly how it is set. As I said above best practice is to only store the IDs and use classes/DBs to fetch other info you need. This ensures that all the variables you are working with are actually local to module you're working on at that time.

I'll stuggle to explain better than this really . . . .
ProgrammingRe: Redirecting Back To Original Page After Login. by pak: 3:58pm On Jan 14, 2013
@spike, you are right - request_uri instead of php_self.

As regards session, I don't even know where to start.


Programming is all about CONTROL - avoid global variables if and when you can, and much more super global variables if and when you can. Many programmers don't know this but your browser actually determines how session variables are stored. Some pass sessions between tabs and some don't - so much for control undecided

Sessions was introduced to counter the statelessness of http not to act as an information bank, the way most applications end up using it.
Misuse of sessions affects reusability and code maintenance. Make better use of your classes and DB.

1 2 3 4 5 6 7 8 ... 25 26 27 28 29 30 31 32 33 (of 58 pages)