Hey. I will post my code and try to explain the issue i am having.

define('FB_ROOT', "http://apps.facebook.com/tester/index.php/");
define('HTML_ROOT', "http://www.tester.com/facebook/");
define('APP_ID', "xxxxxxxxxxxxx");
define('APP_SECRET', "xxxxxxxxxxxxxxxxxxxxxxxxx");

function fb_root($url="") {
	return FB_ROOT . $url;

function html_root($url="") {
	return HTML_ROOT . $url;

function redirectToCanvas() {
	header('Location: '.fb_root());


require 'facebook.php';

$facebook = new Facebook(array(
  'appId'  => APP_ID,
  'secret' => APP_SECRET,
  'cookie' => true

$debug = false;

if ($facebook->getSession() && $debug == false) {

	// User is logged in and authorized, let's party.

	// Get friends list of current user
	$call = $facebook->api('/me/friends');
	$friends_list = $call['data'];
	// Get user information of current user
	$call = $facebook->api('/me');
	$my_info = $call;
	$user = $facebook->getUser();

<h3>By: <a href="http://www.tester.com?">tester.com</a> - visit us today!</h3>
<p>Free personalised animated e-cards for all occassions</p>

} else {

	$params = array(
	$redirect = $facebook->getLoginUrl($params);
	echo '<fb:redirect url="' . $redirect . '">';


<fb:swf swfbgcolor="ffffff"  swfsrc='http://www.tester.com/facebook/tester/Bcard2.swf' width='380' height='250' />

<form method="post" onsubmit="return validateFormOnSubmit(this)" action="birthdayPreview.php">
    <p>Receivers Name<a> 
    <input type="text" name="receiver" size="30" maxlength="35" /></a></p>
    <p>Senders Name<a> 
    <input type="text" name="sender" size="30" maxlength="35" /></a></p>
    <p><input type="submit" value="Preview"/></p>

content="Send an E-Card to your friends. <?php echo htmlentities("<fb:req-choice url=\"http://apps.facebook.com/tester/\" label=\"Authorize My Application\"") ?>" > 
<fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use tester."> 
<fb:comments xid="graphapi_comments" canpost="true" candelete="false" returnurl="<?=fb_root()?>">
<fb:title>Talk about this application</fb:title>

<center><img src="http://www.e-zeeinternet.com/count.php?page=444454&style=default&nbdigits=7" alt="Free Hit Counter" border="0" ></center>
I dont know if anyone knows much FBML, but hopefully this is more a php issue. Basically, as it stands, in my form I have the action set to call up birthdayPreview.php. However, whenever submit is pushed, it seems to call up index.php. Can anyone see any reason why this might be?