cluce Posted April 27, 2007 Share Posted April 27, 2007 <form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>"> <input name="username" type="text" id="username" /> </div></td></tr> <tr> <td><div align="left">Password:</div></td> <td> <div align="center"> <input name="password" type="text" id="password" /> </div></td></tr> </table> <p> <input type="submit" name="Submit" value="Logon" /> <input name="Cancel" type="reset" id="Cancel" value="Cancel" /> </form> page 2 code....... <?php echo( "Welcome ,$_POST[username]!" ); ?> </p> OK, I can pass the data when I uses apache 1.2 version but when I use WAMP and apache 2 it won't pass the data from one page to another. I am puzzled. Can someone see why I can't display the username upon them logon on? Thanks Link to comment https://forums.phpfreaks.com/topic/49005-i-have-a-logon-page-that-i-want-to-greet-the-user-but-the-username-is-not-showin/ Share on other sites More sharing options...
per1os Posted April 27, 2007 Share Posted April 27, 2007 Use [ code ] tags next time. Try this: <?php echo "Welcome, " . $_POST['username'] . "!"; ?> It could be the apache settings or the PHP settings, but the index of an array, if it is not an integer should always be encapsulated in " " or ' ' or else the php script takes it as a constant which it isn't and may throw an error. Link to comment https://forums.phpfreaks.com/topic/49005-i-have-a-logon-page-that-i-want-to-greet-the-user-but-the-username-is-not-showin/#findComment-240058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.