Paul Posted September 21, 2014 Share Posted September 21, 2014 Hi everyone,Hope you're all well. Have a look at the following seemingly very straightforward code from a file called 'orders/customer_details.php'. <form action="customer_details.php" method="post" /> <input type="hidden" value="TRUE" name="submitted" /> <input type="submit" value="Place your order" /> </form> Unless I've been misunderstanding for years when I click on 'Place your order' the page should direct to 'customer_details.php' (itself) where there will eventually be other form fields, validation etc. However it redirects to 'orders/basket.php'. I have no idea why? I've looked through every line of code in 'customer_details.php' and the only time the word basket is mentioned is in comments or HTML. There is no redirection code to 'basket.php'. There is file called 'basket/basket.php' but it's in a seperate directory to this redirection which is to orders/basket.php. I've tried everything I can think off. I've deleted the file and typed everything in manually. I've copied the code through Notepad in case there's anything odd in the bckground. I've bypassed Dreamweaver (because sometimes that has a mind of its own) and ran the url manually through XAMPP. Nothing seems to work. I can't believe something so easy doesn't work. I've loads of other forms on this site with exactly the same code and they work. Bizarre. Any help would be greatly appreciated before I go crackers! Cheers Paul Link to comment Share on other sites More sharing options...
Paul Posted September 21, 2014 Author Share Posted September 21, 2014 Hi again, Ignore this post, I've worked it out. I was looking for redirects but what I've just noticed is that I've left some form action code on one of the include files that should have been deleted. Delete it and it works OK. Learnt something today. My apologies for bothering everyone. Cheers Paul Link to comment Share on other sites More sharing options...
Larry Posted September 22, 2014 Share Posted September 22, 2014 No problems, Paul. Thanks for sharing your experience! Link to comment Share on other sites More sharing options...
Recommended Posts