Closed Thread
Results 1 to 5 of 5

Thread: php help (include)

  1. #1
    markforbes130113 is offline x10Hosting Member markforbes130113 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    22

    [RESOLVED] php help (include)

    I HAVE RESOLVED THIS ISSUE.

    Original post;
    Hi there. I need a little bit of help.
    I'm currently trying to design/code a website for my college project.
    All is fine except the php part...
    PHP doesn't seem to work at all for me, I've tried php includes, using <?php include("test.php"); ?> and it just won't include it. I'm using xhtml 1.0 transitional as the doctype.

    My website; Click Here

    What I'm trying to do;
    I'm trying to get the PHP working so I can connect to a mySQL database (mysql, phpmyadmin is set up), grab data, and put it in a table under the "Special Offers" part on the left hand side.

    As far as I know, php is set up and SHOULD be working.. but it's not...
    I'm a newbie at php ;D so please try elaborate if you help...

    If I don't reply to this in time, email me at my MSN Address
    Last edited by markforbes130113; 04-18-2011 at 11:08 PM. Reason: Resolved the problem

  2. #2
    MaestroFX1's Avatar
    MaestroFX1 is offline Community Advocate MaestroFX1 has a spectacular aura about
    Join Date
    Feb 2008
    Location
    Area 51
    Posts
    1,577

    Re: php help (include)

    Create .htaccess with
    ---------
    AddType application/x-httpd-php5 .html .htm
    ---------

    Include ; in your actual code.
    <?php include "test.php"; ?>

  3. #3
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: php help (include)

    Rename index.html to index.php!

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  4. #4
    markforbes130113 is offline x10Hosting Member markforbes130113 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    22

    [RESOLVED] php help (include)

    Quote Originally Posted by MaestroFX1 View Post
    Create .htaccess with
    ---------
    AddType application/x-httpd-php5 .html .htm
    ---------

    Include ; in your actual code.
    <?php include "test.php"; ?>
    Quote Originally Posted by callumacrae View Post
    Rename index.html to index.php!

    ~Callum

    thank you both for the replies. I realised after I posted the topic that I had index.html instead of .php
    I'm pleased to say that I have it working and I have went farther on and included MySQL onto it too

    Thank you both for replying.

    A mod etc can lock this as it's resolved.

  5. #5
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: php help (include)

    Make sure you're using PDO or MySQLi, not mysql_*

    Locking topic.

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

Closed Thread

Similar Threads

  1. php include
    By monsterm in forum Free Hosting
    Replies: 7
    Last Post: 07-15-2009, 06:11 PM
  2. PHP Url Include
    By vwd2009 in forum Free Hosting
    Replies: 3
    Last Post: 05-23-2009, 11:23 AM
  3. php include
    By Conmiro in forum Programming Help
    Replies: 4
    Last Post: 03-28-2009, 02:29 PM
  4. php include is this possible
    By nahsorhseda in forum Programming Help
    Replies: 5
    Last Post: 12-28-2007, 12:09 PM
  5. A little help with Include PHP
    By DarkDragonLord in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 08-14-2007, 06:32 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers