CE Home
Navigation
Go Back   CrazyEngineers Forum > CE : Help Center > General Help
Notices


Advertisements
Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)
Old 3rd July 2008, 07:27 PM
hbk
CE - Apprentice
 
Join Date: 12th June 2008
I'm a Crazy Computers Engineer
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

  #2 (permalink)
Old 4th July 2008, 12:59 AM
CE - Editor
 
xheavenlyx's Avatar
 
Join Date: 2nd October 2006
Location: Dubai, UAE
I'm a Crazy Electronics Hacker & Engineer
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
 
Join Date: 12th June 2008
I'm a Crazy Computers Engineer
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
 
Join Date: 18th October 2006
Location: Mumbai, Hyderabad
I'm a Crazy Computer Science Engineer
Posts: 472
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
Reply

Thread Tools
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

BB 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 08:13 PM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.

Advertisements