php help (include)

Status
Not open for further replies.

markforbes130113

New Member
Messages
22
Reaction score
0
Points
1
[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:

MaestroFX1

Community Advocate
Community Support
Messages
1,577
Reaction score
60
Points
0
Create .htaccess with
---------
AddType application/x-httpd-php5 .html .htm
---------

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

markforbes130113

New Member
Messages
22
Reaction score
0
Points
1
[RESOLVED] php help (include)

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

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

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.
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
Make sure you're using PDO or MySQLi, not mysql_* :)

Locking topic.

~Callum
 
Status
Not open for further replies.
Top