PHP Forms/Mysql questions

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 19
Joined: Sun Apr 13, 2003 7:23 pm

Sat Jun 28, 2003 11:40 am

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

php-forum Active User
php-forum Active User
Posts: 264
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Sat Jun 28, 2003 3:01 pm

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:

Post Reply