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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.