PHP Forms/Mysql questions



I am trying to learn PHP. I am starting with basic Form stuff and saving to a mysql database.

I have been using Dreamweaver Ultradev but want to code by hand now.

dreamweaver utradev/phakt generates this line

if (isset($MM_insert)) {
blah blah
store data in table...

Now what I can't find is where $MM_insert is getting set to anything.
So how can isset($MM_insert) validate as true if it is never being set to anything?

The other examples I am finding use one html file with one php file by way of
<form action="insert.php" method ="post">

now the Ultradev version doesn't use two files. It is all coded in one. Like this
<form action="<?php echo $MM_editAction?>" name="form1" method="post">

I assume the isset($MM_insert) validates as false the first time the form is displayed then when you press the submit button it refreshes the form and the $mm_insert is then processed as true and the database table gets updated.

Basically, how can I duplicate this code within the one PHP file?

Thanks for any help and sorry for the newbie questions
if you really want to know what your code is doing then dont use dreamweaver... Notepad rules!

.... dreamweaver will generate code on how the coders 'think' the code should work and how they would do it, so clearly lots of issues can arise from that. :evil: