CrazyEngineers Forum

******************************************
Welcome To CrazyEngineers (CE) – an online community of engineers from all over the world! With the younger CEan at 84 and the youngest at 16, CE boasts of professional engineers, students, professors, entrepreneurs, CEOs, geeks & nerds. We exchange innovative ideas, share knowledge, help each other and expand our worldwide network of engineers! You need not have a formal degree in engineering to be a part of CrazyEngineers! Need we say more?
Join CE! | Be a CE Ambassador! | Forgot password? | Sponsor CE | Contact Us
Navigation
Go Back   CrazyEngineers Forum > CE : Help Center > General Help
Reply

  #1 (permalink)
Old 3rd July 2008, 07:27 PM
hbk
CE - Apprentice
 
I'm a Crazy Computers Engineer
Join Date: 12th June 2008
Posts: 36
Default interesting situation

hey guys... i've encountered something which I think may tax ur brains...

what im trying is this:

There is this coaching institute. A person may come here either as a student to enroll for a course, or as a teacher.

Now, if the person has come as a student, we enter into database DB1, the personal details and the course for which he wishes to enroll.(courses are in a drop down menu)

If the person is for a job, we enter into database DB2, the personal details, and the type of job he is here for.(types of jobs are al;so in a drop down menu).

So basically,

1. the user first enters whether he is a student/teacher. He is then redirected to a page asking for his personal details, and course(for student)/position(for teacher).

2. The data in the 2 cases is inserted into different databases.

the PRoblem

Ir-respective of whether the person is a student/teacher, i want to use a common page to ask for his details. This page, will obviously be connected to a different database based on student/teacher. Also, the drop-down menu on the page will depend on teacher/student.

I am unable to implement this...

somebody help me out...

thx...
cheers...
__________________
2 ways to happines--->

1. Accept what you cannot change
2, Change what you cannot accept
hbk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #2 (permalink)
Old 4th July 2008, 12:59 AM
CE - Editor
 
xheavenlyx's Avatar
 
I'm a Crazy Electronics Hacker & Engineer
Join Date: 2nd October 2006
Location: Dubai, UAE
Posts: 572
Default Re: interesting situation

Ok, first of all is this an ofline problem or an online one?

Secondly, which programing language are you using?

It can be implemented depending on the above two questions.
xheavenlyx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)
Old 4th July 2008, 01:16 AM
hbk
CE - Apprentice
 
I'm a Crazy Computers Engineer
Join Date: 12th June 2008
Posts: 36
Default Re: interesting situation

Quote:
Originally Posted by xheavenlyx View Post
Ok, first of all is this an ofline problem or an online one?

Secondly, which programing language are you using?

It can be implemented depending on the above two questions.

I am using PHP/MySQL on WAMP server. I dont understand what you mean by online/offline.

please clarify..
__________________
2 ways to happines--->

1. Accept what you cannot change
2, Change what you cannot accept
hbk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)
Old 4th July 2008, 09:46 AM
CEan - Value Adder
 
kidakaka's Avatar
 
I'm a Crazy Computer Science Engineer
Join Date: 18th October 2006
Location: Mumbai, Hyderabad
Posts: 465
Send a message via AIM to kidakaka Send a message via MSN to kidakaka Send a message via Yahoo to kidakaka Send a message via Skype™ to kidakaka
Default Re: interesting situation

Hi HBK,

Have the common form post the variables to a php page. Are you using any framework, or is it plain PHP. If it is a plain php, then do NOT open the connection at the start of the page and close it at the bottom, choose to do this within a conditional statement (if-else).

So your logic would be simple -
if (student) {
open db1 connection;
process data;
enter into db1;
close db1 connection;
} else if (teacher) {
open db2 connection;
process data;
enter into db2;
close db2 connection;
} else {
exceptions; // optional
}

Hope this helps.
kidakaka is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 05:42 AM.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.Ad Management by RedTyger