InNeedofHelp
06-07-2006, 08:14 PM
Hey DD,
I'm writing my own little forum script, nothing special just a very basic forum to help me learn PHP and mySQL. I've learned the basics so far, but one concept is just confusing me a ton. Let's say my forums consists of one front page, and one Post a Message page. So on my post a message page, i put the form and all that, and i have my form action be "forum.php" (the name of my main forum page). So that when i post my message, the action sends the post information to the main forum page. Here's the problem: on the front forum page i can write the code so that data from the form is inserted into a MYSQL table and whatnot. My question is, if that chunk of code is left in the script of the main forum page, then every time that page loads, whether or not i clicked on the Submit button on my post a message page, won't it execute the script? and each time the page loads it'll add more rows to the table even if i didn't go through the whole post a message page thing?
Sorry if that's worded strangely, but if anyone understands it and can help me i would greatly appreciate it.
Thanks in advance.
I'm writing my own little forum script, nothing special just a very basic forum to help me learn PHP and mySQL. I've learned the basics so far, but one concept is just confusing me a ton. Let's say my forums consists of one front page, and one Post a Message page. So on my post a message page, i put the form and all that, and i have my form action be "forum.php" (the name of my main forum page). So that when i post my message, the action sends the post information to the main forum page. Here's the problem: on the front forum page i can write the code so that data from the form is inserted into a MYSQL table and whatnot. My question is, if that chunk of code is left in the script of the main forum page, then every time that page loads, whether or not i clicked on the Submit button on my post a message page, won't it execute the script? and each time the page loads it'll add more rows to the table even if i didn't go through the whole post a message page thing?
Sorry if that's worded strangely, but if anyone understands it and can help me i would greatly appreciate it.
Thanks in advance.