₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,362 members, 8,421,551 topics. Date: Saturday, 06 June 2026 at 04:01 PM

Toggle theme

Hexy40's Posts

Nairaland ForumHexy40's ProfileHexy40's Posts

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

ProgrammingRe: Need Help On This by hexy40: 8:37pm On Apr 28, 2017
skyhighweb:
all aguement no codes should i drop the table and column content so i can get a code to work with
I have told u what to do already. Your choice.....' i dont know what u are saying about, all argument and no codes'. I belive I wrote and posted a simple code and a simple database structure.
ProgrammingRe: PHP Programmers Please Help With This Code by hexy40: 8:33pm On Apr 28, 2017
You know if there is ano extra space in front or after the name or password $run will return 0. So I suggest u take a good look at the user name and password, trim the username variable.
CrimeRe: Nigerian Drug Dealer Nabbed By Indian Authorities by hexy40: 8:24pm On Apr 28, 2017
Name checkers... see food
CrimeRe: Nigerian Drug Dealer Nabbed By Indian Authorities by hexy40: 8:23pm On Apr 28, 2017
Name checkers
ProgrammingRe: PHP Developers, How True Is This Statements. by hexy40: 5:35pm On Apr 28, 2017
I no know why php get haters like pmb, all I know is that in php I can in a hurry , write completely unorganised code and it will still run. I dont know why this beautiful ability of php is criticized, i think its the programmer that should be criticised for writing bad codes not php!. Imagine if u bought a cd player that accepts only original cds or a phone that accepts only certified apps. I know this might not be the best illustration but I will pick the one that plays both good and cracked cd any time
ProgrammingRe: Python Vs Php by hexy40: 5:21pm On Apr 28, 2017
The are both good... this topic might mistakenly hit front page because of the word python.
RomanceRe: What Would You Do If You Were In My Own Shoes? by hexy40:
Read the story...... no idea on what to do.... may be they are old lovers or old friends
PhonesRe: Which Mobile Data Provider Is Currently The Best In Nigeria And Your Reason/s? by hexy40: 4:47pm On Apr 28, 2017
Glo..... cheap
CrimeRe: Chinedu Eze Was Shot 9 Times By A Somalian Over Cellphone by hexy40: 11:01am On Apr 28, 2017
R.I.P... Somalian and war be like...
CrimeRe: Nigerian Drug Traffickers Caught In Malaysia And Interrogated On Camera (video) by hexy40: 10:59am On Apr 28, 2017
I heard drug trafficking is death sentence in Malaysia, if it's true, it means R.I.P to those guys
ProgrammingRe: Need Help On This by hexy40: 9:38pm On Apr 25, 2017
Adesege:
I have given a detailed explanation here. I'm currently incapacitated to give a sample code now.
I Understand exactly what you are saying. I don't just agree with you on this particular case. Using three tables where one can serve.
if it were a situation where the user can choose more than one vehicle, then I will agree with you completely, but in this case I will stick with my version
ProgrammingRe: Need Help On This by hexy40: 11:15am On Apr 25, 2017
Adesege:
Beginner or not, it is normal coding standard to normalize your database except in some other cases where it may not be applicable.

In this case, normalized database is what the OP needs.
Please, give us a sample code let's see
ProgrammingRe: Need Help On This by hexy40: 9:17am On Apr 25, 2017
Adesege:
A normalized datatbase will be the best to achieve this. Imagine a situation where the user's email or username can be changed, then that means the code may break in between.

So it will be best for him to store the user's and car's information somewhere. And use their ids as foreign keys in other table.

Also, i think the OP wants to be able to select the cars/bike and not click on static buttons.
I have been thinking, in what situation can user name be changed? Once you comfirm email, the user name is permanent in most site if not all sites. My style will still work in life situation
ProgrammingRe: Need Help On This by hexy40: 8:31am On Apr 25, 2017
Adesege:
A normalized datatbase will be the best to achieve this. Imagine a situation where the user's email or username can be changed, then that means the code may break in between.

So it will be best for him to store the user's and car's information somewhere. And use their ids as foreign keys in other table.

Also, i think the OP wants to be able to select the cars/bike and not click on static buttons.
Judging from the question, i believe the OP is a biginner. One has to be comfortable with one database table before he can combine 2. I just think this will work for the now and he can advance at his own pace.
ProgrammingRe: Need Help On This by hexy40: 8:14am On Apr 25, 2017
Go to the console, copy and past these to create the data base and table


CREATE DATABASE vehicle;
USE vehicle;
CREATE TABLE users_transport(
id int(80) NOT NULL AUTO_INCREMENT,
users varchar(80) NOT NULL,
transport varchar(80) NOT NULL,
PRIMARY KEY(id)
);

INSERT INTO users_transport
(users,transport)VALUES
('steve009','car'),
('maonay','bike');
('labert','car');
('lalaland','bike');



Then open a php file and paste these:


<?php mysql_connect("localhost","root","" ) ;?>
<?php
$sel=mysql_select_db("vehicle" ) ;
?>
<html>
<form action="theNameOfThephpPage.php" method="POST">
<input type="submit" name="vehicle" value="car"/>
<input type="submit" name="vehicle" value="bike"/>
</form>

<?php
$selected=null;
if(isset($_POST['vehicle'])){$selected=urldecode($_POST['vehicle']);}

$s= "SELECT * FROM users_transport WHERE transport='$selected'";
$se= mysql_query($s);
echo"<select>";
while($sel=mysql_fetch_array($se))
{$us= $sel['users'];
echo "<option>".$us."</option>";

}
echo"</select>";

?>


</html>


this should run fine.
Then take your time to study the codes and mould it into what you want it to be.
ProgrammingRe: Need Help On This by hexy40:
I dont get what the problem is. Are u having problem with the html, the structure of the data Base, or sql or everything .
First set up a database table containing two columns(users and transport) eg.
CREATE DATABASE vehicle;
USE vehicle;
CREATE TABLE users_transport(
id int(80) NOT NULL AUTO_INCREMENT,
users varchar(80) NOT NULL,
transport varchar(80) NOT NULL,
PRIMARY KEY(id)
);

now fill the database table with the info you listed.Ie names under "users" and car/bike under "transport"

Next : Write the php...? what will be in the drop down menu? the cars or the users?
CrimeRe: 45-Year-Old Man Impregnates Primary School Girl, Says She's His Lover & Fiancée by hexy40: 10:15pm On Apr 21, 2017
LionDeLeo:
Victor Emmanuel abi? Na dem. grin grin grin
if na them, them go put there local name.
RomanceRe: "She Is Mine Based On Logistics" Pre-Wedding Photos Of A Couple by hexy40: 9:06am On Apr 20, 2017
EfccBoss:
His bad shape of head + her bad eye

A minute silence for their kids
Mr/Mrs perfect, post a pic and let's see what u look like
HealthRe: Anambra State Records Another Successful Heart Surgery by hexy40: 12:34pm On Apr 19, 2017
Benekruku:
The picture evidences shows that Indians were at the forefront of the surgery and assisted by locals picking-up tools for them. grin grin grin
where are doing Indians. FYI Dr. Joe nwilo is one of the best in d world, he comes to anambra every 2 abi 4 weeks(I can't remember exactly) for surgery
PoliticsRe: Kiki Osinbajo Stunning Makeup Photos by hexy40: 12:23pm On Apr 19, 2017
PapiSmith:
Just take a look at a pastor's daughter. Not just any pastor but an AGO (Assistant General overseer)

Later they will stand on pulpit and say shìt about other people.

Y'all quoting me are too stupìd to reply.

Pastors saying shìt about others, calling them "children of the devil" because of the way they look and dress but here is his daughter looking like a Hoe.

Ain't they suppose to practice what they preach?
what did she do wrong? Make up na sin?
PoliticsRe: Who Is Nigeria's Best Minister Of Information Since 1999? by hexy40: 9:06pm On Mar 12, 2017
uwa1:
Pa Lai is not just d worst minister of information, but also the worst minister i have ever seen/listen to.
hahaha.... I think he is doing fine Considering the fact that he is covering for APC that it requires him to lie a lot to cover there plenty mess ups
CelebritiesRe: Don Jazzy: 'If Person Fit Take Your Man, I'm Sorry, That's Not Your Man' by hexy40: 5:05pm On Mar 09, 2017
Clone2020:
This guy needs to grow up and keep away from Twitter, I wonder who's worse, him or Trump.
person no fit make comment again? .. u grow up and leave nairaland
Nairaland GeneralRe: If You Are Passing And You See Buhari.... (pics) by hexy40: 3:44pm On Mar 01, 2017
He fit dey wear expensive wrist watch and shoes. Ifor I fit collect that one....
CrimeRe: Court Sentenced Two Brothers To Death For Armed Robbery by hexy40: 3:34pm On Mar 01, 2017
Let me come and kuku check there names........ohh ..there name na kuku
BusinessRe: Tony Elumelu At The Great Wall Of China (Photos) by hexy40: 9:26pm On Feb 28, 2017
WhiteSoup:
Proud son of the yoruba race.

We are proud of you our son. undecided
oga u are wrong. smiley Tony onyemaechi elumelu is a fulani man
CrimeRe: What Is Wrong With This Post? (pic) by hexy40: 8:51pm On Feb 10, 2017
U will give birth to email
PoliticsRe: Unpaid Salaries: Kogi Workers And Their Children Turn To Beggrr For Survival by hexy40: 8:49pm On Feb 10, 2017
This is sad, another problem is when you begin, u might be begging people with even worse condition.
PoliticsRe: Recession:protest Against Corruption & Stop Blaming Us –osinbajo Tells Nigerians by hexy40: 11:24am On Feb 10, 2017
It was OK to blame jona, I can remember someone promised change and to fight that corruption.
PoliticsRe: 2019: PDP, Four Other Parties Meet To Plot Buhari’s Removal by hexy40: 11:18am On Feb 10, 2017
I believe in hitting a man when he is down.....eminem
Foreign AffairsRe: Rwanda Lawmakers Approve Swahili Official Language, Dropping French Completely by hexy40: 11:03am On Feb 10, 2017
Nigeria will replace English with? Igbo, hausa or Yorba? ....oh efik, ibibio or any of the 200+ languages
PoliticsRe: I Am Something, I Will Vote For BUHARI in 2019, What Am I? by hexy40: 10:58am On Feb 10, 2017
lordizak:
A man that loves his country.
Unlike the stupid OP.
it's a riddle.What's stupid about the o.p? why are Buhari supporters always aggressive with everything from religious to politics and to even riddles and jokes?
PoliticsRe: FG Blames Police, Army, Customs For High Cost Of Food.. by hexy40: 10:50am On Feb 10, 2017
ipobarecriminals:
Clueless set of people. From blaming the Otuoke thief, to pdp,from pdp to boko haram. From boko haram to Nigeria police, custom.soon,they'll blame the air,rain and one Evil Spirit. Hopeless, confused government. Tufia
I can't remember clearly but I think they have blamed evil spirits in Aso rock

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