forumnz Posted May 12, 2007 Share Posted May 12, 2007 This script won't allow the user to select country - please help. Thanks. <?php if ( !defined( 'SMARTY_DIR' ) ) { include_once( 'init.php' ); } $_SESSION['from'] = $countrycode = ($_SESSION['from']!= '') ? $_SESSION['from'] : $config['default_country']; $lang['states'] = getStates($countrycode,'Y'); if (count($lang['states']) == 1) { foreach ($lang['states'] as $key => $val) { $_SESSION['stateprovince'] = $key; } } if ($_SESSION['stateprovince'] != '') { $lang['counties'] = getCounties($countrycode, $_SESSION['stateprovince'], 'N'); if (count($lang['counties']) == 1) { foreach ($lang['counties'] as $key => $val) { $_SESSION['countycode'] = $key; } } if ($_SESSION['countycode'] != '') { $lang['cities'] = getCities($countrycode, $_SESSION['stateprovince'], $_SESSION['countycode'], 'N'); if (count($lang['cities']) == 1) { foreach($lang['cities'] as $key => $val) { $_SESSION['citycode'] = $key; } } if ($_SESSION['citycode'] != '') { $lang['zipcodes'] = getZipcodes($countrycode, $_SESSION['stateprovince'], $_SESSION['countycode'], $_SESSION['citycode'], 'N'); } } } $_SESSION['lookfrom'] = $lookcountrycode = ($_SESSION['lookfrom']!= '') ? $_SESSION['lookfrom'] : $config['default_country']; /* $_SESSION['timezone'] = '-25'; */ $lang['lookcountries'] = "New Zealand"; $lang['lookstates'] = getStates($lookcountrycode,'Y'); $lang['signup_gender_values'] = get_lang_values('signup_gender_values'); $lang['signup_gender_look'] = get_lang_values('signup_gender_look'); $lang['tz'] = get_lang_values('tz'); $zipsavailable = $db->getOne('select count(*) from ! where countrycode=?', array(ZIPCODES_TABLE, $lookcountrycode) ); $t->assign('zipsavailable', $zipsavailable); if ($_SESSION['lookstateprovince'] != '') { $lang['lookcounties'] = getCounties($lookcountrycode, $_SESSION['lookstateprovince'], 'Y'); if (count($lang['lookcounties']) == 1) { foreach ($lang['lookcounties'] as $key => $val) { $_SESSION['lookcounty'] = $key; } } if ($_SESSION['lookcounty'] != '') { $lang['lookcities'] = getCities($lookcountrycode, $_SESSION['lookstateprovince'], $_SESSION['lookcounty'], 'Y'); if (count($lang['lookcities']) == 1) { foreach($lang['lookcities'] as $key => $val) { $_SESSION['lookcity'] = $key; } } if ($_SESSION['lookcity'] != '') { $lang['lookzipcodes'] = getZipcodes($lookcountrycode, $_SESSION['lookstateprovince'], $_SESSION['lookcounty'], $_SESSION['lookcity'], 'Y'); } } } $_SESSION['radiustype'] = 'kms'; if ($lookcountrycode == 'US') {$_SESSION['radiustype'] = 'miles';} $t->assign('password',$_SESSION['password'] ); $t->assign('password2',$_SESSION['password2'] ); $_SESSION['txtlookagestart'] = ($_SESSION['txtlookagestart'] > 0)? $_SESSION['txtlookagestart']$config['end_year']*-1); $_SESSION['txtlookageend'] = ($_SESSION['txtlookageend'] > 0)? $_SESSION['txtlookageend']$config['start_year']*-1); $t->assign ( 'signup_error',get_lang('errormsgs',$_GET['errid']) ); if ($_SESSION['selectedtime'] != '') { $t->assign('selectedtime', $_SESSION['selectedtime']); $_SESSION['selectedtime'] = ''; } else { $t->assign( 'selectedtime' , date( 'Y-m-d', mktime( 0, 0, 0, date('m'), date('d'), date('y')-25)) ); } $t->assign('lang', $lang); $t->assign('rendered_page',$t->fetch('signup.tpl')); $t->display( 'index.tpl' ); ?> Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/ Share on other sites More sharing options...
utexas_pjm Posted May 12, 2007 Share Posted May 12, 2007 That script also will not solve differential equations, vaccum your floor, or change your car's oil. Perhaps you could be a little more descriptive of the problem? Is there an error? Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/#findComment-251529 Share on other sites More sharing options...
MadTechie Posted May 12, 2007 Share Posted May 12, 2007 OK.. is that a good thing or bad thing ? more detail please Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/#findComment-251530 Share on other sites More sharing options...
forumnz Posted May 12, 2007 Author Share Posted May 12, 2007 Ok sorry, Its a sign up script - signup.php which basically asks users to enter info. There is a drop down box allowing the user to selt their country - it only displays 'Select Country' though. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/#findComment-251536 Share on other sites More sharing options...
MadTechie Posted May 12, 2007 Share Posted May 12, 2007 can you post the form ? Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/#findComment-251545 Share on other sites More sharing options...
forumnz Posted May 12, 2007 Author Share Posted May 12, 2007 Ok sure... {strip} <script type="text/javascript" src="javascript/functions.js"></script> <script type="text/javascript" src="javascript/cascade.js"></script> <script type="text/javascript"> /* <![CDATA[ */ function validateme(form) {ldelim} var tz=form.txttimezone.value; var tos_ok = form.accept_tos.checked; ErrorCount=0; ErrorMsg = new Array(); ErrorMsg[0]="------------------------- The Following Errors Occured -------------------------" + String.fromCharCode(13); /* log details */ CheckFieldString("noblank",form.spam_code,"{lang mkey='errormsgs' skey='120'}"); CheckFieldString("noblank",form.txtusername,"{lang mkey='signup_js_errors' skey='username_noblank'}"); CheckFieldString("noblank",form.txtpassword,"{lang mkey='signup_js_errors' skey='password_noblank'}"); CheckFieldString("noblank",form.txtpassword2,"{lang mkey='signup_js_errors' skey='con_password_noblank'}"); /*profile*/ CheckFieldString("noblank",form.txtfirstname,"{lang mkey='signup_js_errors' skey='firstname_noblank'}"); CheckFieldString("noblank",form.txtlastname,"{lang mkey='signup_js_errors' skey='lastname_noblank'}"); CheckFieldString("noblank",form.txtemail,"{lang mkey='signup_js_errors' skey='email_noblank'}"); /*address*/ { if $config.accept_about_me == 'Y' || $config.accept_about_me == '1' } {if $config.about_me_mandatory == "Y"} CheckFieldString("noblank",form.about_me,"{lang mkey='signup_js_errors' skey='about_me_noblank'}"); {/if} {/if} { if $config.accept_country == 'Y' || $config.accept_country == '1' } {if $config.country_mandatory } CheckFieldString("noblank",form.txtfrom,"{lang mkey='signup_js_errors' skey='country_noblank'}"); {/if} { if ($config.accept_state == 'Y' || $config.accept_state == '1') && $config.state_mandatory eq 'Y' } CheckFieldString("noblank",form.txtstateprovince,"{lang mkey='signup_js_errors' skey='stateprovince_noblank'}"); {/if} { if ($config.accept_county == 'Y' || $config.accept_county == '1') } {if $config.county_mandatory eq 'Y' } CheckFieldString("noblank",form.txtcounty,"{lang mkey='signup_js_errors' skey='county_noblank'}"); {/if} CheckFieldString("text",form.txtcounty,"{lang mkey='signup_js_errors' skey='county_charset'}"); {/if} { if ($config.accept_city == 'Y' || $config.accept_city == '1') } {if $config.city_mandatory eq 'Y' } CheckFieldString("noblank",form.txtcity,"{lang mkey='signup_js_errors' skey='city_noblank'}"); {/if} CheckFieldString("text",form.txtcity,"{lang mkey='signup_js_errors' skey='city_charset'}"); {/if} { if ($config.accept_zipcode == 'Y' || $config.accept_zipcode == '1')} {if $config.zipcode_mandatory eq 'Y' } CheckFieldString("noblank",form.txtzip,"{lang mkey='signup_js_errors' skey='zip_noblank'}"); {/if} CheckFieldString("alphanumeric",form.txtzip,"{lang mkey='signup_js_errors' skey='zip_charset'}"); {/if} {/if} /*log details*/ CheckFieldString("alphanum",form.txtusername,"{lang mkey='signup_js_errors' skey='username_charset'}"); CheckFieldString("alphanum",form.txtpassword,"{lang mkey='signup_js_errors' skey='password_charset'}"); /*profile*/ CheckFieldString("text",form.txtfirstname,"{lang mkey='signup_js_errors' skey='firstname_charset'}"); CheckFieldString("text",form.txtlastname,"{lang mkey='signup_js_errors' skey='lastname_charset'}"); CheckFieldString("email",form.txtemail,"{lang mkey='signup_js_errors' skey='email_notvalid'}"); /*preferences */ {if $config.accept_lookcountry == '1' || $config.accept_lookcountry == 'Y'} CheckFieldString("text",form.txtlookcity,"{lang mkey='signup_js_errors' skey='address_charset'}"); CheckFieldString("alphanumeric",form.txtlookzip,"{lang mkey='signup_js_errors' skey='address_charset'}"); {/if} if(form.txtusername.value.length >= {$config.min_username_len} && form.txtusername.value.length <= {$config.max_username_len}){ldelim} if ( !isNaN(form.txtusername.value.charAt(0)) ){ldelim} ErrorCount++; ErrorMsg[ErrorCount] = "{lang mkey='signup_js_errors' skey='username_start_alpha'}" + String.fromCharCode(13); {rdelim} {rdelim}else{ldelim} ErrorCount++; ErrorMsg[ErrorCount] = "{lang mkey='signup_js_errors' skey='username_outrange'}" + String.fromCharCode(13); {rdelim} if( form.txtpassword.value.length >= {$config.min_pass_len} && form.txtpassword.value.length <= {$config.max_pass_len}){ldelim} if ( form.txtpassword.value != form.txtpassword2.value ){ldelim} ErrorCount++; ErrorMsg[ErrorCount] = "{lang mkey='signup_js_errors' skey='password_nomatch'}" + String.fromCharCode(13); {rdelim} {rdelim}else{ldelim} ErrorCount++; ErrorMsg[ErrorCount] = "{lang mkey='signup_js_errors' skey='password_outrange'}" + String.fromCharCode(13); {rdelim} {if $config.accept_timezone == 'Y' || $config.accept_timezone == '1'} if (tz == '-25' ) {ldelim} ErrorCount++; ErrorMsg[ErrorCount]="{lang mkey='signup_js_errors' skey='timezone_noblank'}" + String.fromCharCode(13) + String.fromCharCode(10); {rdelim} {/if} if (tos_ok != true) {ldelim} ErrorCount++; ErrorMsg[ErrorCount]="{lang mkey='tos_must'}" + String.fromCharCode(13) + String.fromCharCode(10); {rdelim} /* concat all error messages into one string */ result=""; if( ErrorCount > 0) {ldelim} /* for( c in ErrorMsg) result += ErrorMsg[c]; */ alert(ErrorMsg[1]); return false; {rdelim} return true; {rdelim} /* ]]> */ function display_couple_details(fld) {ldelim} if (fld.value == 'C' || fld == 'C' || fld.value == 'G' || fld == 'G') {ldelim} var ret = '<table border=0 cellspacing=0 cellpadding=0 width="100%"><td valign="top" colspan="2"><b>{lang mkey="couple_usernames_hlp"}<//b><//td><//tr><tr><td height="3"><//td><//tr><tr><td valign="top" width="33.5%">{lang mkey="couple_usernames"}:<font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}<//font><//td><td valign="top" width="66.5%"><input class="input" type="text" size="30" name="couple_usernames" value="{$smarty.session.couple_usernames}" /><//td><//tr><//table>'; {rdelim} else {ldelim} var ret = '<input type="hidden" name="couple_usernames" value="" />'; {rdelim} document.getElementById('couple_info').innerHTML = ret; {rdelim} </script> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td class="module_detail" width="100%"> {assign var="page_hdr01_text" value="{lang mkey='signup'}"} {include file="page_hdr01.tpl"} <form name="frmSignup" id="frmSignup" method="post" action="savesignup.php" onsubmit="javascript: return validateme(this);"> <table width="100%" border="0" cellpadding="0" cellspacing="9"> <tr> <td width="100%" valign="top"> {if $smarty.get.errid != ''} <font color="#FF0000">{mylang mkey='errormsgs' skey=$smarty.get.errid}</font><br /><br /> {/if} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font>{lang mkey='required_info_indication'} <br /><br /> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td class="module_detail_inside" width="100%"> {assign var="page_hdr02_text" value="{lang mkey='signup_subtitle_login'}"} {include file="page_hdr02.tpl"} <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}"> <tr> <td width="100%"> <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}"> <tr> <td height="2" width="33%">{lang mkey='signup_username'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td height="2" width="67%"> <input class="input" maxlength="{$config.max_username_len}" name="txtusername" size="25" value="{$smarty.session.username}" /> ({$config.min_username_len}{lang mkey='to'}{$config.max_username_len} {lang mkey='characters'}) </td> </tr> <tr> <td>{lang mkey='signup_password'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td> <input class="input" type="password" name="txtpassword" maxlength="{$config.max_pass_len}" size="25" value="{$password}" /> ({$config.min_pass_len}{lang mkey='to'}{$config.max_pass_len} {lang mkey='characters'}) </td> </tr> <tr> <td>{lang mkey='signup_confirm_password'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td> <input class="input" type="password" name="txtpassword2" maxlength="{$config.max_pass_len}" size="25" value="{$password2}" /> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br /> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td class="module_detail_inside" width="100%"> {assign var="page_hdr02_text" value="{lang mkey='signup_subtitle_profile'}"} {include file="page_hdr02.tpl"} <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}"> <tr> <td width="100%"> <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}"> <tr> <td width="33%">{lang mkey='signup_firstname'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td width="67%"><input class="input" maxlength="50" name="txtfirstname" value="{$smarty.session.firstname}" /></td> </tr> <tr> <td>{lang mkey='signup_lastname'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td> <input class="input" maxlength="50" name="txtlastname" value="{$smarty.session.lastname}" /> </td> </tr> <tr> <td>{lang mkey='signup_email'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td> <input class="input" maxlength="255" name="txtemail" size="40" value="{$smarty.session.email}" /> </td> </tr> <tr> <td>{lang mkey='signup_gender'}: <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> </td> <td> <select class="select" style="width: 80px;" name="txtgender" onchange="javascript: display_couple_details(this);"> {html_options options=$lang.signup_gender_values selected=$smarty.session.gender} </select> {if $config.accept_lookgender == 'Y' or $config.accept_lookgender == '1'} {lang mkey='looking_for_a'} <select class="select" style="width: 100px" name="txtlookgender"> {if $smarty.session.lookgender == ''} {html_options options=$lang.signup_gender_look selected='F'} {else} {html_options options=$lang.signup_gender_look selected=$smarty.session.lookgender } {/if} </select> {else} <input type="hidden" value="A" name="txtlookgender" /> {/if} </td> </tr> <tr > <td colspan="2" id="couple_info"><input name="couple_usernames" type=hidden value="" /> </td> </tr> {if $config.accept_lookage == 'Y' or $config.accept_lookage == '1'} <tr> <td>{lang mkey='signup_pref_age_range'}: <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td> <select class="select" style="width: 50px" name="txtlookagestart"> {html_options values=$lang.start_agerange output=$lang.start_agerange selected=$smarty.session.txtlookagestart} </select>{lang mkey='to'}<select class="select" style="width: 50px" name="txtlookageend"> {html_options values=$lang.end_agerange output=$lang.end_agerange selected=$smarty.session.txtlookageend} </select> {lang mkey='signup_year_old'}. </td> </tr> {/if} <tr> <td>{lang mkey='signup_birthday'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td> <td> {html_select_date_translated prefix="txtbirth" start_year=$config.start_year end_year=$config.end_year month_value_format="%m" time=$selectedtime} </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> {if $config.accept_lookage != 'Y' and $config.accept_lookage != '1'} <input type=hidden name="txtlookagestart" value="{$smarty.session.txtlookagestart}" /> <input type=hidden name="txtlookageend" value="{$smarty.session.txtlookageend}" /> {/if} {if $config.accept_country != '1' and $config.accept_country != 'Y'} <input type="hidden" name="txttimezone" value="{$smarty.session.timezone}" /> {/if} <br /> {if $config.accept_country == '1' or $config.accept_country == 'Y'} {if $config.accept_timezone != '1' and $config.accept_timezone != 'Y'} <input type="hidden" name="txttimezone" value="{$smarty.session.timezone}" /> {/if} <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td class="module_detail_inside" width="100%"> {assign var="page_hdr02_text" value="{lang mkey='signup_subtitle_address'}"} {include file="page_hdr02.tpl"} <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}"> <tr> <td width="100%"> <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}" id="tbl2"> {if $config.accept_timezone == '1' or $config.accept_timezone == 'Y'} <tr> <td> {lang mkey='timezone'} {if $config.timezone_mandatory == 'Y' or $config.timezone_mandatory == '1'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td> <select class="select" style="width: 315px;" name="txttimezone"> {html_options options=$lang.tz selected=$smarty.session.timezone} </select> </td> </tr> {/if} {if $config.accept_country == '1' or $config.accept_country == 'Y'} <tr> <td width="33%">{lang mkey='signup_country'} {if $config.country_mandatory == 'Y'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td width="67%"><select class="select" style="width: 175px;" name="txtfrom" id="txtfrom" onchange="javascript: cascadeCountry(this.value,'txtstateprovince');" ><option value="">{lang mkey='select_country'}</option> {html_options options=$lang.countries selected=$smarty.session.from} </select> <input type="hidden" name="chgcntry" id="chgcntry" value="" /> </td> </tr> {if $config.accept_state == '1' or $config.accept_state == 'Y'} <tr> <td width="172"> {lang mkey='signup_state_province'}{if $config.state_mandatory == 'Y'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td width="344" id="txtstateprovince"> { if $lang.states|@count > 0} <select class="select" style="width: 175px" name="txtstateprovince" onchange="javascript: this.form.chgcntry.value='1'; cascadeState(this.value,this.form.txtfrom.value,'txtcounty');" ><option value="-1">{lang mkey='select_state'}</option> {html_options options=$lang.states selected=$smarty.session.stateprovince} </select> { else } <input name="txtstateprovince" type="text" size="30" maxlength="100" value="{$smarty.session.stateprovince}" /> { /if} </td> </tr> {if $config.accept_county == '1' or $config.accept_county == 'Y'} <tr> <td width="172">{lang mkey='manage_counties'}:{if $config.county_mandatory == 'Y'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td width="344" id="txtcounty"> { if $lang.counties|@count > 0} <select class="select" style="width: 175px" name="txtcounty" onchange="javascript:this.form.chgcntry.value='1'; this.form.submit();" > {html_options options=$lang.counties selected=$smarty.session.countycode} </select> { else } <input name="txtcounty" type="text" size="30" maxlength="100" value="{$smarty.session.countycode}" /> { /if} </td> </tr> {/if} {if $config.accept_city == '1' or $config.accept_city == 'Y'} <tr> <td> {lang mkey='signup_city'}{if $config.city_mandatory == 'Y'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td id="txtcity"> { if $lang.cities|@count > 0} <select class="select" style="width: 175px" name="txtcity" onchange="javascript:this.form.chgcntry.value='1'; this.form.submit();" > {html_options options=$lang.cities selected=$smarty.session.citycode} </select> { else } <input name="txtcity" type="text" size="30" maxlength="100" value="{$smarty.session.citycode}" /> { /if} </td> </tr> {/if} {if $config.accept_zipcode == '1' or $config.accept_zipcode == 'Y'} <tr> <td> {lang mkey='signup_zip'}{if $config.zipcode_mandatory == 'Y'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td id="txtzip"> { if $lang.zipcodes|@count > 0} <select class="select" style="width: 175px" name="txtzip"> {html_options options=$lang.zipcodes selected=$smarty.session.zip} </select> { else } <input name="txtzip" type="text" size="30" maxlength="100" value="{$smarty.session.zip}" /> { /if} </td> </tr> {/if} {if $config.accept_address_line1 == '1' or $config.accept_address_line1 == 'Y'} <tr> <td> {lang mkey='signup_address1'} </td> <td> <input class="input" maxlength="255" name="txtaddress1" size="40" value="{$smarty.session.address1}" /> </td> </tr> {if $config.accept_address_line2 == '1' or $config.accept_address_line2 == 'Y'} <tr> <td height="22"> {lang mkey='signup_address2'} </td> <td height="22"> <input class="input" maxlength="255" name="txtaddress2" size="40" value="{$smarty.session.address2}" /> </td> </tr> {/if} {/if} {/if} {/if} </table> </td> </tr> </table> </td> </tr> </table> <br /> {/if} <table width="100%" border="0" cellpadding="0" cellspacing="0" > {if $config.accept_lookcountry == '1' or $config.accept_lookcountry == 'Y' or $config.accept_allow_viewonline == '1' or $config.accept_allow_viewonline == 'Y'} <tr> <td class="module_detail_inside" width="100%"> {assign var="page_hdr02_text" value="{lang mkey='signup_subtitle_preference'}"} {include file="page_hdr02.tpl"} <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}"> <tr> <td width="100%"> <table width="100%" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}" id="tbl"> {if ($config.accept_lookcountry == 'Y' or $config.accept_lookcountry == '1') and ($config.accept_country == 'Y' or $config.accept_country == '1')} <tr> <td colspan="2"><b>{lang mkey='signup_where_should_we_look'}</b></td> </tr> <tr> <td width="33%"> {lang mkey='signup_country'} {if $config.lookcountry_mandatory == 'Y'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td width="67%"> <select class="select" style="width: 175px;" name="txtlookfrom" id="txtlookfrom" onChange="javascript: this.form.chgcntry.value='1'; cascadeCountryL(this.value,'txtlookstateprovince');" > {html_options options=$lang.lookcountries selected=$smarty.session.lookfrom} </select> </td> </tr> {if $config.accept_lookstate == 'Y' or $config.accept_lookstate == '1'} <tr> <td >{lang mkey='signup_state_province'} <td id="txtlookstateprovince"> { if $lang.lookstates|@count > 0 } <select class="select" style="width: 175px" name="txtlookstateprovince"onchange="javascript: this.form.chgcntry.value='1'; cascadeStateL(this.value,this.form.txtlookfrom.value,'txtlookcounty');" > {html_options options=$lang.lookstates selected=$smarty.session.lookstateprovince} </select> {else} <input name="txtlookstateprovince" value="{$smarty.session.lookstateprovince}" size="30" maxlength="200" /> {/if} </td> </tr> {if $config.accept_lookcounty == 'Y' or $config.accept_lookcounty == '1'} <tr> <td >{lang mkey='manage_counties'}: </td> <td id="txtlookcounty"> { if $lang.lookcounties|@count > 0} <select class="select" style="width: 175px" name="txtlookcounty" onchange="javascript: this.form.chgcntry.value='1'; this.form.submit();" > {html_options options=$lang.lookcounties selected=$smarty.session.lookcounty} </select> { else } <input name="txtlookcounty" type="text" size="30" maxlength="100" value="{$smarty.session.lookcounty}" /> { /if} </td> </tr> {/if} {if $config.accept_lookcity == '1' or $config.accept_lookcity == 'Y'} <tr> <td> {lang mkey='signup_city'} </td> <td id="txtlookcity"> { if $lang.lookcities|@count > 0} <select class="select" style="width: 175px" name="txtlookcity" onchange="javascript: this.form.chgcntry.value='1'; this.form.submit();" > {html_options options=$lang.lookcities selected=$smarty.session.lookcity} </select> { else } <input name="txtlookcity" type="text" size="30" maxlength="100" value="{$smarty.session.lookcity}" /> { /if} </td> </tr> {/if} {if $config.accept_lookzipcode == '1' or $config.accept_lookzipcode == 'Y'} <tr> <td> {lang mkey='signup_zip'} </td> <td id="txtlookzip"> { if $lang.lookzipcodes|@count > 0} <select class="select" style="width: 175px" name="txtlookzip"> {html_options options=$lang.lookzipcodes selected=$smarty.session.lookzip} </select> { else } <input name="txtlookzip" type="text" size="15" maxlength="100" value="{$smarty.session.lookzip}" /> { /if} </td> </tr> <tr > <td colspan=2 width="100%" id="zipsavailable"> { if $zipsavailable > 0 } <table width="100%" cellpadding=0 border=0 cellspacing=0><tr> <td width="188"> {lang mkey='search_within'}: </td> <td valign="middle" width="15"> <input name="lookradius" value="{$smarty.session.lookradius}" type=text size="5" maxlength="10" /> </td> <td valign="middle" width="6"> <input type=radio name="radiustype" value="miles" {if $smarty.session.radiustype == 'miles'} checked{/if} /> </td> <td width="15" valign="middle"> {lang mkey='miles'} </td> <td width="6" valign="middle"><input type=radio name="radiustype" value="kms" {if $smarty.session.radiustype == 'kms'} checked{/if} /> </td> <td valign="middle" width="20">{lang mkey='kms'}</td> <td valign="middle"> {lang mkey='of_zip_code'} </td> </tr> </table> { /if } </td> </tr> {/if} {/if} {/if} {if $config.accept_allow_viewonline == 'Y' or $config.accept_allow_viewonline == '1' } <tr> <td>{lang mkey='signup_view_online'} {if $config.allow_viewonline_mandatory == 'Y' or $config.allow_viewonline_mandatory == '1'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} </td> <td align="left"><input class="radio" type="radio" {if $config.default_allow_viewonline=='Y' or $config.default_allow_viewonline=='1'}checked{/if} value="1" name="txtviewonline" /> {lang mkey='yes'} <input class="radio" type="radio" value="0" {if $config.default_allow_viewonline=='N' or $config.default_allow_viewonline=='0'}checked{/if} name="txtviewonline" /> {lang mkey='no'} </td> </tr> {/if} </table> </td> </tr> </table> </td> </tr> {/if} {if $config.accept_about_me == '1' or $config.accept_about_me == 'Y' } <tr><td height="4"></td></tr> <tr> <td valign="top"> <table border=0 cellspacing=2 cellpadding=0 width="100%"> <tr> <td width="180" valign="top"> <b>{lang mkey='about_me'}:</b>{if $config.about_me_mandatory == 'Y'} <font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font> {/if} <br />{lang mkey='about_me_hlp'} </td> <td valign="top" > <textarea class="input" name="about_me" cols="45" rows="6"> {$smarty.session.about_me} </textarea> </td> </tr> </table> </td> </tr> {/if} <tr><td height="4"></td></tr> <tr> <td valign="top"> <table border=0 cellspacing=0 cellpadding=0 width="100%"> <tr> <td width="8" valign="middle"> <input type=checkbox name=accept_tos value='1'/> </td> <td valign="middle"> {lang mkey='accept_tos'} </td> </tr> </table> </td> </tr> <tr> <td valign="bottom" height="40"> <table width="100%" cellspacing=0 cellpadding=0 border=0> <tr><td colspan=2 height="4"></td></tr> <tr> <td colspan="2"><br /><b>{lang mkey="security_code_txt"}</b><br /><br /></td> </tr> <tr> <td nowrap> {lang mkey='enter_spamcode'}: <input type="text" name="spam_code" id="spam_code" value="" /> </td> <td valign="middle" style="padding-left: 5px;"> <img src="spam_image.php" alt="Code" /> </td> </tr> </table> </td> </tr> </table> <br /> <center> {if $config.accept_allow_viewonline != '1' or $config.accept_allow_viewonline != 'Y'} <input type=hidden name="txtviewonline" value="{if $config.default_allow_viewonline=='Y' or $config.default_allow_viewonline=='1'}1{else}0{/if}" /> {/if} <input type="submit" class="formbutton" value="{lang mkey='submit'}" /> <input type="reset" class="formbutton" value="{lang mkey='reset'}" /> </center> </td> </tr> </table> </form> </td> </tr> </table> <script type="text/javascript"> display_couple_details("{$smarty.session.gender}"); </script> {/strip} Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/#findComment-251552 Share on other sites More sharing options...
MadTechie Posted May 12, 2007 Share Posted May 12, 2007 well maybe you should move to the third party as im not trace that SMARTY code! Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/#findComment-251558 Share on other sites More sharing options...
AndyB Posted May 12, 2007 Share Posted May 12, 2007 This script won't allow the user to select country - please help. Perhaps if there were a sesion_start() statement ahead of retrieving the session variables ... Quote Link to comment https://forums.phpfreaks.com/topic/51101-select-country/#findComment-251624 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.