Hi All,

Below are two files, one being the index page, and one being the functions page.

My problem is when i use a function it just gives me a blank screen. The echo at the top of the index page is simply a sanity check.

Do i have an error with my functions syntax?


echo "hello";
$user_id = $_REQUEST['processor_id'];
$amount = $_REQUEST['amount'];
$currency_user = $_REQUEST['currency_user'];
$method = $_REQUEST['payment_method'];
$email = $_REQUEST['email'];
echo "your user id is " . $user_id;
echo "<br>";
echo $email;
include "myFunctions.php";


// connect to the database
function getConnection(){
	$usr = "usr";
	$pwd = "pw";
	$db = "db";
	$host = "localhost";
	$cid = mysql_connect($host,$usr,$pwd);
	mysql_select_db($db, $cid);
	if (!$cid) { echo("ERROR: " . mysql_error() . "\n");	

	$SQL = "SELECT * FROM tbl_registration WHERE user_id = '$user_id'";
$result = mysql_query($SQL);
$row = mysql_fetch_assoc($result);
echo $row['register_type'];

im an idiot i forgot to use the word FUNCTION on the second function