i wrote this code for user register:
request.php => get user's info
- Code: Select all
<form name="frmNew" method="POST" action="newRequest.php?goto=" onsubmit="return checkInput();">
<input style="color:#00F;" type="text" name="txtUser" size="25" maxlength="30" class="textbox" /> <!--[i]ie: username[/i]-->
<input style="color:#00F;" type="password" name="txtPWD" size="25" maxlength="15" class="textbox" /> <!--[i]ie: password[/i]-->
</form
-----------------------------------------------------------------
newRequest.php => Check info
- Code: Select all
<form name="frmConf" method="POST" action="doreg.php?goto=">
<input type="hidden" name="txtUser" value="<?=$_POST["txtUser"]?>"/> <!--[i]username[/i]-->
<input type="hidden" name="txtPWD" value="<?=$_POST["txtPWD"]?>"/> <!--[i]password[/i]-->
<input type="hidden" name="from_" value="request"/> <!--[i] request[/i]-->
<input type="submit" name="new" value="Save"/>
</form>
-----------------------------------------------------------------------------------
doreg.php
- Code: Select all
<?php
echo $_POST["from_"]; <!--[i] request[/i]-->
echo $_POST["txtUser"]; <!--[i]username[/i]-->
echo $_POST["txtPWD"]; <!--[i]password[/i]-->
?>
------------------------------------------------------------------------------------
This code works correctly with Vertrigo (latest),
- Code: Select all
<?php
echo $_POST["from_"]; // [i] request[/i]
echo $_POST["txtUser"]; // [i]username[/i]
echo $_POST["txtPWD"]; // [i]password[/i]
?>
but incorrect with XAMPP (latest).
- Code: Select all
<?php
echo $_POST["from_"]; // [i] request[/i]
echo $_POST["txtUser"]; // nothing
echo $_POST["txtPWD"]; //nothing
?>
-------------------------------------------------------------------------
I don't know what is trouble ???
i'm newbie, i'm not good at English as w as php, so please tell me why in easy way.
Thanks a lot !