Jump to content

Recommended Posts

Posted

Hey guys,

Right heres the thing i've been re-doing our pilot registration page and added a few more things like DoB, City of Residence, Why they want to join our VA and one or two more things I want to add. Anyway I'm not sure how I would get this information to like send when the pilot sends it.

newreg.png

With the DoB and Why they want to join just want that for admins to see so what do I need to add and where?

I know its prob a big task? but if someone can just get me going then im sure I'll be fine (fast learner)

Thanks! :D

  • Moderators
Posted

Joshua,

There are three things that you need to make them work.

1) You need to add the new columns, in the phpvms_pilots database. Set them to the appropriate fields.

2) You need to change the registration.php file. Add new data arrays, so the registration can process the new fields.

3) You also need to change the RegistrationData.class. You have to add new fields in the SQL Query.

Just have a look at those files, I'm pretty sure you will understand it.

Posted

Joshua,

There are three things that you need to make them work.

1) You need to add the new columns, in the phpvms_pilots database. Set them to the appropriate fields.

2) You need to change the registration.php file. Add new data arrays, so the registration can process the new fields.

3) You also need to change the RegistrationData.class. You have to add new fields in the SQL Query.

Just have a look at those files, I'm pretty sure you will understand it.

Well I've added and changed what I think needs to be done but whenever I click the submit button it simply clears the page and doesn't send the registration. Would you or someone else mind have a quick check through the files to see if I've done it right. I've included the registration script, registrationdata.class and the _pilots table.

If someone wouldn't mind checking that would be awesome :)

Sorry to be a pain in the ass!

registration.zip

  • Moderators
Posted

Okay, the problem.

You have to add new columns in the query in the data.class file.

   	$sql = "INSERT INTO " . TABLE_PREFIX . "pilots (firstname, lastname, email,
				code, dob, location, city, hub, password, salt, confirmed, joindate, lastip, reason)
			  VALUES (
               	'{$firstname}', '{$lastname}', '{$data['email']}', '{$code}', '{$data['dob']}',
				'{$location}', '{$data['city']}, '{$data['hub']}', '{$password}', 
               	'{$salt}', {$confirm}, NOW(), 
               	'{$_SERVER['REMOTE_ADDR']}', '{$data['reason']}'
               	)";

Give that a whirl and see if it works.

  • Administrators
Posted

I don't know why you're doing all that.

Add custom profile fields from the admin panel. They will show up on the registration form, and you can select them as private so only the admin can see them.

  • Moderators
Posted

If I did them as custom fields though they would all be grouped together whereever I put the code to include the custom fields but I want them separate so like DoB under email, vatsim id at the bottom, etc.

You can display what you want by using a custom sql to display the id of the field.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...