-1

I have the first php page called index.php and another called act.php both in the same folder in localhost(www folder) when i use in form action this url : localhost/project/act.php work fine :) & this message appear :l'authentification a ete passe avec succes, But When I use relative position act.php doesn't work and I see the whole page code :

 <?php 
        echo "l'authentification a ete passe avec succes";
          ?>

any help is very appreciate,Thanks.

1- index.php Page :
<form action="act.php">
<input type="text"  id="log"  placeholder="Login.."><br>
<input type="password" id="Psw" placeholder="Password.."><br>
<input type="submit" value="Connecter">
</form>

2- act.php Page :
<?php 
echo "l'authentification a ete passe avec succes";
 ?>
John_P
  • 103
  • 6
  • what are you trying to do here? you've no name attributes, no method, and nothing being passed to your second page – Funk Forty Niner Dec 22 '15 at 23:04
  • I don't want to pass anything! Just When I click in submit button this message appear : l'authentification a ete passe avec succes,Using form action – John_P Dec 22 '15 at 23:08
  • possible duplicate of http://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-i-can-see-it-on-source-code-of-page – Funk Forty Niner Dec 22 '15 at 23:18
  • In Wampserver I clicked on 'restart all servies' and now it works fin,Thank you so much Sir! – John_P Dec 22 '15 at 23:40

1 Answers1

0

Your snippets should work. You should not see php code - most likely you don't have php handlers configured.

scope
  • 1,967
  • 14
  • 15