I am taking sentences through a form on page. Then checking some condition and trying to insert them in database. I have issues while inserting...
foreach ($sentences as $final) {
......
else {
            if(strlen($final) <= 120){
            echo $final.'.<br />';}
            else
            echo substr($final,0,120). '.<br />';
   
            //Inserting of final(sentences) in database starts 
                $sent = mysql_real_escape_string($_POST ['$final']);
            $error= "Error while inserting, either User present or other. Please check database";
            $inserted= "sentences inserted";
            $result = mysql_query("SELECT sent FROM sentences WHERE sent='{$final}'  ");
            if($result)
            {
            $num = mysql_num_rows( $result );
            if ($num == 0) { 
                     $querypost = mysql_query ("INSERT INTO sentences (sent) VALUES ('$final')");
                  echo $inserted;            
                        }
            else echo $error;
            }
           }
                   }
      
Please correct my logic error.
upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please tell me how can i restrict that
Request for tunning the below query
Hi,
Product categories for registration
Dear all,
SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built in???
Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain data.Please have a look.Code: function add_user_to_db() {
Grids not displaying decimals, and behaving differently on different PCs?
Hello,
Disable Scrollbar in TableControl
Hello everbody,
losing session vars when arriving from an email link
Hi,I've got a confirmation script made that sends an email with a link for a user to confirm their email. This all works pretty good with the exception of not being able to direct them to where they
Asset Transfer from One plant to another within same company code
Hi,