+ 1
Include file php cons.
What to do if I am including a file that has a form that will return to itself when I submit that form and have the stuff to do when it submits the form. All I am getting the problem is that when I submit that form it takes me to the file where I included that file. I have not words to explain...
4 Answers
+ 1
Dyf Dyf action refers to same page.
<Form action="#" >
+ 1
If I got it right you got a file A.php
Inside A.php you got a form which is include from B.php and all the treatment and stuff are done in B.php (the form page) ?
If it is like so you shouldn't have <form action=#> but <form action='B.php'> cause # refer to the current webpage and B (the form) being include in A the current page is A.php and not the B.php page you were aiming for
Hope I'm comprehensible enough and not too late
Good luck with that and it was not caused by that, do not hesitate to share your code
+ 1
Dyf Dyf thank you đ
0
Verify the action you asked your form to do
<Form type='post' action='x.php' >
Is it the good page you call ?
Is there any include or require on your form page ?