Jump to content


Photo

browser can't find $_SERVER['PHP_SELF']


  • Please log in to reply
1 reply to this topic

#1 taps128

taps128
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 16 May 2006 - 07:34 AM

im using a

if(!_POST['submit'])
                           {
                           ..... do form
                           }
else 
     {
     insert data into the database
      }

and as a result on hit submit my browesr starts to search on google, but on another module on the same
database it works just fine.. anyone any ideas?

#2 taps128

taps128
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 16 May 2006 - 08:00 AM

[!--quoteo(post=374212:date=May 16 2006, 07:34 AM:name=Nikola Stjelja)--][div class=\'quotetop\']QUOTE(Nikola Stjelja @ May 16 2006, 07:34 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
im using a

if(!_POST['submit'])
                           {
                           ..... do form
                           }
else 
     {
     insert data into the database
      }

and as a result on hit submit my browesr starts to search on google, but on another module on the same
database it works just fine.. anyone any ideas?
[/quote]

...

the module works when i use

form action="http://localhost/pekare/dosomething.php"

but when i use

form action="<?=$_SERVER['PHP_SELF']?>"

i looks for pekare (which is the directory where my db is situated) on serbian yellow pages?!

and it seems i corrected the problem

the file name was apparently to long .... it was originaly called formular_za_unos_proizvoda.php
, and I later shortened it to unos_proizvoda.php




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users