Jump to content

Recommended Posts

here is the entire function if need..

 

	function getPosts()
{
	global $users;
	global $author;
	global $message;
	global $nameMaxChars;
	global $messageMaxChars;

	if ($author && $message && ($capatcha == 6 || controlPosts::isAdmin()))
	{
		if (strlen($author) <= $nameMaxChars && strlen($message) <= $messageMaxChars)
		{
			if ((!controlPosts::isAdmin() && !in_array($author, array_keys($users))) || (controlPosts::isAdmin() && $author == controlPosts::adminName()))
			{
				$this->inputPost($author, $message);

				header('Location: ./');
			}
		}
	}
}
}

 

It is currently just checking for a set number as a captcha before posting content. I want to remove this captcha number check, and cannot seem to do so without breaking the script. thanks in advance!!

I can't get the script to break on my end, but maybe I need your set up to be able to call it right?

 

Anyway, do you understand what the if statement is saying?

 

Simply removing

$capatcha == 6 ||

should do the trick. But make sure you get rid of the brackets too, as they're no longer needed. So your code would be like this:

if ($author && $message && controlPosts::isAdmin())

 

Without being able to replicate the error on my end, I won't really be able to help. Have you got anything I need to be able to try and run your script?

 

Denno

I would like someone to add a functional CAPTCHA to my small 2 page script, if you are interested I posted here:

 

http://www.phpfreaks.com/forums/php-freelancing/need-someone-to-add-captcha-to-form/

 

I will pay via PayPal immediately after seeing a working example, and you can send the code afterwards! Please reply or PM. Thanks so much!

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.