Hi,
I am beginer in PHP programming. I was trying to run a PHP code that I found somewhere. but I got error message. the code was something like this:
<body>
<if ($submit){
echo "hi"
} else{
?>
<form method="post" action="<?php echo $PHP_SELF?>">
<input type="Submit" name="submit" value="HI">
</form>
<?php
} //endif
?>
</body>
when I run this code, I got error message Undefined Variable on if($submit) then I changed it to this:
if (isset($submit)){
it worked but there are a lot of using variables before initializing. what's the problem? should I set something in PHP.ini file? I am using PHP on my windows XP (IIS).
I had another problem on this example. when I clicked on the button, I got an error page. I had to edit php.ini and set register_globals to ON which not recommended. why I have to set it to ON?
thanks