SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trying to add header/footer to this page.

    I have header and footer showing on most web pages, but not this one added later. I tried copying a few lines from another page that HAS the header and footer appearing, but got many errors which I've listed below. (The page code shown below I've extracted some lines of private data)
    Any help with trying to add header and footer to it will be appreciated.

    Working page without header/footer:
    Code:
    <?php
    
    // Get Details
    $amount = $_POST['valu'];
    $credits = $_POST['cre'];
    $user_id = $_POST['uid'];
    $item_name = $_POST['itnm'];     
    
    // Include the paypal library
    include_once ('Paypal.php');
    
    // Create an instance of the paypal library
    $myPaypal = new Paypal();
    
    // Specify your paypal email
    
    // Specify the url where paypal will send the user on success/failure
    
    // Specify the url where paypal will send the IPN
    
    // Specify the product information
    $myPaypal->addField('item_name', $item_name);  
    $myPaypal->addField('amount', $amount);
    $myPaypal->addField('item_number', $credits);
    
    // Specify any custom value
    $myPaypal->addField('custom', $user_id);
    
    // Enable test mode if needed
    ///$myPaypal->enableTestMode();
    
    // Go
    $myPaypal->submitPayment();
    Added some lines from other page that has header/footer as an attempt,
    but got errors:

    Code:
    <?php
    (include_once ('classes/config.php'); 
    (include_once ('classes/sessions.php');
    // Get Details
    $amount = $_POST['valu'];
    $credits = $_POST['cre'];
    $user_id = $_POST['uid'];
    $item_name = $_POST['itnm'];     
    
    // Include the paypal library
    include_once ('Paypal.php');
    
    // Create an instance of the paypal library
    $myPaypal = new Paypal();
    
    // Specify your paypal email
    
    // Specify the url where paypal will send the user on success/failure
    
    // Specify the url where paypal will send the IPN
    
    // Specify the product information
    $myPaypal->addField('item_name', $item_name);  
    $myPaypal->addField('amount', $amount);
    $myPaypal->addField('item_number', $credits);
    
    // Specify any custom value
    $myPaypal->addField('custom', $user_id);
    
    // Enable test mode if needed
    ///$myPaypal->enableTestMode();
    
    // Go
    $myPaypal->submitPayment();
    The errors were:
    Warning: include_once(classes/config.php) [function.include-once]: failed to open stream: No such file or directory in /home/public_html/payment/thispage.php on line 3

    Warning: include_once() [function.include]: Failed opening 'classes/config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/payment/thispage.php on line 3

    Warning: include_once(classes/sessions.php) [function.include-once]: failed to open stream: No such file or directory in /home/public_html/payment/thispage.php on line 4

    Warning: include_once() [function.include]: Failed opening 'classes/sessions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/payment/thispage.php on line 4

    Any help/thoughts/suggestions will be appreciated.
    Last edited by ChrisjChrisj; Jul 9, 2009 at 17:13.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •