PDA

View Full Version : PHP Problem



agiantdwarf
April 20th, 2002, 00:40
Hello all,

I am writing a script that you fill out a form, and it submits the form data to itself (ie <form action="<?php $PHP_SELF?>">), with a hidden field named "submit" to see if the form has been submitted when the page reloads.. The problem is when I do some php code like this:

if($submit){
//do something
}

The problem is, when I load the page for the first time, it says $submit is undefined, with a warning.

How do I fix this?

megapuzik
April 20th, 2002, 03:37
try this :


if(isset($submit))
{
#bla
}

agiantdwarf
April 21st, 2002, 02:07
Thanks! It worked!