473,770 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic drop-down list with array - question

Can anyone out there give me a pointer regarding creating a
dynamically-generated drop-down list connected to an array?

And is that question as clear as chocolate spread?

Here's what I've got. I'm using PHP and MySQL database. I'm customizing
some calendar software, and I want the user to fill in a form by
selecting a title from a drop-down list, generated by my MySQL
database. However, the program I'm customizing uses arrays, which is
where I'm stumped.

What do I need to add to this code to make the array of titles(eg
"report writing" etc) come from my database, rather than the
manually-entered values that you can see here.

The field I want to pull from is called com_courses.tit le

array (
"coursetitl e",
"Course Title:",
$EXTRA_SELECTLI ST,

array ("Report Writing", "Recruitmen t & Selection", "Presentati on
Skills", "Essential Telephone Skills", "Time Managememt", "Customer
Care", "Other"),
0
),
I hope it's not cheeky to ask this, and thank you sooooooooo much for
answering.
BTW I bought a book on Programming with PHP and MySQL, but it doesn't
answer this question, so I'm not being lazy. Honest.

Jonny

Jul 17 '05 #1
1 2504
jo**********@ho tmail.com wrote:
Can anyone out there give me a pointer regarding creating a
dynamically-generated drop-down list connected to an array?

And is that question as clear as chocolate spread?

Here's what I've got. I'm using PHP and MySQL database. I'm customizing
some calendar software, and I want the user to fill in a form by
selecting a title from a drop-down list, generated by my MySQL
database. However, the program I'm customizing uses arrays, which is
where I'm stumped.

What do I need to add to this code to make the array of titles(eg
"report writing" etc) come from my database, rather than the
manually-entered values that you can see here.

The field I want to pull from is called com_courses.tit le

array (
"coursetitl e",
"Course Title:",
$EXTRA_SELECTLI ST,

array ("Report Writing", "Recruitmen t & Selection", "Presentati on
Skills", "Essential Telephone Skills", "Time Managememt", "Customer
Care", "Other"),
0
),
I hope it's not cheeky to ask this, and thank you sooooooooo much for
answering.
BTW I bought a book on Programming with PHP and MySQL, but it doesn't
answer this question, so I'm not being lazy. Honest.

Jonny

Please do not double post. Your question will be answered, be patient.

Joe Estock
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2390
by: Guinness Mann | last post by:
When you guys talk about "dynamic SQL," to what exactly are you referring? Is dynamic SQL anything that isn't a stored procedure? Specifically, I use ASP.NET to communicate with my SQL Server 2000, using an SqlConnection object to open the database and an SqlCommand object to transfer my SQL text to the database. Is this the "dynamic SQL" that is such a bad thing? What is my alternative? Wait until after my program is working and...
4
8102
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure creates a string of custom SQL statement and returns this string back to the main stored procedure. This SQL statements work fine on there own. The SQL returned from the sub stored procedure are returned fine. The datatype of the variable that...
31
3691
by: NickName | last post by:
/* goal: dynamic evaluation of table row platform: sql 2000 */ use northwind; declare @tbl sysname set @tbl = 'customers' EXEC('select count(*) from ' +@tbl)
2
3261
by: Mike Moore | last post by:
We are developing an asp.net web application. When we drag and drop the sql connection object to the form we set the in the dynamic properties connection string to use the connection string in the web.config file. Works Great except everytime we need drag and drop a new data adapter on the form we automatically creates a new connection sql string object.
7
8486
by: Yaro | last post by:
Hello Is it possible using dynamic SQL in UDF? In Sybase below example work but in DB2 UDB 8.1.3 I get error: "SQL0104N Unexpected element "EXECUTE IMMEDIATE" found....." CREATE FUNCTION DropTable(p_TableName VARCHAR(30) ) RETURNS VARCHAR(50) LANGUAGE SQL BEGIN ATOMIC
0
1686
by: Tom Bella | last post by:
We use a lot of dynamic SQL and we use triggers on some tables. We had to drop and create a trigger to make a change and we encountered the error E70081. We have used some harsh methods to force users out and make the change in the past, but these result in a scheduled outage. Is there some method to force the cached SQL out and do the drop / create without an outage?
1
3352
by: Henke | last post by:
Hello, I have one ImageButton controls which I initialize in Page_Load and declare on class level. ImageButton save = new ImageButton(); save.ImageUrl = "save.gif" save.Click += new ImageClickEventHandler(this.save_click); This ImageButton is added to a dynamic table which is also
2
3220
by: Zach | last post by:
I have a situation similar to what you see in Visual Studio Options menu. A Tree View on the left, and depending on what type of node you click it dynamically loads a panel into the right hand side of the form. It would be really nice if I could design all possible right hand side panels in the forms designer, then have some way to tell the framework "load the form represented by the class SuchAndSuchForm". What I have to resort to...
1
1718
by: ashish ranjan | last post by:
Hi there, I am trying to drag and drop one html table row to another html table specific row position(both html table are server response (dynamic)) is this possible to do using ajax,.net and c#.Can u hint me something how i should proceed. Regards, Ashish
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10254
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.