473,394 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Parse contents of users file into a dynamic drop down

127 100+
Hi,

I've found a great website which can extract data from a MySQL database and populate chained drop downs. (http://www.noboxmedia.com/20/massive-ajax-countryarea-drop-down-list/)

I'd like the option of a user "dynamically" uploading their Excel file, extracting certain data, and including their data in the drop downs too. All this without the users data needed to be stored on the server longer than necessary.

The only way I can see how to do this is use PHP to read the Excel file (via phpexcelreader), MySQL to create a temporary table uisng this data, PHP to set global variables based on the users data in the table, and finally reload the original webpage with the addition page content taken from the global variables.

This seems a bit too complex. Does anyone know of an easier way - or even better - a web site which has an example?!

Thanks!
Mar 22 '08 #1
4 1663
acoder
16,027 Expert Mod 8TB
The only way I can see how to do this is use PHP to read the Excel file (via phpexcelreader), MySQL to create a temporary table uisng this data, PHP to set global variables based on the users data in the table, and finally reload the original webpage with the addition page content taken from the global variables.

This seems a bit too complex. Does anyone know of an easier way - or even better - a web site which has an example?!
An alternative would be to avoid creating the table in MySQL. Just use PHP to generate the options for the drop down or use XML/JSON and echo the results. Then return this as a result to an Ajax request. As for the actual upload, this isn't really possible with Ajax, but you can use iframes to achieve the same effect.
Mar 22 '08 #2
phub11
127 100+
Thanks for the reply!

I stumbled upon an iframes example - but from what i've heard, iframes can act funny with certain browsers. I was hoping to avoid that.

Thanks again!
Mar 22 '08 #3
acoder
16,027 Expert Mod 8TB
This one seems to work pretty well.
Mar 23 '08 #4
phub11
127 100+
Thanks for the suggestion...

That site was one of the first I looked at - and although it uses Iframes, you are right, as it seems to work on IE6, FF2, and Safari.

I guess Iframes are supported better than I was lead to believe.

Cheers!
Mar 23 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: chuck amadi | last post by:
By the way list is there a better way than using the readlines() to > > >parse the mail data into a file , because Im using > > >email.message_from_file it returns > > >all the data i.e reads one...
6
by: Kingdom | last post by:
I'm using this script to dynamicaly populate 2 dropdowns and dispaly the results. Choose a component type from the first drop down, lets say 'car' and the second box will list all the car...
2
by: Mong | last post by:
Hi, I've developed an ASP.net application for an intranet site. Users will be identified using Windows authentication and they will belong to one of two roles, Admin or Users. The application...
19
by: mart2006 | last post by:
I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters what is shown in the dynamic menu....
2
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could...
6
by: mcgrew.michael | last post by:
I hope this is the right group. I am very new to ASP so this is probably a stupid question. I have some vbscript that query's AD and populates a recordset. I know the recorset contains the...
10
by: mart2006 | last post by:
Hi, I'm fairly new to PHP and I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters...
3
by: happyman992 | last post by:
Hi, I have 2 questions. First, I am building a form with multiple drop down boxes. The options of the second drop down box will depend on what the user chooses on the first, options of the third...
4
by: audreyality | last post by:
I am new to javascript and appreciate any guidance on this issue, so thank you in advance for your advice! Situation: I am working with a form that will send information to a database. I need the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.