0

I try to use a html form to call a php script. The link to the from is: http://scryptpower.de/login. Everytime I click "Senden" the php script should be called, but everytime I click the button, the script location shows me in the url, but the script didn´t run. It duplicate the whole page.

HTML:

<html><body><form action="scripts/login.php" method="post"><input type="submit"></input></form></body></html>

PHP:

<?php echo "Hello World"; ?>

Maybe this is because I use cloudflare ?

Regards

Nico

Nigho
  • 13
  • 1
  • 4
  • try: `action="/scripts/login.php"` – Black Sheep May 22 '14 at 18:13
  • have you any mod_rewrite rules? – chresse May 22 '14 at 18:14
  • Ok thanks, that fixed only the duplication, but the php script isn´t called. – Nigho May 22 '14 at 18:16
  • Yes I have some rewrite rules for e.x. login.html /login – Nigho May 22 '14 at 18:16
  • Check you have PHP installed. Create a test.php and add the following: – pedrum golriz May 22 '14 at 18:21
  • Yes I have php installed :) The register script works fine with mysql etc. the only script which doesn´t work is the login script. I upload this file to scryptpower.de/test.php – Nigho May 22 '14 at 18:21
  • 1
    Can you access the login.php directly to see what it returns. Then try using the same whole url in your action. This will confirm that the login.php is working but your (short) URL is not correct. – Nawed Khan May 22 '14 at 18:25
  • Looks like the login page http://scryptpower.de/scripts/login.php. The login file also have a other icon like the others in the folder http://scryptpower.de/scripts/ – Nigho May 22 '14 at 18:28
  • Just look like a file without login in the name work scryptpower.de/test1.php – Nigho May 22 '14 at 18:31
  • Ok scryptpower.de/scripts/test.php work fine, but scryptpower.de/scripts/1login.php doesn´t work LoL Thank you for your help :) – Nigho May 22 '14 at 18:37
  • scryptpower.de/login and scryptpower.de/scripts/login.php are the same file. Basically posting the form to itself. You must have some if/else blocks in your login.php that is preventing the echoing of "Hello World". Can we see the php code of login.php? – Nawed Khan May 22 '14 at 18:38
  • It´s the php code from above Maybe this has something to do with the rewrite engine ? – Nigho May 22 '14 at 18:40
  • Yes definitely! redirecting back to the form page. – Nawed Khan May 22 '14 at 18:41
  • Ok I will try to fix it: .htaccess looks like this RewriteEngine On RewriteRule login login.html RewriteRule register register.html RewriteRule home index.html RewriteRule pricing pricing.html RewriteRule support support.html RewriteRule verify scripts/verify.php – Nigho May 22 '14 at 18:43

0 Answers0