Hi,
I'm adding two new fields to the registration form, a gender selector and location seletor and could use some help fixing bugs...
The gender selector is cloned from formradioyn.php and displays fine but won't post to the DB (i have created an int field called 'user_type' to recieve it)
The location selector uses the existing 'user_from' DB field but I want to use the formselectcountry.php drop down. Again, this displays fine but only enters a zero into the DB.
Have spent hours on this and can't seem to figure it out. Any help wold be really appreciated!
Changed code snippets for register.php and registerform.php are below.
Thanks,
Dan
register.phpfrom line 117$op = !isset($_POST['op']) ? 'register' : $_POST['op'];
$uname = isset($_POST['uname']) ? $myts->stripSlashesGPC($_POST['uname']) : '';
$email = isset($_POST['email']) ? trim($myts->stripSlashesGPC($_POST['email'])) : '';
$name = isset($_POST['name']) ? $myts->stripSlashesGPC($_POST['name']) : '';
$url = isset($_POST['url']) ? trim($myts->stripSlashesGPC($_POST['url'])) : '';
$pass = isset($_POST['pass']) ? $myts->stripSlashesGPC($_POST['pass']) : '';
$vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC($_POST['vpass']) : '';
$user_from = isset($_POST['user_from']) ? intval($_POST['user_from']) : '';
$timezone_offset = isset($_POST['timezone_offset']) ? intval($_POST['timezone_offset']) : $xoopsConfig['default_TZ'];
$user_type = (isset($_POST['user_type']) && intval($_POST['user_type'])) ? 1 : 0;
$user_viewemail = (isset($_POST['user_viewemail']) && intval($_POST['user_viewemail'])) ? 1 : 0;
$user_mailok = (isset($_POST['user_mailok']) && intval($_POST['user_mailok'])) ? 1 : 0;
$agree_disc = (isset($_POST['agree_disc']) && intval($_POST['agree_disc'])) ? 1 : 0;
from line 155echo _US_TIMEZONE.": $f_timezone
";
echo "