DJTim666 Posted April 29, 2007 Share Posted April 29, 2007 I am having trouble including a layout to my page. When I use the PHP Include function, it just places the layout above the information instead of placing the information inside the layout. I have an open cell on the layout to place the information in, but it is not working. HELPPP! http://typrofiles.110mb.com/profiles/createpro.html When you insert your information it goes to a PHP page where all your information is displayed that you entered. I want the PHP to go inside the layout. Any help would be greatly appreciated. -- DJ Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/ Share on other sites More sharing options...
trq Posted April 29, 2007 Share Posted April 29, 2007 Post some code. include will include the file exactly where you call it. Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240739 Share on other sites More sharing options...
DJTim666 Posted April 29, 2007 Author Share Posted April 29, 2007 I know, but how do I get information to go directly into the layout with inserting the layout on to the page? Here is the code. <?php $name = $_POST ['name']; $gender = $_POST ['gender']; $age = $_POST ['age']; $sign = $_POST ['sign']; $height = $_POST ['height']; $btype = $_POST ['btype']; $ethn = $_POST ['ethn']; $smoke = $_POST ['smoke']; $drink = $_POST ['drink']; $langue = $_POST ['langue']; $religion = $_POST ['religion']; $country = $_POST ['country']; $sp = $_POST ['sp']; $oaf = $_POST ['oaf']; $enter = $_POST ['enter']; $ho = $_POST ['ho']; $cit = $_POST ['cit/tow']; $photo = $_POST ['photo']; ?> <?php include("menu.php"); echo "Name: $name<br />"; echo "Gender: $gender<br />"; echo "Age: $age<br />"; echo "Sign: $sign<br />"; echo "Height: $height<br />"; echo "Body Type: $btype<br />"; echo "Ethnicity: $ethn<br />"; echo "Smoke?: $smoke<br />"; echo "Drink?: $drink<br />"; echo "Language(s) Spoken: $langue<br />"; echo "Religion: $religion<br />"; echo "Country: $country<br />"; echo "State/Province: $sp<br />"; echo "City/Town: $cit<br />"; echo "Outdoor Activities/Fitness: $oaf<br />"; echo "Entertainment: $enter<br />"; echo "Hobbies and Other: $ho<br />"; echo "Photo: $photo<br />"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240742 Share on other sites More sharing options...
trq Posted April 29, 2007 Share Posted April 29, 2007 I know, but how do I get information to go directly into the layout with inserting the layout on to the page? What? Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240746 Share on other sites More sharing options...
DJTim666 Posted April 29, 2007 Author Share Posted April 29, 2007 Ok, I am trying to get the information that someone enter's to insert inside the layout using the include funtion. I do not want to insert the layout on the PHP page because it causes a crap load of problems. I want this information to go inside the cell in the layout. <?php include("menu.php"); echo "Name: $name "; echo "Gender: $gender "; echo "Age: $age "; echo "Sign: $sign "; echo "Height: $height "; echo "Body Type: $btype "; echo "Ethnicity: $ethn "; echo "Smoke?: $smoke "; echo "Drink?: $drink "; echo "Language(s) Spoken: $langue "; echo "Religion: $religion "; echo "Country: $country "; echo "State/Province: $sp "; echo "City/Town: $cit "; echo "Outdoor Activities/Fitness: $oaf "; echo "Entertainment: $enter "; echo "Hobbies and Other: $ho "; echo "Photo: $photo "; ?> Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240749 Share on other sites More sharing options...
trq Posted April 29, 2007 Share Posted April 29, 2007 I want this information to go inside the cell in the layout. So, include it in that cell. Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240751 Share on other sites More sharing options...
DJTim666 Posted April 29, 2007 Author Share Posted April 29, 2007 How do I get the information to go inside the cell? The Layout is a different file named layout.html Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240752 Share on other sites More sharing options...
trq Posted April 29, 2007 Share Posted April 29, 2007 The Layout is a different file named layout.html Layout.html needs to be layout.php, then just include the other file where need be. Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240756 Share on other sites More sharing options...
DJTim666 Posted April 29, 2007 Author Share Posted April 29, 2007 I can name a document .php if it has HTML in it, and it will still work? And if that is the case, then thank you for your help Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240758 Share on other sites More sharing options...
trq Posted April 29, 2007 Share Posted April 29, 2007 I can name a document .php if it has HTML in it, and it will still work? Of course. Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240760 Share on other sites More sharing options...
DJTim666 Posted April 29, 2007 Author Share Posted April 29, 2007 Alright, that solves my whole problem lol. Thanks for your help ! Quote Link to comment https://forums.phpfreaks.com/topic/49137-solved-php-include/#findComment-240762 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.