Aşağıda verdiğimi kullanabilirsiniz. bu arada kodları 2.ci kez vermişsiniz kalabalık oluyor gereksiz yere db şişiyor 2.ci kodları editleyin.
<?
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 if (preg_match('#[çöşığüİŞÇÖÜĞ]#', $_POST['user']))
    {
        echo 'Kullanıcı Adın da türkçe Karakter kullanamazsınız!';
    }
    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>';
        }

    }
}
?>
Alıntı ile Cevapla