2

I installed Xampp and running a local server in order to test my php code. So I made a simple form which has a submit button and has action = seenotes.php and onSubmit = seenotes.php

The problem is when I click submit i get the error: Object not found! The requested URL was not found on this server. Error 404.

and the URL looks like this: http://localhost/MagodaSystems/seenotes.html?note=as&submit=Enter

See the seenotes.html part in the url? That file doesn't exist and I want it to be directed to seenotes.php instead. When I manually change that part of the link to seenotes.php I get the required page. How do I fix this so it automatically redirects to the correct php page? All my files are in a folder in htdocs.

1 Answers1

0

use the form in this manner:

<form method = "post" action = "seenotes.php" >

<!--you can also use method = "GET" as per your requirement.Sice you said all files are in same folder i gave action as the file name
all your input fields are here -->

<input type = "submit" />

</form>
Sourabh Kumar Sharma
  • 2,864
  • 3
  • 25
  • 33