security and required fields with php not jave ..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcher
    New Member
    • Dec 2010
    • 2

    security and required fields with php not jave ..

    i need help in this form

    Code:
    <FORM action="thanx.php" method="post">
    <TABLE width="100%" border=0>
      <TBODY>
      <TR>
        <TD align=center><FONT color=#ff0000>* </FONT>title:<BR><INPUT size=40
         name=title><BR></TD>
        </TR>
          </TBODY>
          <TABLE width="100%" border=0>
           <TBODY>
           <TR>
           <TD align=center><FONT color=#ff0000>* </FONT>Url<BR><INPUT size=40
         name=url value=http://><BR><TD></TR></TBODY></TABLE>
          </TD>
        </TR>
         <TABLE width="100%" border=0>
           <TBODY>
           <TR>
           <TD align=center>description<BR>
           <textarea cols="50" rows="4" name="description"></textarea><BR><TD></TR></TBODY></TABLE>
          </TD>
        </TBODY></TABLE>
        <P style="TEXT-ALIGN: center" align=center><INPUT class=submit type=submit value="add" name=send></TD>
    </FORM>
    first :

    i want make fields required "at lest Three letters" using php not java ...

    but i want the user don't leave the form if this fields empty ..

    and i need the user don't go the add.php if this fields empty

    like :: please fill the blank fields

    second :
    some time my users post in the in fields ..something like this



    Code:
    <SCRIPT type=text/javascript>
    <!--
    //-->
    </SCRIPT>
    or something like this


    Code:
     <a href=""</a>
    and some time user write one letter in the field
    i don't accept this ..because it makes problems in the results..
    so what can i do to fix this and make security for this .
    so can anyone help me ..please
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    read the values in PHP and massage the data. if it doesn't validate, don't redirect to add.php.

    If you don't understand what I'm talking about, then you need to learn PHP. We cannot write all that code for you. We don't even know your exact detailed requirements even if someone did offer to code it for you.

    Good luck,


    Dan

    Comment

    Working...