Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Insert Page Into Template


I have a script that uses a template for my site. I am trying to add a page(s) to it and have the pages use the template. The template has an area where I want the contents of my other page to appear. The other parts of the script use this PHP Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Make A Web Page For Each Row With The Same Template
i have a database with 5 columns and a lot of rows i want to make a web page for each row with the same template is there a way to automatically do this or do i have to make each page?

View Replies !
Simple Home Page - Template
Could somebody show me or send to my email source code with simple home
page, something like this:

table with three rows:
first row (headline - logo)
second row (table with three columns - left[menu], middle[this column
is changing depending on the what somebody click on menu], right)
third row (footer)

The point is that when i click left column (Menu > Article or sth)
middle column display list of articles and when i click particular
title content display in the same column.

On home page I'd like make simple deily news sysetm

View Replies !
Inserting A PhpBB Into A Php Page Template..
this is my first post here in wwc php is a chinese language to me.. i know this is a simple question but hopefully someone will anser it wihtout any mockery.. ahihi.. pardon my ignorance of php. how will i insert PHPbb(bulleting board/forum module) into a template.. pls check this for reference:

wherein the FORUM is inserted right in the middle of the forum pages.

View Replies !
How Do I Define Variable In Template, Not Page
What I'm trying to do is have a jpg (or gif) and bgcolor change depending on what section (or page) is being viewed. I want this to happen from the template, or master header, to keep control over the site. I can currently define it on the product page, but this is not what I want. Code:

View Replies !
Template For Page Caching, Headers And Gzip
like most new starters, i've struggled with page caching and delivering headers properly. i've spent ages trying to find some cut-and-paste code that does everything i want it to do, and in the end i had to read a few books and write it myself.

i admit that this code is probably far from perfect. there are probably loads of better ways of doing it, but.... it works. and when you're starting out, that's all you want it to do. Code:

View Replies !
Loads Up A Template Page That Calls The Variables
How do you call a variable from a page?

I have index.php contain variables, then this loads up a template page that calls the variables... now how do you have a page like header.php then have a variable from that page get called?

Also every page is different in that some pages have 5 tables, some have 3. how could I code this to work out? I have a template and need it to call a variable that can contain the code, but how would it know to add another line?

View Replies !
Insert A Page Break For Printing Purposes After X Records On Page.
I need to insert a page break for printing purposes after X records on page. I'm querying five diffrent records with 5 different results and displaying them like:

$record1
$record2
$record3 and so on

So I want to get total number of records which is pretty easy I just add all the totals let's call it $subtotal. Then I want a page break after every 20 records of the $subtotal. Is this possible?

View Replies !
How To Change Template Menu Link Text Color For Page Currently Viewed ??
Say you have a left menu that stays the same on every page within in your site. Obviously you would make this menu a template or library item, so that when you edit one version, all the others are updated.

Let's say the left menu is the following:

Page_1
Page_2
Page_3

Now, when I am viewing Page_1, I want the "Page_1" text in the left menu to be red, so that the viewer knows what page they are on. When I click on the left menu link for "Page_2", then I want the "Page_1" text to go back to black and the "Page_2" text to be red.

View Replies !
Call The Template And Replace The Fields In The Template With Some Sizzling Content.
Im looking to develop a Template System that i can use in websites for my clients.I have had a look at FastTemplate, PHPLIB, and PEAR. I have also written a Template System that is sort of a hybrid of all three but, i was wondering what everyone else's views or opinions are on what features should be included in a good Template System.

Obviously the templates will reside in another file and some PHP code will call the template and replace the fields in the template with some sizzling content.

View Replies !
Create A Template Where Two Php Pages Will Access The Same Template
i am new to templating system i want to create a template where two php pages will access the same template problem is the two php pages has different fields and putting them in one template is not comming.

View Replies !
Insert A Page Break
I have a for statement that looks something like this: PHP Code:

for ($i = 1; $i <= 100; $i++) {
        
        echo '<a href="someurl.php?p=$i">Link</a>&nbsp;|&nbsp;'

}

I'd like to put in a <BR> tag after every multiple of 10. I've tried to use a nested for statement, but I just get errors. I don't think I'm doing it right.

View Replies !
How To Insert Tab In An Html Page???
i am making one appllication inwhich the user enters text in textarea field. i am saving this value in database and when user accesses value from database, i want to display text in a format entered by user.

i.e. if the user has entered some text in 2nd line then it should be displayed on second line and not after the end of first line in continuation. if user has entered tab in some location, the tab will be displayed while viewing data from database.

View Replies !
Insert/select From Same Page
I was wondering (and I suspect I already know the answer) if it's possible to insert data into a mysql table and select that same data from within the same php page.

View Replies !
OOP Page: Where To Put Update, Insert, Delete
I have a page that shows info from MySQL. It is for an online education
site. It uses different classes arranged in a hierarchy. Each lesson is
roughly laid out like this:

Lesson
|-Intro
|
|-Section
| |-Procedure
| |-text, video, images
|
|-Section
| |-Procedure
| |-text, video, images
|
|-Summary

I have all the classes working properly for displaying info from the
database. Now I am building the admin site.

Where should I put the update/insert/delete code? Would those go inside the
classes? Should I use the lesson object when doing the maintenance? Or,
should I just have a separate page that handles the database stuff and only
use the objects to display the data from the database?

View Replies !
INSERT Data On Page Load?
I have an avatar system where certain avatars are locked until the user unlocks them by going to certain pages of the site.

So far ( being the newb I am ) I only know how to INSERT data from a form. Is there a way to do it on page load or similar?

I also need it to first check if the data already exists and if not it inserts the data and then displays a message to the user that they have unlocked the avatar. Code:

View Replies !
Traverse And Insert Page Breaks?
My website is going to host various and future pieces of my writing. Some of the pieces are going to be very long, so I need to split them up over multiple pages. I have an input form through which I can type or paste a piece of writing and have it inserted into MySQL. What I need now is to have PHP automatically insert page breaks before the piece is inserted.

I was told I could use regular expressions, or I could use PHP to traverse the string and insert a page break, say, after 1400 characters so long as it ends on a period.

I know of str_replace, but how do I set it go a certain amount of characters? This whole pagination thing has me completely stumped. I'm not looking to paginate display results. I'm displaying one result split up in pages.

View Replies !
Insert To Database On Page Load
I have the code for inserting data to a database form a form (Code below) but I want the data to be entered upon a page loading, how would I do this? Code:

View Replies !
Refeshing Page Duplicate Insert
I am creating a registration script for my site and it is posted to itself. The problem is that when all the information is inserted into the database and i display what you have inserted, like username and email etc.

If i refresh the page then it tries to insert it all again flashing up a dublicate entry message. How can i get around this? I thought of a redirect but would prefere not to.

View Replies !
How To Simply Display On My Page Another Insert From A Different Table.
$judet = $_GET["judet"];

$result = mysql_query ("SELECT oras, id_oras FROM orase WHERE id_oras = '{$judet}' ORDER BY oras");

This is a piece of my code. The variable $judet is working perfect but i have a problem with another variable in the same table with judet witch i can't call.Everything from table orase works i just don't know how to simply display on my page another insert from a different table.

View Replies !
Howto Insert Picture Stored In Directory With Url In Db Onto Web Page?
If I read one tutorial more on how to store a image inside a mysql database I will blow my mind.

I read everywhere on the forums to store the image on the harddrive and use the url in the database and then pull the image out of the directory and onto a web page.

I am new to PHP and mysql but have looked now for two weeks on how to code a page to do this. It really has to be simple, so simple no one has taken the time to write a tutorial on it. There are lots, many, plenty, please no more tutorials on using BLOB to store an image inside a database.

What is the code to pull a image from a dir. using a url in the db and put it on a web page, I have been trying my own ideas and not working....NO I don't want to use BLOB.

darn thing with php, you can't see the code that does the trick...all I can see is the std <img scr="blab,blab,blab">

View Replies !
Stopping Another Data Insert When User Reloads Page
My PHP script inserts data into a mysql table that has been passed into it.

My question is, what is the general method by which to ensure that if a user reloads the screen, the same set of data doesn't get duplicated into the database?

For instance, I am inserting ticket data (its an ecommerce event system) into a mysql and really dont want duplicated entries if the user happens to press reload or back or whatever

Any ideas?

View Replies !
Multi Page Form Question Concerning $id = Mysql Insert Id();
I am creating a multi page form. The code below is what I am using. However, I am having a difficult time having it post to MySQL under "pg2" where it posts to MySQL I have the function $id = mysql_insert_id(); to post the id from "pg1" post to the database. However it only post 0 which I think is due to it being in an array. Code:

View Replies !
Use The Php Include Command In Source Code To Insert External Page
Hello, i am trying to use the php include command in source code to insert external page when a main page loads, but get the following errors.. can you help?

View Replies !
Header Problem - Insert The Info Below And Then Jump Back To A Page.
i want to insert the info below and then jump back to a page. Here is insert and the header statement: PHP Code:

View Replies !
Inserting A Template In A Template
I have a php page that loads a header like this PHP Code:

View Replies !
Automatically Open Default Mail Program And Insert The Current Page Of Browser As The Body Of The Message.
On my website I would like the facility to click on an image or text that will automatically open up their default mail program and insert the current page on their browser as the body of the message.

I realise that most browsers will have this facility already but I would like to add my own method. Problem is, I have no idea on how to achieve this. I'm sure it can't be that difficult though. It maybe can be done just using HTML, I don't know.

View Replies !
Insert Values - Table Has Four Columns To Insert Into
I have a bunch of information that I want to insert into a table

insert into TABLE values ('hello','I','am','lost');

pretend that the words that are being inserted are coming from a form for another page. In he case I above I have declared that the table has four columns to insert into. What if I do not know how many columns there are?

View Replies !
Insert Into Table - $query = "INSERT INTO Tbl
I have a small problem which I've been working on for a while. PHP Code:

$query = "INSERT INTO tbl(username,ip,link) VALUES("Brin' . $result['id'] . '","$REMOTE_ADDR","http://www.domain.com/sub/start.php?username=Brin"' . $result['id'] . ' )";
mysql_query($query);

Any ideas?

View Replies !
Insert Statement Doesn't Insert Anything
I have an int field in a database and for teh purposes of this case the insert statement doesn't insert anything into the field using the ' ' syntax however in the mysql database this appears as 0. I was wondering can I still use the empty syntax as follows or will it not work as it is 0 does is this not classed as empty?

  if (empty($row['intTest'])){
 
 $sns= "empty";
 }

View Replies !
PHP PDF Template
I am looking for a free or cheap, easy way to customize brocures
already in PS or PDF. Specifically, I want to replace, using a
stamping system or otherwise text and images in the brocures. I saw
PDFLib but the files are being created by designers in Adobe
Imageready and distilled to PDF...

View Replies !
PHP Template
I am trying to have 1 template site and have an unlimited number of
websites
using this template site to call there own information.

The sites are exactly the same except for the database, each of the
sites
also needs there own URL, for example one of these urls may be
www.example1.com and the other www.example2.com. These sites are
identical
apart from the database they call to, one will call to a database
called
example1 and the other example2. I want another site (for example
www.solution.com) to read what url has been entered and to pull in the
database for that site (either example1 or example2) and show that
information. I have tried using the CURL library without success (not
sure
how to use it fully) and have tried using frames but had loads of
problems

View Replies !
To Template Or Not
i'm developing a website that will have an huge amount of visitors a day -->
it will be a contest with 100.000$ of prize.
I'm concerning about using a template class (and which one do you suggest)
or developing an optimized set of pages without using class nor PEAR
package.

What do you think about?
What will be your action if you'll be me?

View Replies !
Template?
I want to use a template for my website. A guy on another forum told me I had to use a template parser like Templatepower or Smarty.

Isn't there an easier way, just to implent a code or something?

I only want one template file and connect that one to a PHP-file with content. Then be able to change the content to content from another PHP-file when I click on a link on my site. No more functions needed.

View Replies !
PHP X Template
I would like to know if anybody here has used XTPL before. I have a system that a guy set up for me (he's since left the country) and this system is not IE7 compatible. I cannot get hold of him to fix it. Does anybody have any ideas on how to correct this? I've checked the XTPL website but it didn't have any info regarding IE7.

View Replies !
Which Template To Use
What I would like to do is use PHP to determine which template I should serve based on certain criterions of an item in the database.  For example, if I add a certain article and it is associated with an item (ex: a movie), I would like to serve up a template where it would have movie-specific information on the page (ex: name of movie, genre, length of time, etc.). 

On the other hand, if the article I add is not associated with an item, then it would use a _different_ template without all the specific information. My best guess so far is to have some PHP code that uses an if-else loop on the article to see if the "associated item" field is filled out. The question is, how should I go about implementing this?  Are there any other methods better than the above?

View Replies !
Trying To Template
code:

<?php
if ($temp_view == "")
{
require ("sitepages/index.php");
} else {
require ("$temp_view");
}
?>

Should to above show sitepages/index.php when url = index.php or what ever select from a url like - index.php?temp_view=pages/register.php.

View Replies !
Template
I have a template that has php includes (header.php, footer.php, menu.php, and content.php) Organizing those includes on the page is a series of tables.

So far, it will only display the data called in cantent.php, because its calling that page. I want it to display the content page depending on what menu item is selected, in one of the table cells(where it currently displays content.php).

Like <a href="" target="content.php"></a> or something similar.

Hope it makes sense.

Here is the code: ....

View Replies !
Example Or Template
Is this part of a javascript, if so, is there a place i can get it, if not, does anyone know how i can get an example of this. to look at and learn from it. please help? and please don't tell me that i need to start smaller cause alot of people got nowhere thinking small, want's i see the examples etc. i usually can get it. thanks again.

View Replies !
Template And XSS
I have a multi-site script. In this system, member can edit HTML template and javascript for web effect. But I'm fear XSS in javascript code. I must not remove <script> tag. Who can tell me the good method for this problem.

View Replies !
Template Into Content
I've cleaned a whole site of 1995-era html into xhtml, but now would like to strip all its 'excess' (headers, footers, ad and spacer columns, etc) away to insert it into a php template. The thing is, I don't want to disturb the existing site map.

Would it be possible to designate a page's 'stripped content' as a variable, and call a (say, three column) template containing that variable -or in other words, have a page's content written into a called template - on the same page?

View Replies !
Which Template Engine?
I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't
been updated in a while.

I also ran across patTemplate and Smarty.

View Replies !
Email Template
i need to capture the email template from mysql database, for example; the data is store in one of the field and the content look like this, so when i fire up the email it first will read the template first, then the user and the greetings and compile into an email before sending out. is it possible to do in php?

hello [user],
I just want to wish you [greetings]!
thanks,
melv

as you might see, the php need to grap data from other field and 'fill in the blank' first. so any source or guide that i can refer to?

View Replies !
What's The BEST PHP Template Solution?
What's the BEST PHP Template solution?

View Replies !
Template Looped...
My template system works by defining all variables needed, stuff like $title = " "; $content = " ";, those are defined in the file being accessed. Here is what I mean:
memberlisttemplate.php looks like: PHP Code:

View Replies !
Smarty Template
This code;
{if "sitethumbs/thumbs/{$user.login}.jpg"|smarty_exists}
something here
{/if}

gives me;
Parse error: parse error, unexpected T_STRING in
public_html/smarty/SmartyNoWrite.class.php(216) : eval()'d code on line 471

And this code works;
{if "sitethumbs/thumbs/name.jpg"|smarty_exists}
something here
{/if}

View Replies !
Template Question
My question is about templates in PHP. I know that Smarty ( URL ) is the most popular template engine out there for PHP but do you suggest another way to do this? Is it efficient? If not, what are other ways of doing it yourself without any template engines. What do you guys think of Smarty; have you done any websites using Smarty?

View Replies !
Template System For PHP
If you don't like to use an interpreter like Smarty to parse special markup tags(for eaxample {}) written in your templtate files and covert those to PHP, visit the following link....

View Replies !
Template Menu
I'm trying to decide witch way to do my menu for my program.... see some menu will be accessed by certain users with certain power... but i cant seem to decide with way to do it because... the menu is also template based ( $template = new template( menu.shtml )) anyone has done this in a way to keep the template system integrated and only show certain menus according to there users prv?

View Replies !
Fast Template
In the header template I have a series of nav buttons with rollovers (.gifs). I'd like to indicate which page the user is on by displaying the buttons up state on the appropiate page(s). i.e. the about us button is highlighted when on the about us page.

View Replies !
Creating Template And GUI?
I've been using Dreamweaver to create my php pages and love the
functionality but when I start modifying code I start wondering if I
should be something else because it always throws off the extensions.
I like the fact that dreamweaver will insert some of the tedious code
for me but are there any php GUI's that are similar to dreamweaver?
I've downloaded a few paid scripts and see the use of *.tpl files and
wonder how they design that and make it functional without using a
WYSIWYG application. From what I've found there wasn't anything like
dreamweaver for php development but it seems like I should be moving
towards creating those tpl file instead of including pieces of files.
Is there anything that will allow you to create recordset and have any
like behaviors in dreamweaver. Does anyone have any tutorial or
examples for using/creating tpl templates?

View Replies !
How To Create A Template?
I want to create a template for my website, but I don't want to include, header, left nav, bottom, right nav, etc etc on every single new page I make, is their a way to include all them on 1 page, and just call it template.php but make it so that I can display all the other pages content in the center of the page, without using frames. A template similar to PHP-Nuke, has left nav, header, right nav, bottom, and the content in the center, how can I go about doing this?

View Replies !
Template System
I've beent rying to make a template system similar to phpbb but less complicated. Could someone please help me or post a simple code for it?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved