MyBB Community Forums

Full Version: registration post data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to get the value of a profile_field after the registration form is submitted.

If I do a view source of the form, the field appears like this:

<input type="text" name="profile_fields[fid5]" id="fid5" class="textbox" size="0" />

So I assumed that after the form was posted I could get the value like this

$myValue = $profile_fields['fid5'];

however $profile_fields['fid5'] is not returning any value.

does anyone know how to retrieve the value for my profile_field?
You can check out this tutorial.
Thanks for the reply. but I don't think that applies to what I'm trying. where I'm trying to get the value is in member.php so I can validate the field. I'm already validating via ajax but when the form is posted I need to validate a second time.

The problem is I cannot get the value of my field.

I have tried $fid5, $post['fid5'], $profile_fields['fid5'], and input['fid5']

but none of these contain any data.
Oh, so you want it the same was as the Username or password fields? How the have a green border if you have put in the correct data?
Thanks again for your help I just figured it out.

Yes that was my first goal. So I added ajax verification and it worked very nicely except The fields are validated in two places and I didnt realize it once for ajax validation and again when the data is posted. My problem with the variable was that the profile_fields were already cleared where I was trying to read them.

by moving my

$myVariable = $profile_fields['fid5'];

to the top of member.php

it is now working correctly. and I can validate the entered information before letting them register.