title: How to create function in phpMyadmin mysql
body: <p>I have this code to create a function in db mysql using PHP:</p>
  
  <pre><code>DROP FUNCTION IF EXISTS fnStripTags;
      DELIMITER |
      CREATE FUNCTION fnStripTags( Dirty varchar(4000) )
      RETURNS varchar(4000)
      DETERMINISTIC 
      BEGIN
        DECLARE iStart, iEnd, iLength int;
          WHILE Locate( '&lt;', Dirty ) &gt; 0 And Locate( '&gt;', Dirty, Locate( '&lt;', Dirty )) &gt; 0 DO
            BEGIN
              SET iStart = Locate( '&lt;', Dirty ), iEnd = Locate( '&gt;', Dirty, Locate('&lt;', Dirty ));
              SET iLength = ( iEnd - iStart) + 1;
              IF iLength &gt; 0 THEN
                BEGIN
                  SET Dirty = Insert( Dirty, iStart, iLength, '');
                END;
              END IF;
            END;
          END WHILE;
          RETURN Dirty;
      END;
      |
      DELIMITER
  </code></pre>
  
  <p>Well, is not working, so i would like to know how to create this function in phpMyadmin.
  I know i have to change some things like adding $$ but i don't know how or where.</p>
  
  <p>I'm not an expert in mysql :/</p>
  
  <p>Thank you all.</p>