0

I am struggling to resolve a very easy task. I am very new to programming of any nature. Appreciate help.

1: I am passing below URL from a form to a .php code http://localhost:8080/StaticLoginPage/FormProcessor.php?uname=mandar

2: PHP Code below - In this code I am not able to print uname on the page. Output only displays Welcome and no uname.

3: Additional info: I am using Eclipse latest version I am working in "Static Web project"

<html>
<head></head>
<body>
Welcome <?php echo $_GET["uname"]; ?><br>
</body>
</html>
2
  • Please share code in FormProcessor.php file. Commented Dec 21, 2016 at 6:42
  • Always enable error reporting, add these lines ini_set('display_errors', 1); error_reporting(E_ALL); at the very top of your PHP scripts and see if it yields any error or not. Also, do var_dump($_GET); to see the complete superglobal structure. Commented Dec 21, 2016 at 6:45

2 Answers 2

2

To to this you have to run your code in a php server like apache. the following link might help.

http://editrocket.com/articles/php_apache_windows.html

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

Comments

0

you need a php server like apache to use php and you need to save your file as a .php file

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.