Hi,
This should be easy but I'm not sure where to go from here. I made a "search.php" file that queries a mySQL db and I want the result to be shown in a VB template. So, I have succesfully duplicated the vb template:
(I won't show all the code b/c you all know what it looks like, but for reference it's this I'm talking about) :
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'Range Locator'); // change this depending on your filename
I can make it say "HELLO WORLD!!" using the forum template.
After the above code, I connect to the database and run a query.
I have the results stored in a recordset like this:
PHP Code:
function get_ranges($query)
{
$result = mysql_query($query);
$data = array();
$row = 0;
while ($r = mysql_fetch_assoc($result)){
foreach ($r as $key => $value){
$data[$row][$key] = $value;
}
$row++;
}
return $data;
}
How do I store that into some vb variable so I can access it in the HTML template later?