Member Avatar

Sorry I'm new to these stuff but I am having a hard time about this. So I'll trying to create a php and mysql program which can view records from database server. In my form I have 2 dropdown list and 2 submit button, the first one the the list of "section" and submit button, and the second one is a list of "year level" and submit button again. If I select the section "A" and click submit button, it will display only the student's information that belongs only on section "A" and same as on "year level". I can't …

Member Avatar
0
14
Member Avatar

Hey fellows, I have three database tables AUCTIONS auction_id name description place date BIDDERS bidder_id firstname lastname email signupdate BIDS bid_id auction_id bidder_id biddate I want to create a drop down menu to select and display BIDDERS signed up for each AUCTIONS. I have coded the following in PHP to select the auction_id and title from AUCTIONS table into the drop down list. [CODE] <!-- Assuming connected to mysql database --> <form id="form1" name="form1" method="post" action=""> <?php $query="SELECT * FROM auctions"; $result =mysql_query($query,); $options=""; while ($row=mysql_fetch_array($result)) { $auction_id=$row["auction_id"]; $name=$row["name"]; $options.="<OPTION VALUE=\"$auction_id\">".$name.'</option>'; } ?> Auction: <select name="select" id="select"> <option value="Select All">Select …

Member Avatar
0
27
Member Avatar

Hello all, I've been searching all day for a solution to this. I have the following code: [CODE] <?php foreach ($software_serialRecords as $record): ?> <?php $programLimit = array(); ?> <?php $programLimit[] = $record['program']; ?> <?php $programLimit = array_unique($programLimit); ?> <?php for ($i = 0; $i<count($programLimit); $i++) { ?> <option value="software_serials_program.php?program=<?php echo $record['program'] ?>"><?php echo ($programLimit[$i]) ?></option> <?php $maxCols=1; if (@++$count % $maxCols == 0): ?> <?php endif; ?> <?php ;} ?> <?php endforeach ?> [/CODE] I can get the drop down to display the "programs" i need, but it keeps ignoring the "array_unique" command. I read somewhere that sometimes the …

Member Avatar
0
4
Member Avatar

Hi, I have three drop down boxes for a Date field; one each for days, month and year. I want it so that when a year and month are selected they can be checked and then i can use those variables to insert the options into the days drop down box. However obviously i do not want to submit the month and year first, so is there a way to check the current selected value of a drop down box? Thanks.

Member Avatar
0
24
Member Avatar

Hi I've been searching for an example on how to created multiple dropdown lists in Ajax and finally managed to find one: [URL="http://www.coursesweb.net/ajax/multiple-select-dropdown-list-ajax_t"]http://www.coursesweb.net/ajax/multiple-select-dropdown-list-ajax_t[/URL] I got the example up and running on my server, but when I started to modify it to fit my own database, I got a problem with the character encoding - see here: [URL="http://www.hafdal.dk/testing/test.php"]http://www.hafdal.dk/testing/test.php[/URL] I've tried to edit the header info in the php files, without any luck so I'm beginning to think that it is in the ajax part: [CODE] // Multiple select lists - www.coursesweb.net/ajax/ // function used to remove the next lists already displayed …

0
1
Member Avatar

Hi I'm hoping someone here can help me with a php/mysql question :-) I have a dropdown menu populated from a table "tblsyslur". The fields in "tblsyslur" are: sysla syslaskt syslaid = primary key I have taken the values from the field "sysla" and used that to populate a dopdown menu. What I want to do is to is, when a value is selected in the dropdown menu, the "syslaid" is registred and used to lookup values in another table (tblhreppar) (that also has syslaid in it) and then a list of values from the tblhreppar is displayed below the …

Member Avatar
0
13
Member Avatar

Dear Members, I have three drop downs 1. Expense Type (Maintenance & Running) 2. Maintenance Expense 3. Running Expense All are populated through there data bases. I want, if i select maintenance from first only maintenance will be available and if running expense only running expense values are available. your soonest reply will be highly appreciated. Regards

0
1
Member Avatar

Well, I'm really new into JS and I'm actually more into C++, but I decided to give it a try since I'd love to develop some online games, using the new Canvas element HTML5 is providing. But before that i need to get the basics. What I'm trying to do here is a web application capable of solving some High School math problems related to Sine, Cosine, Tangent.... But I'm getting an "Undefined" Error, when trying to run a simple test. Here's the code, It's in spanish, but I think It's pretty much self-explaining, though I've modified the important parts …

Member Avatar
0
5
Member Avatar

Hi, can someone tell why or how I can perform a search using text from a drop down box - I can search successfully using a textbox and bring back the correct search results - But when I am using a dropdown box my search seems not to work - what I am trying to do is search my products table by the given country name. The problem is I think i am missing something out about the id's ?? but im not totally sure where I am going wrong. I have a few searches like this one, so if …

Member Avatar
0
3
Member Avatar

Below is [B][U]SOME[/U][/B] code from my [U]drop down box class[/U]. I would like to make the drop down box sticky so that when a user fills out the form and makes a mistake, or leave out a certain field, the values he/she selected from the drop down box remain intact with the reload. [CODE] function tooString() { $text="<tr><td><b>".$this->drophead."</b></td></tr> <tr><td></td><td><b>".$this->label."</b></td> <td> <select name='".$this->name."'>"; foreach($this->options as $option) $text.="<option value='".$option."'>".$option."</option>"; $text.="</select> </td> </tr><tr><td></td></tr>"; return $text; } } ?>[/CODE]

0
1
Member Avatar

Hello, I have looked over many examples of how to populate a dropdown with rows like [code=php] $sql="SELECT id, thing FROM table"; $result=sqlsrv_query($conn,$sql) or die("Couldn't execut query"); while ($data=sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC)){ $id=$row["id"]; $thing=$row["thing"]; $options.="<option value=\"$id\">".$thing "</option>"; } [/code] But i need to populate this list with tables and will need to set values for an auto-submit feature. I know using [code=php] $sql = "SELECT NAME FROM <database>..sysobjects WHERE xtype = 'U'"; [/code] will give me a list of the tables but im not sure how to use with a while loop. Any help would be greatly appreciated.

Member Avatar
0
9
Member Avatar

Hello everyone, I have a problem with my drop down list box on my edit page in php. I would like my drop down list box to show what the user has selected, then if the user wishes to, change their selection updating the DB(mysql) at the same time. I have a couple of radio buttons that does the same thing and works fine.[CODE]eg <?php if ($dataArow['garageopt'] == "yes"){ echo ' checked="checked"';}?> />[/CODE] When i try to apply the same method changing the checked=checked to selected it doesen't work. [CODE]<select name="cartype" /> <option value="<?php if ($dataArow['cartype'] == "tvr"){ echo ' …

Member Avatar
0
11

The End.