Credit Counseling - Cadillac - Loans - Credit Check - Secured Loans

PDA

View Full Version : Design question


ghadacr
Jul 31st 2007, 8:10 am
Hey all,

I got a design question:

I want to design a script that can add details to a database, but the details are all going to be different:

For instance the user will enter details such as title, surname ect ect ect....

Once that is done, the user can add another set of details by clicking a button and another set of form with the same HTML elements embedded will appear...

So basically is there a way of doing this is PHP, or another design technique i can use to implement this?

Thanks in advance...

ecentricNick
Jul 31st 2007, 8:30 am
Yes, that can be done with php. It's kind of what its best at.

in pseudo code form, what you want is this...

if(the user submitted some data){
if (the submitted data passes validation){
insert that data into the database;
provide on screen infor that the record was inserted;
clear the posted data
}else{
provide on screen info of what failed validation;
}
}

display the input form, which will post back to this page
display within form, elements for all the data we wish to capture, defaulting to any previously passed data
display within form, submit button


As you stated this was a design question, not a coding question, that's the basic design.

It's one php page, it combines the data collection, the validation and the insertion, and if all goes well, it lets the user input another set of the same data.

ghadacr
Jul 31st 2007, 8:49 am
Thanks hombre.......

nagasharmi
Aug 2nd 2007, 1:58 am
First get all value ,
Add some to that values
finally stored into database.

if you want same detaisl
just get value from database and subtract what value you added from databse value