₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,324,999 members, 8,419,865 topics. Date: Thursday, 04 June 2026 at 05:03 AM

Toggle theme

CodeHouse's Posts

Nairaland ForumCodeHouse's ProfileCodeHouse's Posts

1 2 3 4 5 6 7 8 9 10 (of 31 pages)

ProgrammingRe: Php: How To Display A Message To A Specific User ID Or User Name by CodeHouse: 11:07am On Feb 16, 2017
trytillmake:
Simple ye code is all wrong: let me help small

<?php

$user_id = $_POST['userid']; // get id from form and pass to variable

if($user_id == "markydave"wink // compare variable

{
echo "hello markydave";

}


else if($user_id == "seun"wink // compare variable

{
echo "hello seun"; }


else { echo "hello User";} // default output

?>


PHP was my first language i learnr't so i always fall back to it when i wanna do a fast job no time to waste.
Sorry, I didn't catch that, are you saying my code is wrong?
ProgrammingRe: Php: How To Display A Message To A Specific User ID Or User Name by CodeHouse: 8:17am On Feb 16, 2017
Markydave:
thanks can you please help me on how to fetch from the db and display the message to only that user with id 7..abeg help me d tin dey turn my head am really new in this stuff
Markydave glad to know that you are interested in programming and you might want to follow the advice given above, try to read on tutorials online so you can get a hang on it but below is what you need and I hope it is not too complex for you to understand. Note that I assume that you have included your database connection, hence the need for "$con" in the sample.

cheers

ProgrammingRe: Php: How To Display A Message To A Specific User ID Or User Name by CodeHouse: 8:55pm On Feb 15, 2017
Markydave:
Gud day, am a newbie in php am trying to display a message to a specific user ID but don't know how to go about it I have tried

<?php
if
{
$user_id ==7
{
echo "hello there";
?>
But it not displaying anything and not giving any error. Please help me
Of course this code won't display anything cos no condition has been met, besides you will need a session or fetch the user id from the database first and then you can check if the condition is met. Look at the post above by silento, that's what you should do first at user login, you can also read on php sessions
PoliticsRe: Nigerian Army Gears Up For 2017 Weapons Championship Inside Sambisa Forest. PICS by CodeHouse: 12:36pm On Feb 09, 2017
@topic when we should be planting on that vast land shocked
TravelRe: Nigeri To Peru by CodeHouse: 4:54pm On Feb 01, 2017
Where is Peruvian Embassy in Nigeria and what are their VISA requirements, thanks
EducationRe: Lagos Students To Shut Down All Campuses In The State In Support Of February 6th by CodeHouse: 1:52pm On Feb 01, 2017
Good move
Christianity EtcRe: Burning Shrines, Eating Bibles, Killing Christians And Other Issues - Opinion by CodeHouse: 9:37pm On Jan 31, 2017
fratermathy:
I await your reply oniovo.
Oshare, oniovo me..I see you smiley
TravelRe: Top Ten Hardest Contries To Get Visa. by CodeHouse: 6:15am On Jan 25, 2017
Even Nigeria?
CrimeRe: "I Specialize In Money Rituals And Spiritual Bath" - Gang Leader 'Okadigbo' by CodeHouse: 3:47pm On Jan 16, 2017
olihilistic:
please let the law does it work on him properly
grin
PoliticsRe: Ekiti APC Slams Pastor Adeboye Over Support For Fayose, Alleges Bribery! by CodeHouse: 4:06am On Dec 26, 2016
Maximus85:
A pastor should face his pastoral assignments and leave politics alone.
In biblical times, you cannot separate prophets from politics, they have a role to play
CelebritiesRe: Photo Of Daddy Showkey Cooking For Christmas by CodeHouse: 4:02pm On Dec 25, 2016
Correct Ukodo grin only few people go understand
Jobs/VacanciesRe: What Are Some Of The Biggest Red Flags In An Interviewee? by CodeHouse: 7:02am On Dec 24, 2016
Nice and True
PoliticsRe: Shettima Donates N10m To Wife Of Abu Ali (Photos) by CodeHouse: 11:53pm On Nov 19, 2016
With the way he was sampling that young girl, I hope he did not just pay for her huh

1 2 3 4 5 6 7 8 9 10 (of 31 pages)