Bascially I've created a new table in zen cart with email addresses and activation codes, and I'm trying to hack a way for an activation code to be displayed on the page when the correct code is entered. The php looks like this:
PHP Code:
<?php require('includes/application_top.php');?>
<form enctype="application/x-www-
form-urlencoded" method="get" >Enter the GC Number printed on the
Coin:<input name="gcnumber" type="text" /> <input type="submit"
value="Submit" /></form>
<?php $activation_code = $db->Execute("select ActivationCode from
wp_activation_codes where GCcode = '" . $_GET['gcnumber'] . "'");
if (isset($activation_code)) {
echo $activation_code; }
?>
I"m getting this error in my debug log:
PHP Catchable fatal error: Object of class queryFactoryResult could not be converted to string in /home/c1711enf/public_html/shop/testing_copy.php on line 10
line 10 is the echo line.
I'm not sure if I'm doing the form right either. I'm basically hacking bits of old code to try and get this to work. Please help! Thanks!
Bookmarks