Jump to content

PHP Forms


Daney11

Recommended Posts

Hey guys.

 

Im using forms to enter information into my website and im doing all the security measures needed. However when i enter

 

<script type="text/javascript">window.location = "http://www.google.com/"</script>

 

To say

<input class="forminput" name="news_title" type="text" value="<?php if (isset($_POST['news_title'])) echo $_POST['news_title']; ?>" />

 

I get a broken field when the error comes up

Error im using is

 

if (eregi ('^[[:alpha:][:digit:][:blank:]-]{2,60}$', stripslashes(trim($_POST['news_title'])))) {
   $news_title = escape_data($_POST['news_title']);
} else {
   $news_title = FALSE;
   $errors[] = 'Please Enter A News Title';
       }

 

The break of the form field looks like

 

FORM[ <script type=\ ]window.location = \"http://www.google.com/\"" />

 

The [   ] represents the form area. So its breaking it up.

 

Any ideas on how to solve this?

 

Image

error.gif

 

 

 

 

 

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.