here is the test.html

<html>
<body>

<form action="test1.php" method=post>
Name :<input name= "name" type="text">

</body>
</html>

And here it is the test1.php

<?php
$name= $_POST['name'];
echo $name;


?>

But it doesnt display the name .Can anyone help me ??

<form action="test1.php" method="post">

That should fix your issues.

now my html code is this :

<html>
<body>

<form action="test1.php" method="post">
Name :<input name= "name" type="text">
<input type="submit" name="submit" value="submit!">

</form>

</body>
</html>

and test1.php is this :

<?php
$name= $_POST['name'];
echo $name;


?>

When I press the buttom submit I go in a blank page ..

change test1.php to this:

<?php
print_r($_POST);
?>

And post the output

Nothing . Blank page.
what I am doing wrong?

Try to change input name to something other.

Good question.
Looks like its the environment rather than the code, I tested the code and that runs fine.

Right click the page and view source, is the PHP code showing?

// wrong.
<input name= "name" type="text">
get rid of the spaces in your form.
<input name="name" type="text">

hi brother i have checked this code as well but nothing wrong with this so please try to look at you environment in which you are runing it

is your web server running?

Can anyone help me install CORRECT php ?????

Can you help me install correct php ?

Do you have MSN or something?

You can download a php server from the following link:
appservnetwork.com
If your operating system is Win7 then you should download the AppServ Open Project 2.5.10
If you have an older version of Windows you should download the AppServ Open Project 2.6.0
This project includes PHP, MySQL, phpMyAdmin and a PHP text processor.
Hope it helps.

Thank you vey much all!!!!!! :)

You're welcome.. If this thread has been solved, would you mind marking it as solved?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.