"include" comand

+2 mike dunne · November 23, 2014
does the "include" command only work in the index file or can I use it in any file.. because in my register.php file I use the include 'form.php' ; it doesn't work but when I open the form.php file it it works on its own... it just wont work in register.php

Post a Reply

Replies

- page 2
Oldest  Newest  Rating
0 mike dunne · November 23, 2014
this is what I have so far but I thought it should work... I am just learning so go easy on me... I have been watching your videos and learned a lot.. did my first website thanks to you but now I want to register users and having a little bit of a problem.. trying to build a register page... I have a form that I made and I just want to use it at the top of the page to save some space and use the form for other things.. I have a form.php file that works just having a problem linking it to the register.php file...

<!DOCTYPE html>

<?php include 'form.php'; ?>
+1 Bucky Roberts · November 23, 2014
It works in any file. Can you post your source code? I will try to find out why it isn't working. 
  • 1
  • 2

PHP

106,990 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators