Jump to content

please help me : security and required fields with php


Mr.only

Recommended Posts

i need help in this form

 

<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

 

 

 

<SCRIPT type=text/javascript>
<!--
//-->
</SCRIPT>

 

or something like this

 

 

 <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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.