Skip to content
Advertisement

php form action php self

I have a php form like this.

JavaScript

In form action I want to use page name with parameters. like house.php?p_id=10111 . But $_SERVER[‘PHP_SELF’] gives only the house.php (My page full url is house.php?p_id=10111 like this) Please help me to solve this problem. thanks.

Advertisement

Answer

How about leaving it empty, what is wrong with that?

JavaScript

Also, you can omit the action attribute and it will work as expected.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement