0

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 ??

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

7
Contributors
16
Replies
17
Views
6 Years
Discussion Span
Last Post by Hani1991
Featured Replies
  • 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 … Read More

  • hi here is the link [url]http://www.apachefriends.org/en/xampp.html[/url] it's XAMPP and have each and every thing in it you just need to install it mysql,php apache server will be automatically installed Read More

0

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 ..

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

0

Nothing . Blank page.
what I am doing wrong?

Edited by emilakia: n/a

0

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?

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

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

1

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.