Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Should I use 2 pages or 1 for "creating" and "updating"

I find myself using 2 separate scripts to do nearly the same thing



12:37 pm on Sep 21, 2005 (gmt 0)

10+ Year Member

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?


12:46 pm on Sep 21, 2005 (gmt 0)

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

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.


Featured Threads

Hot Threads This Week

Hot Threads This Month