HTML showing PHP code written in value area

DeithWen

New Member
I have this HTML code. It is supposed to be a register form. It is using a Session to store the information in case something is wrong so that the user doesn't have to re-enter the information again. But somehow, it is writing the whole PHP code inside the value part. Yes it is in the format .php and I am using WAMP Server. I also tried to use APPServ but to no avail. Here is the code\[code\] <form action="register.php" method="post"> <h1>Register Form</h1> <table> <tr> <td>Login name:</td> <td><input type="text" name="login_name" value="http://stackoverflow.com/questions/15513186/<?=(!empty($_POST['login_name'])) ? $_POST['login_name'] : ''?>" /></td> </tr> <tr> <td>First name:</td> <td><input type="text" name="first_name" value="http://stackoverflow.com/questions/15513186/<?=(!empty($_POST['first_name'])) ? $_POST['first_name'] : ''?>" /></td> </tr> <tr> <td>Last name:</td> <td><input type="text" name="last_name" value="http://stackoverflow.com/questions/15513186/<?=(!empty($_POST['last_name'])) ? $_POST['last_name'] : ''?>" /></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="pw1" /></td> </tr> <tr> <td>Confirm password:</td> <td><input type="password" name="pw2" /></td> </tr> <tr> <td>Email:</td> <td><input type="text" name="email" value="http://stackoverflow.com/questions/15513186/<?=(!empty($_POST['email'])) ? $_POST['email'] : ''?>" /></td> </tr> <tr> <td colspan="2" style="text-align: center;"><input type="submit" name="register" value="http://stackoverflow.com/questions/15513186/Register!" /></td> </tr> </table></form>\[/code\]The only problem I'm having is what I mentioned: The textboxes show the PHP code I wrote in the value part. Everything else is working fine. I am using Chrome in Window 8. I should also note that I sent this code to a friend and it worked just fine and the only difference we have is that he is using Windows 7.
 
Back
Top