-4

working a little bit with forms in HTML. using the POST method, but im a little confused about the way the url should look. i have a process.php file in the libraray with all my other website pages. im not sure if the usrl should be: "http://localhost/process.php" or just "process.php".

what is the difference between them ? when im trying the first one im getting this page: "Not Found

The requested URL /process.php was not found on this server."

and when im trying the other one im getting this page :

ERR_EMPTY_RESPONSE

and i have installed wamp...

thank you

Robert
  • 5,278
  • 43
  • 65
  • 115
shimi
  • 1

1 Answers1

0

localhost/process.php will look for a file named process.php in the root directory of your server (you can change the root directory in the httpd.conf file). The root directory is where your index.html or index.php is. Linking it to just "process.php" will search for the file in the same working directory as the HTML/PHP file it is being linked from.

Provide code for a more detailed answer.

lagboy
  • 94
  • 4
  • If both are in the same place, then yes that should happen. Try the following: Type localhost into the browser and check if the server root is where you think it is, then try localhost/process.php and tell me if it is opening. Post the HTML Page code too. – lagboy Sep 04 '15 at 08:29
  • im not sure what you mean by "type localhost in the browser". but the localhost/process.php is still getting to the "not found url".@lagboy – shimi Sep 04 '15 at 08:35
  • Check your server root in httpd.conf – lagboy Sep 04 '15 at 08:39
  • is that "/usr/local/apache2" possible serverRoot ? @lagboy – shimi Sep 04 '15 at 08:56
  • Could be, go to apache/conf/httpd.conf and check :) – lagboy Sep 04 '15 at 08:58
  • i found the httpd.conf but it includes more than one "serverRoot" so im confused... i got two possible adresses : "with ServerRoot set to "/usr/local/apache2" will be interpreted by the" (1) "same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "E:/wamp/bin/apache/apache2.4.9" these two quotes are from the httpd.conf which one is it ? @lagboy – shimi Sep 04 '15 at 09:02
  • Don't change anything preceded by a "#" and don't remove the "#" – lagboy Sep 05 '15 at 12:16