I have a problem with INSERT SQL sentence. It just do nothing! (and not showing any error). When I am printing $qry, it looks just fine. what can be the problem? This is the code:
<?php 
include('conn.php');
$result=mysql_query("SET NAMES utf8 COLLATE utf8_general_ci",$mysql_link);
$result=mysql_query("SELECT * FROM users where userID=".$_SESSION['IDENT'],$mysql_link);
if (!$result)
{
    echo "ERROR: error occured in MySQL query.";
}
else 
{
    if(mysql_num_rows($result)==1)
    {
    //This will be shown only to registered users.
    while ($row=mysql_fetch_array($result))
        {
            if (($row['userRank']==100)||($row['userRank']==10))
                {
                    $qry="INSERT INTO users (NickName, username, userpass, userEmail, userRank, userOOlamR, userPhone, userPhone2, userStr, userCity, userMikud, userOOlamID) VALUES ('" . $_POST['nname'] . "', '" . $_POST['username'] . "', '" . md5($_POST['userpass']) . "', '" . $_POST['email'] . "', 2, 1, '" . $_POST['cellphone1'] . "', '" . $_POST['cellphone2'] . "', '" . $_POST['street'] . "', '" . $_POST['city'] . "', " . $_POST['mikud'] . ", " . $_POST['oolam'] . ")";
                    $res=mysql_query($qry ,$mysql_link);
                    ?><div align="center">
                    <table width="50%" height="20%" style="Border-Style:dotted;Border-Width:1px;Border-Color:a01220;background-color: rgba(190, 200, 230, 0.5);">
                    <td><div align="Center"><font face="Arial" size="2" color="Black"> SUCCESS!<br></div></td>
                    </table>
                    </div><div align="left">
                    <?php
                    echo $qry; ?>
                    </div><?php
                }
            Else
                {
                    //SECURITY
                }
        }
    }
}
include('cconn.php');
?>
The problem was I had another field in the table that I didn't treat in my INSERT statement at all.
 
    