Trying to add a donation centre

I have this page that I’m trying to add a donation centre to and I’d really benefit from some help.
What I have done so far is:

-Added two tables to my database called dc_comments and dc_donations.
-I’ve updated a file with my database connect details called connect.php ( I’m not sure where to place this file so I have placed it side by side with my home.php / footer.php etc )
-I have placed all the relevant xhtml in the usual html field and the css is my style.css files.
-I have place a ipn.php file asside all the other php docs and a thankyou.php and donate.php

Have I placed the files in the correct place and what other edits info am I missing?

ok so I’ve progressed a little but I just can’t seem to figure oout why it’s not working:

Please please please I really hope someone can help me as I’m trying to setup a donation centre as directed by this tutorial: http://tutorialzine.com/2010/05/donation-center-php-mysql-paypal-api/

The problem with this tutorial is that it is very vague. I have put in all the xhtml and added the two databases. I have placed all the .php files side by side in this directory: http://sakeenaheducationcentre.com/wp-content/themes/StyleShop

I have placed this in the head: <?php

require “http://sakeenaheducationcentre.com/wp-content/themes/StyleShop/config.php”;
require “http://sakeenaheducationcentre.com/wp-content/themes/StyleShop”;

// Determining the URL of the page:
$url = ‘http://’.$_SERVER[‘SERVER_NAME’].dirname($_SERVER[“REQUEST_URI”]);

// Fetching the number and the sum of the donations:
list($number,$sum) = mysql_fetch_array(mysql_query(“SELECT COUNT(*),SUM(amount) FROM dc_donations”));

// Calculating how many percent of the goal were met:
$percent = round(min(100*($sum/$goal),100));

// Building a URL with Google’s Chart API:
$chartURL = ‘http://chart.apis.google.com/chart?chf=bg,s,f9faf7&amp;cht=p&amp;chd=t:‘.$percent.’,-‘.(100-$percent).’&amp;chs=200x200&amp;chco=639600&amp;chp=1.57’;

?>


I Just don’t know what to do to get it to work - It’s corrently in demo mode but I can’t seem to even donate in demo mode or get the green chart up. I’m also not sure what info to add where for real donations.

I’m not sure about the paypal_class and assigning it PayPal’s URLor about calling the $p->validate_ipn()

I’d really really appreciate a nudge in the right direction, I’ve been working on it for such a long time, although I’ve figured quite a lot out and progressed with some thinking I’m not at a stand still.
I really hope you can help
Many Thanks

ok - so I know I was probably asking for too much on this but it was actually a simple fix and I’ve been obsessionally playing round with it for days and finally got it. I couldn’t for the life of me get the demo to work so I finally switched the true command to false which allowed it to work in real mode and with that on everything worked fine. I also got rid of all the php code ( even with the php plug in for wordpress ) and used the source code for the tutorial ( and not the code they gave ). With the correct urls’s in the place it all works fine and I love the Donation Centre! So the fix was really running it from the php file and not the wordpress html editor ( pages ) I’ve just added a link to it from the [URL=“http://www.sakeenaheducationcentre.com/our-mission”]Our Mission page.

Works a treat and already taking in donations