Hello All!
I was wondering if any of you guys could help me with a small problem I'm having!
I'm trying to add a select list to a form on my webpage.
The select list is generated from information stored in a database.
The table has 25 rows in it presently and what I'm trying to do is list only one column of the rows to create a select list.
An example of this:
Populating a select list with all of the names in a member database.
Here is the relevant code:
$ReqQry=" SELECT `traitname` FROM `traitslist` ";
$ReqResult= mysqli_query($cxn , $ReqQry)or die('Ya did it wrong');
$TraitInfo= mysqli_fetch_assoc($ReqResult);
$TraitCnt= mysqli_num_rows($ReqResult);
$list1=$TraitCnt;
echo "Required Skill 1-"."</br>";
echo "<select id='Req1'>";
foreach($TraitInfo as $v)
{
while($list1 > 0)
{
echo "<option value='$v'>$v</option>";
$list1--;
}
}
echo "</select>"."</br></br>";
The problem that I am having is that the select list generates the same entry 25 times.
Any help would be appreciated, as I have fiddled around with it for about two days in my off-time and no luck yet. Thanks
*ps* I'm still rather wet behind the ears with PhP so be gentle
Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all tickets in grids. the problem is that the number of records are around 30 to 40 but there is a lag
DOMDocument
Hello All,I need to take an XML document, modify some of the nodes in it and then perform a selective reordering of a subset of nodes. The modification I have done without too much difficulty -
php is not recognized as an internal or external command
Hello,I am trying to bake the code in CakePHP through my console.I have changed my Path in Environment Variables but still I am getting this error in console "php is not recognized as an internal
Using insert variable
need a way to inert variable data to mysql database $acc = "212121212";$nok = "Nokia1100";$db_link = mysql_connect("localhost","root",
session variables not working anymore
hello,i use sessions to handle authentication within my site. my host has been changing a lot of settings in the server recently for "security purposes". and the technicians are pretty much
FAGL_FC_TRANSLATION FAS52 New GL ECC 6.0
Hello,
check_changed_data - I can't get data from the called method event
I use check_changed_data to trigger my event method.
Expandable Post Code
Hi,Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so its all just plain html and php coding. I have a page that displays short news articles of about 25 30 words
php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following.Have a php file log into a email account and saves the emails as text files in a directory then
What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a certain amount of time (1 use, 1 day, 1 week, etc).Can someone explain to me what exactly it's