Forum Moderators: coopster
<form name="registration" action="<?=$PHP_SELF?>" method="POST">
<p>Please enter your name: <input type="text" name="regname" size="30"></p>
<p> Enter the Registration Code: <input type="text" name="hardware" size="30" /></p>
<p><input type="submit" name="Send" value="OK" id="OK"></p>
</form>
<?php
if( @$Send == "OK" )
{
/* OK-Button pressed - how do I first check to see if a key is already stored in field C3 of MySQL database? */
if(/*how do I query the MySQL database for field C3 if there is nothing in the table ==0 then call the script*/)
{
require_once("activationkey.php");
echo( "<p>Here is your private key:</p>\n" );
echo( "<p>Name: $regname </p>\n" );
echo( "<p>Activation Key: " .MakeKey($1aa, $2bb, $regname, $hardware)."</p>\n" );
/* How do I send the returned key to database field C3 so any future attempt to call the MakeKey script will move to the elseif? */
}
}
elseif(/*a key was found in field C of the database*/ > 0)
{
echo( "<p>This software has already been activated. The activation key issued was: $key </p>\n" );
}
?>