Quote:
Originally Posted by earthone
I have been having a rough time figuring out the problem with a simple script. Can you guys help me figure it out.
Here is part of the script can you tell me what im doing wrong.
Page 1
PHP Code:
<?php require("./copyrightChecker.php"); $crCheck = "Your_Copyright_Goes_Here"; if ( CopyrightChecker($crCheck) == COPYRIGHT_IS_VALID ) { } else { if ( CopyrightChecker($crCheck) == COPYRIGHT_NOT_VALID ) { echo "The copyright must remain intact in order for this script to work..."; exit; } } ?>
Page 2
PHP Code:
<?php function CopyrightCheck($crCheck) { $crCheck = stripslashes($crCheck); $Copyright_Notice = "Copyright © 2000-2009 YourWebsite.com (Your Script). All Rights Reserved"; if ($crCheck != $Copyright_Notice) return COPYRIGHT_NOT_VALID; else return COPYRIGHT_IS_VALID; } ?>
any help is greatly appreciated.
|
I don't think you are getting any output.
Shouldn't your copyright notices be quoted?
page 1
PHP Code:
<?php
require("./copyrightChecker.php");
$crCheck = "Your_Copyright_Goes_Here";
if ( CopyrightChecker($crCheck) == "COPYRIGHT_IS_VALID" ) {
} else {
if ( CopyrightChecker($crCheck) == "COPYRIGHT_NOT_VALID" ) {
echo "The copyright must remain intact in order for this script to work...";
exit;
}
}
?>
page 2
PHP Code:
<?php
function CopyrightCheck($crCheck) {
$crCheck = stripslashes($crCheck);
$Copyright_Notice = "Copyright © 2000-2009 YourWebsite.com (Your
Script). All Rights Reserved";
if ($crCheck != $Copyright_Notice)
return "COPYRIGHT_NOT_VALID";
else
return "COPYRIGHT_IS_VALID";
}
?>
Or are your copyright notices, functions that return a value?
page 1
PHP Code:
<?php
require("./copyrightChecker.php");
$crCheck = "Your_Copyright_Goes_Here";
if ( CopyrightChecker($crCheck) == COPYRIGHT_IS_VALID() ) {
} else {
if ( CopyrightChecker($crCheck) == COPYRIGHT_NOT_VALID() ) {
echo "The copyright must remain intact in order for this script to work...";
exit;
}
}
?>
page 2
PHP Code:
<?php
function CopyrightCheck($crCheck) {
$crCheck = stripslashes($crCheck);
$Copyright_Notice = "Copyright © 2000-2009 YourWebsite.com (Your
Script). All Rights Reserved";
if ($crCheck != $Copyright_Notice)
return COPYRIGHT_NOT_VALID();
else
return COPYRIGHT_IS_VALID();
}
?>
And where is CopyrightChecker() all I see is CopyrightCheck($crCheck) ?