php include problem - help?

Hi, I am by no means an experienced developer but I have used php include before with no troubles. Now, however, I am running into a bit of a problem.

I am trying to php include a registration form within my webpage template. I am using dreamweaver. When I am in design view, I see the form showing up, however when I switch to live view, and when I uploaded it onto my server and viewed it there, the registration form does not show up.

When this:

<?php include ("register.php"); ?>

didn’t work,

I used this:

<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .="/common/header.php"; include_once($path);?>

and still no luck. I was thinking maybe it’s because I didn’t define any size parameters for where the form should go, but that doesn’t really make too much sense as to why that would cause it to not show up. Please help me!

Does the page that you’re doing it from have any other code on it?

Yes, there are several other lines of code for validation and what not. wow I didn’t even think of that. Is there a way around this? How would you suggest using the form, maintaining all functionality, and still being able to have it be within a div of my template?

The validation code should all be on top of the page. I’ve always had my registation pages on a completely seperate page, which it looks like you do. So what you need to look at is on the page your including from, is there anything that would cause it not to appear, like if statements, loops, switches, etc.

Sponsor our Newsletter | Privacy Policy | Terms of Service