Welcome to WebmasterWorld Guest from 54.167.219.201

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)

Junior Member

10+ Year Member

joined:Nov 1, 2004
posts:130
votes: 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?

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

Senior Member

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

joined:Sept 1, 2001
posts:4392
votes: 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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members