Jump to content

cat_emma

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cat_emma's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks ALLAH I found the solution the problem is that I used to have the form in an htm extension while it should be php so that the server treats it I guess i changed the .htm to .php and now it works : ) tnx to all who tried to help
  2. the full url of the form is C:\Program Files\EasyPHP1-8\www\form1.htm
  3. I found in the file written: Order deny,allow allow from 127.0.0.1 deny from all so i just added the code u gave me, but i face the same problem...
  4. u mean I create a file in www and name it htaccess, then put the code u gave e in it? (sorry maybe my question is stupid, but I am in the first days of php)
  5. i am putting the file in the www, so i opened the form.htm from the localhost/...
  6. I invoke it by clicking the submit button of the form.htm page (I included its code in my first posting)
  7. I have included the code In fact i took it from a tutorial that I am trying to practice They show us in the tutorial how to use forms with POST method I took it from: http://www.php.net/manual/en/tutorial.forms.php What I am trying to do is: get name and age from a form and display in a php page a message that uses those parameters that I will get from the POST maybe I am doing it the wrong way help plz!
  8. thank you Chris, I am working with easyphp, and I alreayd tried php files and they open with internet explorer very fine The problem rose when I used a form that have an action of displaying the php file do you think of any other reason why this happens?
  9. hello everybody I am new here and to php I want to use the POST method to display the information entered in an html form, i want to display it in a php page. but the problem is: when i submit the form, i get a box to download the php form instead of having it displayed in internet explorer the code is bellow: [code]<html> <head> <title> form 1 </title> </head> <body> <form action="example_2-2.php" method="POST"> <P>Your name: <input type="text" name="name" /></P> <P>Your age: <input type="text" name="age" /></P> <P><input type="submit" /></P> </form> </body> </html>[/code] [u]php file[/u] [code]Hello <?php echo $_POST['name'];?> You are <?php echo $_POST['age'];?> Years old[/code] So when I fill the form and submit, insted of getting the exmaple_2-2.php displayed, i get a box that asks me whether i want to open or download the .php file. When I choose open, I get it open in a txt format I wonder what is the problem I will be so greatful if you help me, this is almost the first obstacle I face in php : ) Thank you Imane
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.