Hexy40's Posts
Nairaland Forum › Hexy40's Profile › Hexy40's Posts
1 2 3 4 5 6 7 8 9 10 (of 10 pages)
skyhighweb: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. |
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. |
Name checkers... see food |
Name checkers |
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 |
The are both good... this topic might mistakenly hit front page because of the word python. |
Read the story...... no idea on what to do.... may be they are old lovers or old friends |
Glo..... cheap |
R.I.P... Somalian and war be like... |
I heard drug trafficking is death sentence in Malaysia, if it's true, it means R.I.P to those guys |
Adesege: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 |
Adesege:Please, give us a sample code let's see |
Adesege: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 |
Adesege: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. |
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. |
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? |
LionDeLeo:if na them, them go put there local name. |
EfccBoss:Mr/Mrs perfect, post a pic and let's see what u look like |
Benekruku: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 |
PapiSmith:what did she do wrong? Make up na sin? |
uwa1: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 |
Clone2020:person no fit make comment again? .. u grow up and leave nairaland |
He fit dey wear expensive wrist watch and shoes. Ifor I fit collect that one.... |
Let me come and kuku check there names........ohh ..there name na kuku |
WhiteSoup:oga u are wrong. Tony onyemaechi elumelu is a fulani man |
U will give birth to email |
This is sad, another problem is when you begin, u might be begging people with even worse condition. |
It was OK to blame jona, I can remember someone promised change and to fight that corruption. |
I believe in hitting a man when he is down.....eminem |
Nigeria will replace English with? Igbo, hausa or Yorba? ....oh efik, ibibio or any of the 200+ languages |
lordizak: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? |
ipobarecriminals:I can't remember clearly but I think they have blamed evil spirits in Aso rock |

Tony onyemaechi elumelu is a fulani man