• 14-12-2009, 20:05:34
    #1
    Arkadaşlar benim panelimde kayıt esnasında türkçe karakterleri kabul etmesin istiyorum bunu nasıl yapabilirisz saygılar.




    <?
    include ('security/antisqlinject.php');



    $ganks = $_GET['ganks'];


    if ($ganks == '')
    {

    ?>

    <script type="text/javascript">

    function Seyap(){

    // formdan verileri al

    var user = document.getElementById('user').value;




    // alinan verileri yolla, sonucu geri al

    var sc = "user="+fc_(user);

    JXP(1, "durum", "includes/acckontrol.php", sc);





    }

    </script>
    <div align="center">
    <table width="77%" border="0" cellspacing="0" cellpadding="0">

    <td align="left">
    <div class="registration">
    <div class="textbm"><? echo ($langg['registration']); ?></div>

    <form id="SexyReplay" method="post" action="index.php?page=register&ganks=ok" onsubmit="return checkform(this);">
    <input type="hidden" name="hash" value=24f5bcfe46eff98b68652db0c6b43539>
    <fieldset>
    <legend><? echo ($langg['userinformationreg']); ?></legend>
    <table width="337">
    <tr>
    <td width="169"><b><? echo ($langg['username']); ?>: </b>
    <input type="text" title="Username" id="user" name="user" maxlength="16" style="width: 90px;" onchange="Seyap()"/></td>
    <td width="156"><div id="durum"></div></td>
    </tr>
    </table>
    <label for="passwd1"><b><? echo ($langg['password']); ?>: </b> <input type="password" title="Password" id="passwd1" name="passwd1" maxlength="12" style="width: 90px;"/></label> <br />

    <label for="passwd2"><b><? echo ($langg['confirm'])." ".($langg['password']); ?> </b> <input type="password" title="Confirm Password" id="passwd2" name="passwd2" maxlength="12" style="width: 90px;"/></label> <br />
    <label for="email1"><b>E-mail: </b> <input type="text" title="E-mail" id="email1" name="email1" class="email1" maxlength="40" style="width:125px;"/></label> <br />
    <label for="email2"><b><? echo ($langg['confirm']); ?> E-mail: </b> <input type="text" title="Confirm E-mail" id="email2" name="email2" class="email2" maxlength="40" style="width:125px;"/></label>
    </fieldset>
    <br />

    <fieldset>
    <legend><? echo ($langg['securityinformation']); ?></legend>
    <p>
    <label for="Question"><b><? echo ($langg['securityquestion']); ?>: </b></label>
    <select id="Question" name="Question">
    <option value="1"><? echo ($langg['q1']); ?></option>
    <option value="2"><? echo ($langg['q2']); ?></option>
    <option value="3"><? echo ($langg['q3']); ?></option>

    <option value="4"><? echo ($langg['q4']); ?></option>
    <option value="5"><? echo ($langg['q5']); ?></option>
    <option value="6"><? echo ($langg['q6']); ?></option>
    </select>
    <br />
    <label for="answer"><b><? echo ($langg['securityanswer']); ?>: </b>
    <input type="text" title="Security Answer" id="answer" name="answer" maxlength="40" style="width:125px;"/>
    </label>

    </p>
    <p><img src="img.php" /> --&gt;
    <label>
    <input type="text" name="sec" id="sec" />
    </label>
    </p>
    </fieldset>
    <input type="submit" id="submitButton" name="submitButton" type="submit" value="Submit" />
    </form>
    </div>
    </td>

    </table>

    </center>

    </td>

    </tr>

    </div>




    <? }



    else {
    if ($_SESSION["scod"] <> $_POST['sec']) {

    echo 'Security Errör';
    }
    else {

    $user = $_POST['user'];
    $p1 = $_POST['passwd1'];
    $p2 = $_POST['passwd2'];
    $e1 = $_POST['email1'];
    $e2 = $_POST['email2'];
    $q = $_POST['Question'];
    $a = $_POST['answer'];
    $usercount = odbc_exec($conn,"select count(StrAccountID) from TB_USER where StrAccountID = '".$user."'");
    $ucount = odbc_result($usercount,1);

    if ($user == '' or $p1 == '' or $p2 == '' or $e1 == '' or $e2 == '' or $q == '' or $a == '') {

    echo ($langg['regb']);
    }


    elseif ($p1 <> $p2) {
    echo ($langg['reqa']);


    }

    elseif ($e1 <> $e2) {

    echo ($langg['reqe']);


    }
    elseif ($ucount > 0) {

    echo ($langg['reqc']);

    }


    else {


    $req = odbc_exec($conn,"insert into TB_USER (strAccountID, strPasswd, strSocNo, idays, StrEMail, Question, Answer) values ('".$user."', '".$p1."', 1, '6', '".$e1."', '".$q."', '".$a."')
    ") or die ($langg['sqlerror']);

    echo '<center>######################################### ######################<BR> <BR> '.$langg['reqok'].'<br><br>######################################## #######################</center>';
    }}




    }?>
  • 14-12-2009, 20:17:56
    #2
    Üyeliği durduruldu
    Türkçe karakter kabul etmesinden kastiniz nedir?
  • 14-12-2009, 20:25:44
    #3
    Üyeliği durduruldu
    evet bende anlamadım.
    karakterler hatalı çıkıyor diyorsan

    mysql_query("SET NAMES 'utf-8' COLLATE 'utf8_turkish_ci'");
    çözüm bu
  • 14-12-2009, 20:53:00
    #4
    DENE

    mysql_query("SET NAMES 'latin5'"); 
    mysql_query("SET CHARACTER SET latin5"); 
    mysql_query("SET COLLATION_CONNECTION ='latin5_turkish_ci'");
  • 14-12-2009, 20:56:13
    #5
    Usta şu şekilde iistiyorum mesela üye adı


    Şaban olacak ya kabul etmresin deisn türkçe karakter kullanamazsın kendi çevirmesin
    hiç bir asccı ve türkçe karakterle üyelik açılmasın istiyorum
  • 14-12-2009, 21:00:28
    #6
    ozaman
    şöyle

    <?php 
    
    function cevir($yazi){
    
    $TR1 = array("Ç","İ","Ö");
    $TR2 = array("C","I","O");
    $hasirt_the_blackboard = str_replace($TR1,$TR2,$yazi);
    return $hasirt_the_blackboard;
    }
    
    ?>
    Yukarda Ö den sonra kendin yaz Aşşagıdaki tr2 de karşılgını yaz
  • 14-12-2009, 21:00:53
    #7
    Üyeliği durduruldu
    enc0der adlı üyeden alıntı: mesajı görüntüle
    ozaman
    şöyle

    <?php 
    
    function cevir($yazi){
    
    $TR1 = array("Ç","İ","Ö");
    $TR2 = array("C","I","O");
    $hasirti_the_blackboard = str_replace($TR1,$TR2,$yazi)
    return $hasirti_the_blackboard;
    }
    
    ?>
    Yukarda Ö den sonra kendin yaz Aşşagıdaki tr2 de karşılgını yaz
    türkçe karakterle üyelik açılmasın istiyorum diyor
  • 14-12-2009, 21:04:13
    #8
    kardeş ozaman şöyle kontorl edersin varsa uyarı versin

    if(eregi("[\çğşöıİÇĞŞÖüÜ]",$kullanici)){
    echo "Türkce  Karekter Kullanmayın ";
    }
  • 14-12-2009, 21:07:36
    #9
    Usta çok güzel anlatmışsınız fakat

    bun bu deidğiniz kodu nereye ekliycem ve ekleyince hiç bir asscıı kod türkçe karakter girilmiycek değilmi ?

    Bunun neresine ekliycez



    <?
    include ('security/antisqlinject.php');



    $ganks = $_GET['ganks'];


    if ($ganks == '')
    {

    ?>

    <script type="text/javascript">

    function Seyap(){

    // formdan verileri al

    var user = document.getElementById('user').value;




    // alinan verileri yolla, sonucu geri al

    var sc = "user="+fc_(user);

    JXP(1, "durum", "includes/acckontrol.php", sc);





    }

    </script>
    <div align="center">
    <table width="77%" border="0" cellspacing="0" cellpadding="0">

    <td align="left">
    <div class="registration">
    <div class="textbm"><? echo ($langg['registration']); ?></div>

    <form id="SexyReplay" method="post" action="index.php?page=register&ganks=ok" onsubmit="return checkform(this);">
    <input type="hidden" name="hash" value=24f5bcfe46eff98b68652db0c6b43539>
    <fieldset>
    <legend><? echo ($langg['userinformationreg']); ?></legend>
    <table width="337">
    <tr>
    <td width="169"><b><? echo ($langg['username']); ?>: </b>
    <input type="text" title="Username" id="user" name="user" maxlength="16" style="width: 90px;" onchange="Seyap()"/></td>
    <td width="156"><div id="durum"></div></td>
    </tr>
    </table>
    <label for="passwd1"><b><? echo ($langg['password']); ?>: </b> <input type="password" title="Password" id="passwd1" name="passwd1" maxlength="12" style="width: 90px;"/></label> <br />

    <label for="passwd2"><b><? echo ($langg['confirm'])." ".($langg['password']); ?> </b> <input type="password" title="Confirm Password" id="passwd2" name="passwd2" maxlength="12" style="width: 90px;"/></label> <br />
    <label for="email1"><b>E-mail: </b> <input type="text" title="E-mail" id="email1" name="email1" class="email1" maxlength="40" style="width:125px;"/></label> <br />
    <label for="email2"><b><? echo ($langg['confirm']); ?> E-mail: </b> <input type="text" title="Confirm E-mail" id="email2" name="email2" class="email2" maxlength="40" style="width:125px;"/></label>
    </fieldset>
    <br />

    <fieldset>
    <legend><? echo ($langg['securityinformation']); ?></legend>
    <p>
    <label for="Question"><b><? echo ($langg['securityquestion']); ?>: </b></label>
    <select id="Question" name="Question">
    <option value="1"><? echo ($langg['q1']); ?></option>
    <option value="2"><? echo ($langg['q2']); ?></option>
    <option value="3"><? echo ($langg['q3']); ?></option>

    <option value="4"><? echo ($langg['q4']); ?></option>
    <option value="5"><? echo ($langg['q5']); ?></option>
    <option value="6"><? echo ($langg['q6']); ?></option>
    </select>
    <br />
    <label for="answer"><b><? echo ($langg['securityanswer']); ?>: </b>
    <input type="text" title="Security Answer" id="answer" name="answer" maxlength="40" style="width:125px;"/>
    </label>

    </p>
    <p><img src="img.php" /> --&gt;
    <label>
    <input type="text" name="sec" id="sec" />
    </label>
    </p>
    </fieldset>
    <input type="submit" id="submitButton" name="submitButton" type="submit" value="Submit" />
    </form>
    </div>
    </td>

    </table>

    </center>

    </td>

    </tr>

    </div>




    <? }



    else {
    if ($_SESSION["scod"] <> $_POST['sec']) {

    echo 'Security Errör';
    }
    else {

    $user = $_POST['user'];
    $p1 = $_POST['passwd1'];
    $p2 = $_POST['passwd2'];
    $e1 = $_POST['email1'];
    $e2 = $_POST['email2'];
    $q = $_POST['Question'];
    $a = $_POST['answer'];
    $usercount = odbc_exec($conn,"select count(StrAccountID) from TB_USER where StrAccountID = '".$user."'");
    $ucount = odbc_result($usercount,1);

    if ($user == '' or $p1 == '' or $p2 == '' or $e1 == '' or $e2 == '' or $q == '' or $a == '') {

    echo ($langg['regb']);
    }


    elseif ($p1 <> $p2) {
    echo ($langg['reqa']);


    }

    elseif ($e1 <> $e2) {

    echo ($langg['reqe']);


    }
    elseif ($ucount > 0) {

    echo ($langg['reqc']);

    }


    else {


    $req = odbc_exec($conn,"insert into TB_USER (strAccountID, strPasswd, strSocNo, idays, StrEMail, Question, Answer) values ('".$user."', '".$p1."', 1, '6', '".$e1."', '".$q."', '".$a."')
    ") or die ($langg['sqlerror']);

    echo '<center>######################################## # ######################<BR> <BR> '.$langg['reqok'].'<br><br>######################################## #######################</center>';
    }}




    }?>