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
links using header()
Hi AllI'm not sure where to ask for help on this but I hope someone can offer some. I'm at the point now where I'm trying to make my website live and the problem I've come across is updating my
The control with ID 'ace' requires a ScriptManager on the page
I'm trying to add a simple AlwaysVisibleControlExtender to my page, but it's not working. I get the following error:The control with ID 'ace' requires a ScriptManager on the page. The
Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a variable where things starts to go weird. I need ideas on how to solve this.It is not picking up
Creating Images from images in PHP
Okay well I am trying to make a 'dynamic' calender image with PHP.I have images like this:and:Obv I have an image for each day of the month (1 - 31) and I have images for each month.if i created a
Why does my crawler script suddenly end with no error?
Hi.I have written a web crawler script. It will visit a large number of URL's with cURL.After around 2-3 minutes of running, it will just stop, with no error output or notices.I have these
php calculate
this code echoes correctly the sum but the inserted result is 0??Code:
gmmktime or mktime
I live in the UK, i am within the GMT (with daylight saving time ie 1 hour difrence between summer and winter) Should i be using GMDATE and GMMKTIME or DATE and MKTIME... for all my date and time
Give me all your tricks for minimizing jar file size
Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier which I have imposed as a maximum size for my game. I would like to add more levels to the game but the
Variables and Include
Code: [Select]<?php$header = $_COOKIE['mss']['header'];$body = $_COOKIE['mss']['body'];$footer = $_COOKIE['mss']['footer'];include '$header';include '$body';include '$footer';?>The
Multi Level Array Problem
hi all,For example I have array like below:$temp = array(array('north america', 'us', 'california'), array('north america', 'us', 'hawaii'), array('north america', 'canada', 'vancouver'),