Joshua John Posted November 4, 2011 Report Share Posted November 4, 2011 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. 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! Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted November 5, 2011 Moderators Report Share Posted November 5, 2011 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. Quote Link to comment Share on other sites More sharing options...
Joshua John Posted November 5, 2011 Author Report Share Posted November 5, 2011 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 Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted November 5, 2011 Moderators Report Share Posted November 5, 2011 Joshua, I'll have a look. No worries. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted November 5, 2011 Moderators Report Share Posted November 5, 2011 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. Quote Link to comment Share on other sites More sharing options...
Joshua John Posted November 5, 2011 Author Report Share Posted November 5, 2011 Sorry tried it but still not working :/ Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted November 5, 2011 Administrators Report Share Posted November 5, 2011 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. Quote Link to comment Share on other sites More sharing options...
Joshua John Posted November 5, 2011 Author Report Share Posted November 5, 2011 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. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted November 5, 2011 Moderators Report Share Posted November 5, 2011 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. Quote Link to comment Share on other sites More sharing options...
Joshua John Posted November 6, 2011 Author Report Share Posted November 6, 2011 You can display what you want by using a custom sql to display the id of the field. Awh didn't know you could pull certain fields, assumed you could only get them all together. How would I go about doing that? 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.