Hi i am a beginner in php and mysql....
I have a made a database for registration of a customer in shrare market....

Now what i want to show at the front end is the the person who is entering information has a choice to select from a company through a drop down menu from the table i made "Company" i have predefined values in the Table company. .

Now i want to relate "Compnayname" from Company with "ShareRate" from Company .

In general words when a person selects the Company Name such as "Microsoft " from dropdown list then in the next text field ....the ShareRate is shown itself taken from the fixed value in my DB.

please any person post ur ideas or query. or any tutorial link for that matter.

In order to relate two tables of information, you need a value that ties them together, a value that is the same in each. If you give each company in the CompanyName table a unique ID, you then store those ID values in the ShareRate table with records containing containing respective companies' share rates. Thus, when you fetch rows of data from the ShareRate table, you then use the ID column to fetch the corresponding company name from the other table. This will work whether you are relating two tables in one database or you are relating tables in different databases.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.