( https://i.stack.imgur.com/1LPVk.png ) i mention my link where output show when i press drop-down button then show empty fields but i have values in my sql table link ( https://i.stack.imgur.com/YEopy.png) but it does not execute my values in drop down list..i need help...when i show error it does not dispaly any error but show empty in dropdown list.. and my PHP code is: ` <tr> <td>Country Name</td> <td> <select name="name"> <?php $conn = oci_connect("username", "pswrd", "db"); $sql = 'SELECT name FROM country'; $stid = oci_parse($conn, $sql); $success = oci_execute($stid); while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS+OCI_ASSOC)) { echo "<option value=\"countryname1\">" . $row['name'] …

Member Avatar
Member Avatar
+0 forum 12

i am able to populate data in chain select drop down list but the problem is when page is refreshing selected data is lost how to fix that .. here is the code.. <?php require_once 'include/config.php'; require_once 'include/opendb.php'; ?> <?php if(isset($_POST['model'])){ //This is for the third and final drop down menu. It allows you to submit and go to new page. $link="index.php"; }else{ //This is for the third and final drop down menu. It allows you to submit and go to new page. $link="#"; } ?> <form method="post" action="<?php echo $link;?>" name="admin"> //Straight Forward <select name="value1" onChange="this.form.submit();"> // 1Ste Drop …

Member Avatar
Member Avatar
+0 forum 7

Dear Python coders, I am new to python programming and I am trying to solve an assignment. The question is stated below; Create a function that does the following 1. Accepts as the first parameter a string specifying the data structure to be used "list", "set" or "dictionary" 2. Accepts as the second parameter the data to be manipulated based on the data structure specified e.g [1, 4, 9, 16, 25] for a list data structure 3. Based off the first parameter return the reverse of a list or add items `"ANDELA"`, `"TIA"` and `"AFRICA"` to the set and return …

Member Avatar
Member Avatar
+0 forum 1

how to create a waiting list for an appointment in php with codeigniter...any guide please

Member Avatar
Member Avatar
+0 forum 9

Hello, i have a problem. I want to do two things First, explode an array to retrieve the ids from a row on the table e.g. 1,5,23 and then use a variable to call a Mysql statement. Here is my code public function Show($times) { $q=mysqli_query($this->db,"SELECT to_uid_fk FROM table WHERE status='1' ") or die(mysqli_error($this->db)); $row1=mysqli_fetch_array($q,MYSQLI_ASSOC); if(strlen($row1['to_uid_fk'])>1) { $s = explode(",", $row1['to_uid_fk']); foreach($s as $a) { $query=mysqli_query($this->db,"SELECT row1,row2,to_uid_fk,times FROM table WHERE to_uid_fk='$a' ORDER BY row1 DESC ")or die(mysqli_error($this->db)); while($row=mysqli_fetch_array($query,MYSQLI_ASSOC)) { $times=$row['times']; $data[]=$row; } return $data; } } } and then i want to call this function on another file to run …

Member Avatar
Member Avatar
+0 forum 10

This is about “https://www.daniweb.com/web-development/php/tutorials/499320/common-issues-with-mysql-and-php” i created a new thread because that is a great tutorial and I believe that comments underneath it would troubled the reader. Hello Diafol , I believe that this tutorial should be linked in the “read first” section , but to be honest I don't believe that many people take the time (3 minutes or so) to read it before posting a question (that is why we have question like what is ? In URL that could googled it and have the answer in less than a minute) . I have some questions regarding this tutorial …

Member Avatar
Member Avatar
+2 forum 8

Hi Guys I ran into a bit of a problem with some code I am writing. I am trying to store all possible combinations of a set of numbers which are current being stored in List. Problem is my code run into an out of memory exception, heres my code: public void GetAllPossibleCombos(Dictionary<int, decimal> numbers) { var allNumbers = numbers.Keys.ToArray(); var possibleLines = new List<Line>(); Combinations<int> normalCombo = new Combinations<int>(allNumbers, 5); foreach(IList<int> n in normalCombo) { var line = new Line(); line.Number1 = n[0]; line.Number2 = n[1]; line.Number3 = n[2]; line.Number4 = n[3]; line.Number5 = n[4]; possibleLines.Add(line); } } } …

Member Avatar
Member Avatar
+0 forum 6

![year.png](/attachments/small/3/7e8a738796e0d938dcd6d9512b905f5f.png "align-right") first take a look at attachment pic to get a idea. I have two dropDownLists.1st dropDownList ID is cboPrev(oPrev) and 2nd dropDownList ID is cboNext(oNext). These both DropDownList will have the following 4 items (2014, 2015, 2016, 2017). User can click on dropdownlist and pick a year. # problem: # so for default item on dropDownList is "2014" but when user click on "2016" than the default first item is still "2014" - which is wrong # What I want: # So for default item on dropDownList is "2014" but when user click on "2016" than the default …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I have written a program which currently accumalates different pairs and their frequency from an excel spreadsheet. (1280 pairs) Want I want to achieve is from the top 20/30 pairs, if I can find pairs that link e.g. Pair 1 [1,33] and Pair 100 [1,232] so i would expect that to be a link. With that link i want to be able to merge it so the the value becomes e.g. [33,1,232] before continue to find any more. My find outcome should be a set of 10 numbers which are linked together by thier pairs. Anyone one have …

Member Avatar
Member Avatar
+0 forum 3

Hi all! I am working on creating an SMS language translator (SMS -> real English), and I am having trouble initializing a map for the SMS -> English codes. My code is below: map<string, string> THE_SMS_CODES{ ".02","Your (or my) two cents worth", "10X", "Thanks", "2MI","Too much information", "2U2" ,"To You Too", "4COL","For Crying Out Loud", "420" ,"let's get high", "<chuckle>","the speaker chuckles", "<frown>","the speaker is frowning", "<g>","Grin", "<grin>","the speaker is grinning", "<smile>","the one writing the message is smiling", "<smirk>","the one writing the message is smirking", "<wink>","the one writing the message is winking", "[$X$]","No spam !!", "JK","Just Kidding", "?","I have a …

Member Avatar
Member Avatar
+0 forum 4

Hello Daniweb Community, I was wondering if there is a way to replace words from a listbox. So at the moment I've got a listbox with a couple of strings to be replaced in the textbox, however single line listbox items work but when I add a multi-lined item eg. Hello There It'll go into the listbox as HelloThere, so when I go to use the for each to replace them It doesn't work. I've tried manually replacing it by using `TextBox1.Text = TextBox1.Text.Replace("Hello" & Environment.NewLine & "There")` it'll work, and if I try For Each lbItem In .ListBox1.Items TextBox1.Text …

Member Avatar
Member Avatar
+0 forum 3

Just an example of a persistent list class that could have interesting applications in data mining.

Member Avatar
+1 forum 0

Shows how to convert a comma separated value (csv) string to a list of records, and then do some data processing. The csv strings usually come from csv files created by spreadsheets.

Member Avatar
Member Avatar
+1 forum 2

I have a list in python that I am printing to the screen. The current format is Option Key: [0, 3, 6, 8, 8, 5, 2, 0, 7, 1, 9, 5, 0, 7, 7, 4, 2] I would like it to be Option Key: 0 3688 5207 1950 7742 I think I need to do something with the .format method but I"m not sure. The code looks like this option_key.append(int(m_key_code)) print("Option Key: ", option_key)

Member Avatar
Member Avatar
+0 forum 3

Hi! Straight to the problem: I'm building this server application which will monitor SQL databases. I want it to remember any number of connections so I've made a few methods which I thought would do the trick, except they don't. The program should add any new SQL connection to a List<MyConnection>, then serialize it to a file "connections.txt", and finally to a JComboBox. PROBLEM: When I add the first connection, it works properly since the file needs to be generated. Then I proceed to add a second one, and for that I found that I have to delete the file …

Member Avatar
Member Avatar
+0 forum 22

**Problems 1: Spiral matrix - Advanced** Source of the problem: [Here (not in English)](http://www.spoj.com/PTIT/problems/BCACM11B/) Spiral matrix is formed by filling number 1 in 1st row 1st column, after that, filling with increasing number by clockwise, example: 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9 Write a program that inform the value of cell (x, y) of a square spiral matrix sized n x n. *Input:* First row record the number of tests, not greater than 100. Each test record in one row, include …

Member Avatar
Member Avatar
+0 forum 1

How to find out auto approve site from google? any body guide line me?

Member Avatar
Member Avatar
+0 forum 9

I do a lot of work in number theory, especially with factors. I often need just the two middle factors from a very long factor list/result, so I created a function that takes a factor list and returns just the middle two, or one, factors. Nothing earth shattering, but I use it a lot, and thought that I would share it. And those with better ways to offer, offer away. I am always interested.

Member Avatar
Member Avatar
+0 forum 2

Im looking for a way to be able to send out over 100,000+ emails a day. How do websites that have over 2,300,000 subscribers do that when they are posting a couple of articles a week? Any software, plugins, code out there im missing? Thanks

Member Avatar
Member Avatar
+0 forum 3

Hello, for a school assignment I was supposed to write an insertion sort algorithm for a doubly linked list. As the feedback system of this particular course is rather weak (actually non-existent) I would like to ask you for your honest opinion about how well this is implemented, what could be improved, made more efficient, etc? Thanks in advance, Marcel #include <iostream> using namespace std; class elem{ public: int value; elem* prev; elem* next; elem(int e, elem* ptr1, elem* ptr2){ value = e; prev = ptr1; next = ptr2; }; }; class list{ private: elem* first; elem* last; int length; …

Member Avatar
Member Avatar
+0 forum 4

Hello, me again :) With this code: >>> from BeautifulSoup import BeautifulSoup >>> import urllib2 >>> url = urllib2.urlopen('http://www.python.org').read() >>> soup = BeautifulSoup(url) >>> links = soup('a') >>> print links A list of links printed into the terminal. I want to send the list into a text file, i tried this: >>> with open('python-links.txt.', 'w') as f: ... f.write(links) But there was an error: File "<stdin>", line 2, in <module> TypeError: expected a character buffer object What is the problem? How can fix that? -------------------------------------------------------------------- And one more question; as that list looks like this: (I will copy only small …

Member Avatar
Member Avatar
+0 forum 3

this is my latest class assignment, i would really appreciate some assistence with my pseudo code to help me in the right direction. my code skeleton is provided at the end of this post. Deque A double-ended queue, often abbreviated deque and pronounced deck, is an object with the following interface. public interface IDeque<E> { public void addFirst(E e); public void addLast(E e); public E removeFirst(); public E getFirst(); public boolean isEmpty(); } A deque is a list of items with restrictions on how it can be manipulated. Items can be added to either end of the list but can …

Member Avatar
Member Avatar
+0 forum 5

Hello. I have a list: mylist = [2,4,4] How can i take number 244 out from the list? Something like: number = 244 Here 244 is integer.

Member Avatar
Member Avatar
+0 forum 6

Hello again. How can i limit my list indexes? I want my list to take only 3 indexes for example.

Member Avatar
Member Avatar
+0 forum 7

Hello. mylist = [6, '/', 3, '+', 9, '+', 8, '+', 1, '/', 2] How can i delete that list indexes? I tried: def clear(self, event): global numbers for i in numbers: print i del numbers[i] But it didn't work: File "./kivycal", line 83, in clear del numbers[i] TypeError: list indices must be integers, not str What can i do for that?

Member Avatar
Member Avatar
+0 forum 5

Hello. I have a list like this: mylist = [7, "+", 2, "+", 1] I want to take them out of the list inorder to run the operation and get the real result; something like this: result = 7 + 2 + 1 So the result variable will be set to 10. How can i do that?!

Member Avatar
Member Avatar
+0 forum 5

Hi Guys, Im a bit puzzled on the best way to store data which will later be saved to a csv. I am doing a record search on a database table which will get cycle through each employee and get the relevent information. Once I have done this I will then create a string builder which will go through all this information and append the csv. The problem is im struggling to find the best way to store this information in the meantime. Ive tried something funky with a list dictionary but it didnt come off right. Any ideas anyone? …

Member Avatar
Member Avatar
+0 forum 5

Hello! My this time question is about breaking a list. I have a list with the name favorite_movies. Here is 2 functions of all functions from the file: def add(): load_favorite() favorite_movies.append(ent.get()) dump_favorite() #print (colors) def view(): load_favorite() from Tkinter import * v = Tk() v.geometry('300x300') v.configure(background = 'white') top = Label(v) top.pack() top.configure(text = favorite_movies) v.mainloop() dump_favorite() When i append a name with the Add button and then press the View button, i see list's names on the Tkinter window like this: spiderman lastnight matrix but i want them to be displayed like this: spiderman lastnight matrix What should …

Member Avatar
Member Avatar
+0 forum 4

//Hi all just switching from c++ to c#.Can anyone help,with the question i have: //this is a peace of code from c++ banking aplication int ShowMenu(void); void AddAccount(vector<CAccount*>& list); void DisplayAccount (vector<CAccount*>& list); void Lodgement (vector<CAccount*>& list); void Withdroawal (vector<CAccount*>& list); void InterestRate (vector<CAccount*>& list); CAccount* findAccount (vector<CAccount*>string ); bool quit = false; int _tmain(int argc, _TCHAR* argv[]) { vector<CAccount*> list; int option = 0; do{ quit =false; option =ShowMenu(); switch ( option ) { case 1: AddAccount(list); break; case 2: DisplayAccount(list); break; case 3: Lodgement(list); break; case 4: Withdroawal(list); break; case 5: InterestRate(list); break; case 6: quit = true; …

Member Avatar
Member Avatar
+0 forum 42

Looking on the web for how to do it. Found several solutions: serialisation, XML etc. Cannot decide which to use. My List class contains a string, some booleans and two other Lists. Awaiting some opinions that will be accepted with great gratitude. :)

Member Avatar
Member Avatar
+0 forum 8

The End.