homepage Welcome to WebmasterWorld Guest from 54.167.182.201
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Should I use 2 pages or 1 for "creating" and "updating"
I find myself using 2 separate scripts to do nearly the same thing
benlieb

10+ Year Member



 
Msg#: 45 posted 12:37 pm on Sep 21, 2005 (gmt 0)

My users fill out form of "appointment information" that is entered in the db as a new appointment. I have a nearly identical script that allows them to modify appointment info that they previously entered.

Should I make one processing script for both of these and send extra vars to tell the script which query to perform, or should I keep it simple and use two separate scripts.

I'll have 10-15 pairs of such new/modify scripts. What do db programmers usually do?

 

txbakers

WebmasterWorld Senior Member txbakers us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 45 posted 12:46 pm on Sep 21, 2005 (gmt 0)

I like to keep all my processing for that page on that page.

So if the page does offer two functions (update and delete) I will write the code on that same page and test the submit variable to determine which code to run.

Unless of course that I want extra validation on a delete in which case I make it into a separate screen: Are you SURE you want to delete?

But I find that having all the code on one page helps me stay organized as the site grows.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved