Originally posted by gotissues68
When you call the script, you're calling PHP_SELF rather, so the script on the local server, by calling "www.yourserver.com/somescript.php" instead of PHP_SELF, it will check the proper database to verify that the key the user has entered is valid and subsequently let them continue with the install.
HTH
Dear Sir,
i have made a new file (search.php) and puted it on my own server with following code :
<?php
$var = @$_Post['q'] ;
$trimmed = trim($var);
if ($trimmed == "")
{
echo "<p>Please enter your license code</p>";
exit;
}
if (!isset($var))
{
echo "<p>We dont seem to have a search parameter!</p>";
exit;
}
mysql_connect("localhost","dbadmin","password");
mysql_select_db("dbname") or die("Unable to select database");
$query = "select * from main where license like \"%$trimmed%\"
order by license";
$numresults=mysql_query($query);
$numrows=mysql_num_rows($numresults);
if ($numrows == 0)
{
echo "<center><h4><font color=\"#ff0000\">Your license code is invalid!</h4></font></center>";
echo "<center><a target=\"_blank\" href=\"http://www.mysite.com/sales\">Club Membership</a></center>";
}
else {
echo "<div align=\"center\"><a href=\"ssninstaller.php?act=install\"><b>INSTALL DATABASE</b></a></div><br>";
}
?>
also i have changed the action of form to : http://www.mysite.com/search.php
function license() {
SSNhead();
echo"<center>Please enter your license code here:</center>";
echo "<center><form name=\"form\" action=\"http://www.mysite.com/search.php\" method=\"post\">"
. "<input type=\"text\" name=\"q\"/>"
. "<input type=\"submit\" name=\"Submit\" value=\"License Check\" />"
."</form></center>";
SSNfoot();
}
How can i refer to the install script on customer computer after
if ($numrows == 0)
{
Thank You Very Much
Mansour