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
Help with syntax
Hi all!The $bridge variable is not getting passed while it is contained in the line below:Maybe I don't have the right brackets around it? I want the result to say Bridge1I think it's because its a
why does my session end?
my connect.php starts the session just so you knowi can navigate arround my site fine except when i come to this page. it lets me in but then when i try to leave no matter what page i go to or which
Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow people to login but prevent multiple logins with the same username. Everything appears to work fine
login form can you find my error?
registrationform.php seems fine send data to registration.phpregistration.php seems fine checks all data then send it to function.phpconnection.php does its job and connects to database also calls
Help on code output
My CODE:Code: [Select] echo "<phone>".$line["phone"]."</phone>"; echo
formating when pulling data from a mysql databaseOk so Im not to sure if this is the right thread to post in but here is my catch 22 issue.I have a test web page www.aandstech.com.au/test.phpTest.php pulls its content from a my sql table.This works
Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it has to do with the several while loops that should be outputting the data. One more issue is that
Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email confirmation process.Here is my code :Line number On/Off | Expand/Contract <?php//sessions
Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the going through something like paypal. I've never done that before...what is my first step? I really dont
disable all input buttons
Hello Friends,suppose i do have a file ( file.php ) has a submit buttonCode: [Select]<input type=submit name=add value=go> is there any way so i can make the button shown but in same