2

Possible Duplicate:
php $_POST array empty upon form submission

I am trying to have a form filled out, then the data displayed on another page. The first document is this

<html>
<head>
</head>
<body>
<form action="testerpage.php" method="post">
Name: <input type="text" name="testname">
<input type="submit">
</form>
</body>
</html>

The other page (testerpage.php) is this

<html>
<body>
<?php 
echo $_POST["testname"];
?>
</body>
</html>

Why won't testerpage display the information from the first page(named welcome.php)? It doesn't work with "get" either

18
  • What version of php are you using ??? Commented Oct 17, 2012 at 22:46
  • try to type in address bar: testerpage.php?testname=welcome. Is it work? Commented Oct 17, 2012 at 22:46
  • @mario i think this may be different .. Commented Oct 17, 2012 at 22:47
  • 3
    What do you mean welcome doesn't work ????? you see you can see anything on the page ?? use var_dump($_REQUEST) Commented Oct 17, 2012 at 22:50
  • 2
    Check source code of resulting HTML page. Maybe PHP is disabled and PHP code just is not executed. If so, you should see your PHP code inside HTML output. Commented Oct 17, 2012 at 23:03

1 Answer 1

2

Given that you have untouched PHP code in your HTML output, it turns out PHP is disabled on your server so PHP code is not executed at all. Consult your hosting provider technical support on enabling PHP on server.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.