I have the following:
<form action="sendfeedback.php" method="POST">
and the sendfeedback.php file is in the same dir as the form.php file. But when I click on submit I don't get the right path. I see:
http://localhost:8080/bse/contacts/bse/ ... edback.php
(notice the duplicaiton of bse/contacts in url).
I want it to up at:
http://localhost:8080/bse/contacts/sendfeedback.php
Any reason why it is putting part of the path url in twice?
I tried the full path:
<form action="http://localhost:8080/bse/contacts/sendfeedback.php" method="POST">
and <form action="c:/program files/apache group/apache2/htdocs/bse/contacts/sendfeedback.php" method="POST">
(right now I am testing this on my desktop).
I have apache2, php, and mysql running. No other problems with it finding other pages.
Also, I am confused by something. Do I need double quotes or no quotes around the action file name?
Help would be appreciated.
Thanks
form action=filename in feedback form results in wrong path
Moderator: General Moderators
Wierd...
Would this work?
And you need double quotes around every value in html.
Would this work?
Code: Select all
<form method="post" action="<?php echo 'http://'.$_SERVER['SERVER_ADDR'].dirname($_SERVER['PHP_SELF']).'/sendfeedback.php'; ?>">
Result:
<form method="post" action="http://192.168.0.2/test/sendfeedback.php">Will check out possible fix for my problem
I will try this tomorrow morning and post results.
Thanks for the code.
Thanks for the code.
why does it display text of the .php file
I was a goof ball. I realized I had <? but not <?php at the beginning of the code. But now using:
<form action="http://localhost:8080/bse/contacts/sendfeedback.php" method="POST">
it opens up and displays the text version of the sendfeedback.php file instead of executing the code for it?
Anyone know what I'm doing wrong?
Thanks.
<form action="http://localhost:8080/bse/contacts/sendfeedback.php" method="POST">
it opens up and displays the text version of the sendfeedback.php file instead of executing the code for it?
Anyone know what I'm doing wrong?
Thanks.