/    Sign up×
Community /Pin to ProfileBookmark

Another PHP form problem!!!

Now i could build a web form with HTML code and PHP code in same page to send data to MySQL database, now what i want is to make a web form, contains (DropDownList, ListBox) when the user click on item in DropDown, shows him the data for that item in the ListBox from DataBase, also want to use PHP and HTML Form in same page. Thank you alot.

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@SpectreReturnsNov 12.2005 — I don't think you know what you're talking about. I'd say that you should learn PHP rather than depending on the comunity to provide you with such simple things.
Copy linkTweet thisAlerts:
@CipherauthorNov 12.2005 — I'm sorry i guess you didnt get my question, I know how to view data in list box from database, the question is:

the DropDownMenu has onChange function which suppose to change the Data in ListBox according to the user's choice, so the question is how can i get the item that the user choosed from the DropDownMenu while using PHP Code and the Form in one page.
Copy linkTweet thisAlerts:
@CipherauthorNov 12.2005 — Look i'm sorry, i'm working with asp.net, but i'm stuck with some one which i have to make some thing to him with PHP, i can promise to be the last time to use PHP if you want ?
Copy linkTweet thisAlerts:
@SpectreReturnsNov 12.2005 — Export the entire database into an Array, and then go talk to the Javascript people and tell them to figure out the selection.
Copy linkTweet thisAlerts:
@CipherauthorNov 12.2005 — //check the subject the user choosed and show specific controls for this subject

if (Topic == "Table1" || Topic == "Table2" || Topic == "Table3" || Topic == "Table4") {

[INDENT]for (i = 0; i < divs.length; i++) {

var obj = document.getElementById(divs[i]);

(divs[i] == "title" || divs[i] == "audio" || divs[i] == "zip")? obj.style.display = "block" : obj.style.display = "none";

}[/INDENT]document.getElementById("btn").style.display = "block"

}



Here's the JS onChange function (not the complete function) which triggers when the user select an item, ofcourse when the user logon to page first time, the page will have only the DropDown and DefaultSelect "-----Select Subject", The "Topic" in if statemtn is the table name i need to get data from it, how can i?!
Copy linkTweet thisAlerts:
@CipherauthorNov 15.2005 — Can you show me please how to add data to some place then call it after user choose an item from the dropmenu .

I know how to read data from MySQL, i know hot create forms controls in php such as ListBoxes, which i need to do, i know how to use javascript, all i need is to select specific data from the table the user chooses from the dropmenu. Thanx alot :rolleyes:
×

Success!

Help @Cipher spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...