Jump to content

make it where users can't put < or leave form blank?


A2xA

Recommended Posts

I wan't to make my form secure.  Which means no / or < or leave it blank.  You get my point.  Would it be best to add it to the code that the form is processing, or the actual form itself?  If you could point me to a tutorial I could also follow that.  I just couldn't find anything!  ;)

 

 

Form Code:

<form name="hubmove" action="taken out" method="post">

<h3>Step 1. Enter Hub ID or Name To Make Hub, Then Come Back And Proceed to Step 2<h3>
  <input name="dir" value="" type="text">

<INPUT TYPE="submit">
</form>

 

Processing code:

<html>
<?php

$dir = $_POST[dir];

mkdir("taken out", 0755);
chmod("taken out", 0777);  

?>
<h3> Click <a href="taken out">Here</a> to return back to hubs Complete Step 2. To Activate your Hubs<h3>
</html>

 

Thanks, I appreciate it!  I need to secure my stuff so I can release it.  This is the last step.  All who helps Thanks!  ;)

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.