Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,158,216 members, 7,836,051 topics. Date: Tuesday, 21 May 2024 at 07:58 PM

Sammyskills's Posts

Nairaland Forum / Sammyskills's Profile / Sammyskills's Posts

(1) (of 1 pages)

Programming / Re: How Can I Create A Listed Link Using Foreachloop In Php? by Sammyskills(m): 8:55am On Jul 29, 2015
thewebcraft:

Yeah Mobile Experience Centre Co-creation Hub @Yaba (a.k.a Silicon Valley)

What are the requirements for joining this "Hub"?
Programming / Re: Is Wordpress Really The Way by Sammyskills(m): 10:51am On Jul 28, 2015
talk2hb1:

Hmmm...............
Drupal my super Content Management Framework. Believe me I could do anything with it.
People just find it too complex to manage.

That should be one of your considerations, when designing for clients who would prefer to manage it themselves.
Programming / Re: Programmer In Bank Vs Programmer In Another Coperate Environment by Sammyskills(m): 11:59am On Jul 24, 2015
Yes, I am.
Programming / Re: Programmer In Bank Vs Programmer In Another Coperate Environment by Sammyskills(m): 11:24am On Jul 24, 2015
mails4okonta:
Thanks man......................

smiley
Remember to pay tithe oo.

1 Like

Programming / Re: Programmer In Bank Vs Programmer In Another Coperate Environment by Sammyskills(m): 10:59am On Jul 24, 2015
Remember, "Who no go, no know".

For me, I'll go with it. And here are my reasons:
1. More experience will be gathered.
2. Chances of meeting other people better than you, cos you won't be the only person in the department.
3. Most importantly, you'll be paid more.
Programming / Re: How Can I Create A Listed Link Using Foreachloop In Php? by Sammyskills(m): 10:19am On Jul 24, 2015
Slim1978:


Thanks bro, de listed links are displayed but I want dem to go to dier various pages.
like I said d only option I have is to specify d ID with each of d page by repeating dis code which I think is not I deal any thought?
<?php foreach($menus as $menu) {
echo "<li>";
echo '<a href="' . $menu["link"] . '">';
echo $menu["menu"];
echo "</a>";
echo "</li>";

}


?>

"You want the links to go to their various pages?" I don't quite understand what you mean. Can you attach a screenshot?
From what I can decipher, each of the links, links to the address which you specified there (wear/home.php, wears/about-us.php, etc).

Am I missing something?
Programming / Re: How Can I Create A Listed Link Using Foreachloop In Php? by Sammyskills(m): 9:01am On Jul 24, 2015
Based on how you assigned your variables, the best option for you will be:

foreach $menu as $menu
.

I've tried it in my browser and it is working (including the links). If you try it and it doesn't work, try clearing your browser cache and cookies.

But if you still insist that you want to use

foreach $menus as $menu
, then you'll have to add 's' to the $menus array (all of them), i.e.

$menus = array();
$menus[001] = array(
"menu" => "Home",
"link" => "wears/home.php"
);

$menus[002] = array(
"menu" => "About us",
"link" => "wears/about_us.php"
);

$menus[003] = array(
"menu" => "Shirts",
"link" => "wears/shirts.php"
);

$menus[004] = array(
"menu" => "Trousers",
"link" => "wears/trousers.php"
);

$menus[005] = array(
"menu" => "Contact",
"link" => "wears/contact.php"
);


Hope that helps wink
Programming / Re: Is Wordpress Really The Way by Sammyskills(m): 7:13am On Jul 24, 2015
One thing I'll like to point out is that WordPress was built by a community of volunteers. And as such, if you encounter a challenge, there is nothing like a special support team that will fix that for you. The options you'll have will be "to look" at their support forum, if someone has encountered the same problem as yours, then, apply his/her fix to yours. And if not, you'll have to start the topic, and start praying seriously, for someone to chip in some answer.

This problem is not just limited to WordPress alone, other CMS platforms too have this issue.

My candid advice, "Please learn how to program very well from scratch, with that, you'll be able to edit even CMS software"

2 Likes

Programming / Re: Fellow PHP Developers, Help Me Look In This. by Sammyskills(m): 6:54am On Jul 24, 2015
I have been able to get the password_verify function to work. The challenge was that I was verifying with a different variable.

In my registration page, I had

$password = password_hash($password, PASSWORD_BCRYPT);


And in my login page, I had

password_verify($password, $hashed_password);


So after changing to

$hashed_password = password_hash($password, PASSWORD_BCRYPT);
in my registration page, the password_verify function now works perfectly.

Thank you @FincoApps, @omoelu1 and @dhtml18. I'm very grateful.

1 Like

Programming / Re: Fellow PHP Developers, Help Me Look In This. by Sammyskills(m): 8:52pm On Jul 23, 2015
FincoApps:
If the encrypted password is what is stored in the database, then you need to first encrypt the user's input and check the encrypted user input against the database

Thanks for your comment.
If I have to encrypt the user's input, it will return a different hash and salt (even if the inputs are the same). That's the way BCRYPT works.
Programming / Fellow PHP Developers, Help Me Look In This. by Sammyskills(m): 8:04pm On Jul 23, 2015
I'm creating a website, which will require users to register and log in. My choice of password security was Bcrypt (password hashing + salt), and I downloaded ircmaxell's password_compact codehttps://github.com/ircmaxell/password_compat.

After requiring it in my functions file, the password_hash() functions works very well. But the challenge now is to verify a user's password when logging in.
Here's my code for login
if(!isset($error)){
//Use the input username and password and check against 'users' table

$query = mysql_query("SELECT * FROM users
WHERE username = '".mysql_real_escape_string($user_input)."' OR email = '".mysql_real_escape_string($user_input)."' LIMIT 1"wink
or die(mysql_error());
$count_row = mysql_num_rows($query);
$row = mysql_fetch_assoc($query);


if($count_row == 1){
$hashed_password = $row['password'];
if(!password_verify($password, $hashed_password)){
$error[] = "Login failed! Please check your entered email and/or password";
} else if($row['active'] < 1){
$error[] = "Account has not been activated.";
}else if($row['active'] == 1){
// Do nothing
} else {
//write user data into PHP SESSION


I don't know what exactly I am doing wrong. Please help.
NYSC / Re: What Is Wrong With This NYSC Photo ??? ( Photo ) by Sammyskills(m): 5:05pm On May 27, 2015
I laff in chinese language grin grin grin grin grin grin grin grin grin grin grin

1 Like

Sports / Re: Eniola Aluko Wins Chelsea Women's Player Of The Year Award by Sammyskills(m): 4:59pm On May 27, 2015
grin

(1) (of 1 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.