Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Some assistance with PHP script ?
Okay, So I'm having a bit of an issue, no matter what I try I can't get rid of the error which is.
Unexpected T_VARIABLE on Line 39 of script activate_key.php
The code is here.
Any assistance would be greatly appreciated.
1 Answer
- 8 years agoFavorite Answer
This line seems to be the problem: $key_query = "SELECT * FROM "$db_name"."$db_table" WHERE keycode="$key" AND active="$key_active_value"";
You need to escape the double quotes. Or change them to single quotes.
$key_query = "SELECT * FROM '$db_table' WHERE `keycode` = '$key' AND `active` = '$key_active_value'";
Your $db_name variable doesn't go there either. The connection to the database (db_host, db_username, and db_password) should be established before this.