I have a web form which uses java-script for validation, so the javascript uses name tag for specification. like this
<input name="signup[username:1:6:16:::username_check]" id="signup_username" class="join_input" type="text" value="" size="25">
also the form is using post method to a php file which handles further action,
so how can i catch the username in php ?
i have tried with
$thisusername=$_POST[signup_username];
and
$thisusername=$_POST[signup[username:1:6:16:::username_check]];
but it doesnt work.
as name tag is being used for javascript validation, what else i can do ?
update
i used var_dump() as E_p suggested and got this
array(5) { ["signup"]=> array(3) { ["username:1:6:16:::username_check"]=> string(10) "myusername" ["password:1:6:16:::password_check"]=> string(10) "mypassword" ["email:1:1:128:::email_check"]=> string(12) "my@email.com" } ["type"]=> string(2) "cc" ["mem"]=> string(1) "3" ["x"]=> string(3) "171" ["y"]=> string(2) "18" }
thanks
Solved
i am using
$thisusername=$_POST['signup']['username:1:6:16:::username_check'];
like this to catch arrays values in variables. thanks a lot, for your help people.