When I send http request by typing http://localhost/phptest3.html in address bar, its displaying fine in browser. But when I send http request by typing http://locahost/dogAbduction.html in address bar, I am getting error message. "Page can not be found"
Why is that ?
When I double click on file name dogAbduction.html , its displaying fine in browser.
Thanks
Last edited by manishrathi; 10-03-2012 at 06:00 PM.
1.) dogAbduction.html
it is displaying that the page cant be displayed because you stated in the form that abductionForm.php will process the file after you press submit, but you dont have that file.
2) phptest3.html also tries to call this file phptest3.php to process the input
.html files will display fine no matter what.
you are missing these two files: abductionForm.php , and phptest3.php
basically those php files will grab the input from your .html files and store it in variables, from there you can send it to email to any address , etc.
When I send http request by typing http://localhost/phptest3.html in address bar, its displaying fine in browser. But when I send http request by typing http://locahost/dogAbduction.html in address bar, I am getting error message. "Page can not be found"
Why is that ?
Does the file actually have an uppercase "A" in it? And I presume this "locahost" is a typo, you're using "localhost"? I.e. perhaps it is actually http://localhost/dogabduction.html
I have tried dogabduction.html and dogAbduction.html (with uppercase and lowercase), it gives same error in either case.
There are other HTML files with uppercase letters in file name , but still they work fine.
I have replaced dogabduction.php with phptest3.php in action field. phptest3.php is present in www dir of wamp. When I try to get dogabduction.html, I am still getting same error message.
phptest3.html is working fine, which is in same location like dogabduction.html
I have tried dogabduction.html and dogAbduction.html (with uppercase and lowercase), it gives same error in either case.
There are other HTML files with uppercase letters in file name , but still they work fine.
I have replaced dogabduction.php with phptest3.php in action field. phptest3.php is present in www dir of wamp.
i think you have the wrong ideas what the action field is used for, you dont just put anything in that field, the action field will call the file that you specify there as soon as you press the submit button,
OR leave the action field empty but you will have to make your file a .php file with code like :
PHP Code:
if (isset($_POST['send'])) {
// email processing script
$to = 'john@example.com';
$subject = 'Feedback from example.com';
// list expected fields
$expected = array('name', 'email', 'comments', 'subscribe', 'interests', 'howhear', 'characteristics');
// set required fields
at the top of your file in order to process the information.
I understand that. But problem here is HTML file which is used to submit form is not displaying. Whats wrong with that. If I am giving something wrong in action field, then that will cause problem , when I submit. It should not cause problem in loading file. Why is dogabduction.html file is not getting displayed ?
notice localhost has a typo, you wrote it as locahost
i just copied and pasted your 2 files to my local xampp , and both display fine
on my pc i put it in a "aliens" folder : http://localhost/aliens/dogabduction.html
displays fine.
there should be no problem in displaying html files, i would suggest to go to your www directory , and double
check the filenames, and enter them manually. you are getting that error because it is not finding that page
Bookmarks