Jump to content

Apostrophe crashing PHP Form Script


gc40

Recommended Posts

When I try to update a php script that writes my form entries to the database it fails. It usually works, however, when I use the ' apostrophe, it crashes.

 

What must I add to my code to allow the ' or ` symbol to be ignored and not crash the system?

Link to comment
Share on other sites

I end up doing this:

 

Authenticate();
include ("../class/config.php");
include("./fckeditor/fckeditor.php") ;

		$submit=$_REQUEST['submit'];
		$Content_ID=$_REQUEST['Content_ID'];
		$del=$_REQUEST['del'];
		$Content_Meta_Description=$_REQUEST['Content_Meta_Description'];
		$Content_Meta_Keywords=$_REQUEST['Content_Meta_Keywords'];
		$Content_Title=$_REQUEST['Content_Title'];
		$Content_SubTitle=$_REQUEST['Content_SubTitle'];
		$Content_Body=$_REQUEST['Content_Body'];
		$Content_Full_Page=$_REQUEST['Content_Full_Page'];

        if(!get_magic_quotes_gpc()) {
            $Content_Meta_Description = addslashes($Content_Meta_Description);
            $Content_Meta_Keywords = addslashes($Content_Meta_Keywords);
            $Content_Title = addslashes($Content_Title);
            $Content_SubTitle = addslashes($Content_SubTitle);
            $Content_Body = addslashes($Content_Body);
            $Content_Full_Page = addslashes($Content_Full_Page);
        }
if(isset($submit))

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.