₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,398 members, 8,511,633 topics. Date: Monday, 02 November 2026 at 06:14 AM

Toggle theme

Skyhighweb's Posts

Nairaland Forum › Skyhighweb's Profile › Skyhighweb's Posts

1 2 3 4 5 6 7 8 ... 138 139 140 141 142 143 144 145 146 (of 174 pages)

Programming › Re: Already Exist Remove From List by skyhighweb(op): 5:06pm On May 01, 2017
roadsta:
^^
Oh yes! it is javascript. Just translate it to favourite language, But if you can´t do it.
tell me your favourite
language
php
Programming › Re: Already Exist Remove From List by skyhighweb(op): 12:40pm On May 01, 2017
roadsta:
var array = ['a', 'b', 'a', 'c', 'a', 'd'];
// the list
var element = 'a';
// selected element
var idx = array.indexOf(element);
// first find the element index
while (idx != -1) {
// this makes sure the element is defined in the list
array.splice(index, 1);
// this return a new list without the selected element
}

Note that this wont work in older browsers like ie 7 but if you target such, you can use polyfills.
looks like javascript
Programming › Re: happy weekend programmers who dont sleep because of a comma error by skyhighweb(op): 11:02pm On Apr 30, 2017
quick question for u guys i need a work around with this, how do i remove a value(name) already selected from displaying on a drop down list to avoid multiple selection using php code thanks
Programming › Already Exist Remove From List by skyhighweb(op): 1:51pm On Apr 30, 2017
Am using php MySQL and i have a table which get filled, i want to be able to remove already selected data from list(frontend) automatically to avoid multiple selection and not having two of the same data in the table how do i go about this, thanks.

for example, if on the drop menu we have

mike
Jacob
Steve
David

if someone already selected David i don't want him to show up on the list

plz note i already have already exist code, i just need to know how not to show it, thanks
Programming › Remove Already Seleted Data From List by skyhighweb(op): 9:32am On Apr 27, 2017
Am using php MySQL and i have a table which get filled, i want to be able to remove already selected data from list(frontend) automatically to avoid multiple selection and not having two of the same data in the table how do i go about this, thanks.

for example

if on the menu we have\

mike
jacob
steve
david

if someone already selected david i dont want him to show up on the list
Programming › Re: Need Help On This by skyhighweb(op): 10:02pm On Apr 25, 2017
all aguement no codes should i drop the table and column content so i can get a code to work with
Programming › Already Exist Remove From List by skyhighweb(op): 7:45pm On Apr 25, 2017
how do i remove already selected option from a list to avoid multiple selection.

note: i know how to do already exist, i just need it to b be shown
Programming › Re: Need Help On This by skyhighweb(op): 6:40pm On Apr 25, 2017
since i have been able to get help on that i have another question.

need a simple code or something that will help ne remove content from list so it wont be choosen again by users, as in if its in table that means ssome one choose it so iit wont appear on the list again for users to select it thus avoiding multiple selection
Programming › Re: happy weekend programmers who dont sleep because of a comma error by skyhighweb(op): 5:12pm On Apr 25, 2017
why we at it need a suggestion on how to do.

is there a way to remove a data from the frontend to avoid multiple selection, php.
Programming › Re: Need Help On This by skyhighweb(op): 10:16pm On Apr 24, 2017
sql
Programming › Re: Need Help On This by skyhighweb(op): 10:15pm On Apr 24, 2017
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?
the users will b in the drop down menu, when i select cars the menu will b the users
Programming › Need Help On This by skyhighweb(op): 11:26am On Apr 24, 2017
hello am just gonna write it out what the problem is am using php i have a table for example with users and transport and what they selected for example,in my table i have this data as below.

jemery selected car
steve009 selected car
monay selected bike
labert selected car
lalaland selected bike

i need a code that will have a drop down menu when i click cars it will show the users and when i click bike it will show the users, hope u understand, thanks.
TV/Movies › Sorry Doctor Who Season 10 by skyhighweb(op): 1:48pm On Apr 23, 2017
ok after waiting for the new doctor season which am a fan of since i was young, i finally put down my foot, this is becoming too much, every movies and series are now having it weather its a must or not.

what am i talking about? doctor who's companion, the doctor is always having a female side kick and have always enjoy them on screen but finally oyinbo decided they should make the new one a lesbian, smh. i know people will say na me know if u dont watch someone else will, well goodluck with u, this is one of the reason i stop watching supergirl, the show was first boring and they decided to make supergirl half sister a les, any way na there ways. happy sunday all.
Programming › happy weekend programmers who dont sleep because of a comma error by skyhighweb(op):
grin i feel your pain
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 12:55pm On Apr 21, 2017
cbrass:
If you wrote it your self then follow the example I gave you earlier, that will solve the issue you are having
ok have figure it out had to rewrite the codes again now working
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 9:02pm On Apr 19, 2017
cbrass:
Wait Did u write this code your self before?

and i also told you earlier that this code will not update your table in the db,
Yeah it update it only update one table at a time
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 7:51pm On Apr 19, 2017
cbrass:
try this it should work , though i didn't test it ,



$query = "SELECT team_id, team_image, teams FROM " . $DBPrefix . "sports";
$db->query($query, $params);
$TPL_team1_list = '<select name="team1">' . "\n";
while ($row = $db->fetch())
{
$selected = ($row['teams'] == $team1) ? 'selected="true"' : '';
$TPL_team1_list .= "\t" . '<option value="' . $row['teams'] . '" ' . $selected . '>' . $row['teams'] . '</option>' . "\n";
$selected = ($row['team_image'] == $team1_image) ? 'selected="true"' : '';
$TPL_team1_image_list .= "\t" . '<option value="' . $row['team_image'] . '" ' . $selected . '>' . $row['teams'] . '</option>' . "\n";
}
$TPL_team1_list .= '</select>' . "\n";
$TPL_team1_image_list .= '</select>' . "\n";
didnt work almost the same with what i got
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 3:13pm On Apr 19, 2017
webdeveloperqx:
cbrass solution will work for you , inside the while loop, do the second db query.
plz from the code given above alter it for me thanks
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 3:05pm On Apr 19, 2017
cbrass:
well i think this concept should work

select from table source
while loop
{

Update table 1
update table 2
}
?
this will definitely work

with the way your code is , only one table will be updated, follow the pattern i did and you are fine
can u include that for me in the code given? so i don't beat around d bush


table1 is team1
table 2 is team1_image
Romance › Re: "Why Are You Still Single? Drop Your Reasons" by skyhighweb(m): 12:17pm On Apr 19, 2017
i bang alot
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 12:15pm On Apr 19, 2017
cbrass:
OK you want the image column on the second table to update abi?
yes, the query only update one table at a time i want it to update two tables at a time
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 10:39am On Apr 19, 2017
cbrass:
wait i really need to know why you want to update the second table , the reason i asked is after going through your sql queries i cant find any WHERE CLAUSE so why do you really want to create two tables instead of a single table
theres already two tables only one get updated with the name but its image doesnt get updated
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 8:57pm On Apr 18, 2017
cbrass:
Let me get home will help out
ok thanks
Christianity Etc › Best Part Of Church by skyhighweb(op): 11:58am On Apr 18, 2017
the best part of church is when the pastor start saying how happiness is coming to you, how joy will b upon you, how gift is yours to give, become you have enough to share, how you will be bless abundantly, how peace and comfort will never leave yourside and you sha receive love from every angle, am like amen ohhhhhh amen.
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 11:26am On Apr 18, 2017
i retrieve data from here

table name column data in it

sports team_id 1
teams nike
team_image nikeimmagelogo

and place inside here

table column data in it

auctions
team1 nike
team1_image nikeimmagelogo

plz note

teams = team1

while team_image = team1_image

and this the query i use to fill team1

// team1
$query = "SELECT team_id, team_image, teams FROM " . $DBPrefix . "sports";
$db->query($query, $params);
$TPL_team1_list = '<select name="team1">' . "\n";
while ($row = $db->fetch())
{
$selected = ($row['teams'] == $team1) ? 'selected="true"' : '';
$TPL_team1_list .= "\t" . '<option value="' . $row['teams'] . '" ' . $selected . '>' . $row['teams'] . '</option>' . "\n";
}
$TPL_team1_list .= '</select>' . "\n";



and this the query i use to fill team1_image

// team1_image
$query = "SELECT team_id, team_image, teams FROM " . $DBPrefix . "sports";
$db->query($query, $params);
$TPL_team1_image_list = '<select name="team1_image">' . "\n";
while ($row = $db->fetch())
{
$selected = ($row['team_image'] == $team1_image) ? 'selected="true"' : '';
$TPL_team1_image_list .= "\t" . '<option value="' . $row['team_image'] . '" ' . $selected . '>' . $row['teams'] . '</option>' . "\n";
}
$TPL_team1_image_list .= '</select>' . "\n";


i have to fill two form to manually insert both team1 and team1_image

i need both query to be just one so when i select team1, team1_image automattically get attached and inserted hope u understand what am saying.
Programming › Re: Hello Programmer Need Ur Assistance by skyhighweb(op): 9:54am On Apr 18, 2017
Donald3d:
mysql ?
yes
Programming › Hello Programmer Need Ur Assistance by skyhighweb(op): 6:25am On Apr 18, 2017
hi i want to update two columns at once in auctions table one column hold the productname d other the productimage, have tried selecting each one at a time but not liking it, any assistance, thanks
Politics › Based On Logistic Buhari... by skyhighweb(op): 9:16am On Apr 17, 2017
is the best president ever...

jeez had a night mare, i said buhari is the best president ever.
Programming › Re: Search Multiple Tables by skyhighweb(op): 8:52pm On Apr 13, 2017
thanks but have solved it
TV/Movies › Re: PRISON BREAK Is Back! by skyhighweb(m): 11:10am On Apr 12, 2017
people writting prison break 5 deserve award already epi 2 make sense

1 2 3 4 5 6 7 8 ... 138 139 140 141 142 143 144 145 146 (of 174 pages)