Topic: PHP help

i realy suck at coding in php, so please dont used to many PHP terms, cuase i probebly wont understand what your trying to tell me.

I'm making a little database with php and mysql. I'm trying to check the input given from $post to make sure it doesnt excists in the DB yet. it should also check if its empty.

function insert_form2() 
    { 
        $HSoort = $_POST["HSoort"]; 

        $query = "SELECT HSoort FROM hulpsoort WHERE HSoort ='$HSoort'"; 
           $res = mysql_query ($query); 

           if (mysql_num_rows ($res) >= 1) 
          { 
              echo ("<center><font color='red'><Je Catergotie bestaat al! Kies a.u.b. een andere.</font><br><br></center>"; 
          } 

        if (empty($HSoort)) 
        { 
            echo ("<center><font color='red'><br>U heeft de nieuwe Catergorie geen naam gegeven.</font><br><br></center>"); 
     
        } 

$query = "INSERT INTO hulpsoort( 
                HSoort 
            )  
             
            VALUES( 

                '$_POST[HSoort' 
            )"; 
            mysql_query($query); 
             
            echo ("  
             
            <center><font color='red'><b>Ingevoerd.<b></font><br>     
            <a href=\"./index.php\" target=\"_self\">Terug</a> 
    "); 

    }

i got asfar as this, but now i have no idea what going wrong.
dont worry about sql injection, cause only 3 people will use it, no acces from outside work

Beta: Latin for "still doesn't work".
http://www.anime-planet.com/images/users/signatures/SirMarkus.jpg

Re: PHP help

who mad the site again? so i can ask him personaly (pm tongue )

Beta: Latin for "still doesn't work".
http://www.anime-planet.com/images/users/signatures/SirMarkus.jpg

Re: PHP help

I did and I really have no idea as to what your doing, this is Star Wars site you have problems Markus with php go to www.phpfreaks.com

and btw I DONT HAVE THE TIME.

http://www.fsmod.com/img/xero_ani.gif
Quote: Lafs1984 "He can't say no to an Ewok"
http://dickscab.com/fuckd/the_force.gif