Thanks, giving it a try now.
Quick question?... can I do this to put it into an html template?
Code:
<?php
$tmpname = $vbulletin->db->query_first("SELECT email
FROM " . TABLE_PREFIX . "user
WHERE username = '" . $username . "'");
$useremail = $tmpname['email'];
?>
--------------- Added [DATE]1368133742[/DATE] at [TIME]1368133742[/TIME] ---------------
Reason asking about the html template is, I found where I need to inject this query is in an embedded html template within the php file.
Code:
<?php
\$tmpname = \$vbulletin->db->query_first("SELECT email
FROM " . TABLE_PREFIX . "user
WHERE username = '" . \$username . "'");
\$useremail = \$tmpname['email'];
?>
Currently produces
"Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING"
in
WHERE username = '" . \$username . "'");
I have to add the backslashes infront of $ to eliminate another error.
--------------- Added [DATE]1368135094[/DATE] at [TIME]1368135094[/TIME] ---------------
$HTML_header_t is the only place I can execute this sql query, with of course $useremail being printed in the body of that page..
Code:
<?php
$HTML_header_t = <<< TEOL
<meta http-equiv="Content-Type" content="text/html; charset={\$stylevar[charset]}" />
<html>
<head>
\$css
</head>
<body>
....etc