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.





Adding Php Code Or To Include A Page With Php Code Into A .tpl Page


how would i do this, i am intergrating a phpbb forum system into my site!




View Complete Forum Thread with Replies

Related Forum Messages:
Adding Next And Prev Page To Code That Is Already In Place
I have code that I already had in place but my end user would like to have next page for the MYSQL display. I have read the doc that is posted on this site. 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 !
Refresh Page Code?
What code do you use to refresh a page after X number of seconds?

View Replies !
How To Get HTML Code Of Another Page
Can someone direct me to a code that will go to another page and retrieve the html source for parsing within a php script?

View Replies !
Code The Page That Will Actually Do The Deletion
how to code the page that will actually do the deletion, but im having problems figuring out how to get the information there. I know this is probably a simple solution, but Im stumped. How get my form to be able to be sent to 2 different pages depending on what button is pressed? Or can i use two forms on the page and just use _GET or something in the second one to pull the ID?

View Replies !
Display Code On Page
I have some information (php code) stored in a database and I am trying to grab it out and display it to my visitors. The problem is that the when I try to display:

<? include 'file.php' ?>

My page actually goes ahead and includes that. I looked at the source code of other posts here on phpfreaks and it looks like the "code" command replaces > and < with &gt; and &lt; How can I do the same?

View Replies !
Sending Code To Another Page.
I've done a form, with name etc, when they push submit then they come to a page where it stands their name etc. now i wan't that info to be sended to a diffrent page so i can look at it later, just like in a questbook. whats the code for it? Only the send code now i don't need how to write the info code=).

View Replies !
Code Just Prints Out To The Page
This might sound like an easy question but im stuck, in the website im building i want to store php code snippets in a table on the database and call them when i need them.

When i try and put the code onto the site though the code just prints out to the page, can someone tell me what im doing wrong, is there a function i need to use to make it act as php code or am i just barking up the wrong tree.

View Replies !
Code To Read A Web Page
How can I read another web page in php. I tried:

$url = 'http://www.yahoo.com'
$contents = file_get_contents($url);
echo $contents;

but I get an error: The specified CGI application misbehaved by not returning a complete set of HTTP headers.

View Replies !
HTML Editing Of .php Code Page ?
I run a few web pages that contains php code that was written for me
by someone else. By reading his original code I have leaned a little
and have made the occasional change. I would like now to add some
basic html to the page and prefer to use HTML editing software to
accomplish the task. I have run it to problems however. If I use
Mozilla HTMl editor in WYSWYG mode , any changes I make do not work.
After I upload to my server, all I see is a web page with mostly the
raw php code. I tried Page Breeze HTML editor and it will not load
.php files in to its WYSWYG editor.

So, any changes I make have to be done in raw source code mode, a
rather laborious task for this inexperienced HTML person. Is there
anything that would made the task of adding HTML to a php page ,
easier ? I'm not attempting to add anything in to the main body of
php code, just mainly looking to add some html tables with images
preceding the start of php scripts, or after php scripts.

View Replies !
Shortest Code To Open A Web Page From PHP
I have Windows Vista and PHP with Curl.I would save a web page on my harddisk with a PHP command-line command. What's the more minimalist way to do it?

View Replies !
Switch Code For Search Page
I had made a very simple search page about a year ago and now I'm trying to add a couple of things and the first step was to add the ability to search by user. I thought I would use a switch command to select the query and then fill my table based off of the selection. Code:

View Replies !
Code Makes A Blank Page?
I upgrade from PHP4 to PHP5.4.2 and now this code doesn't work.  I moved the header command up to the top (you can see where I commented it out lower in the code) and now all that show is the header.  If I have the header in the original position the page is blank. Code:

View Replies !
Redirect Code Gives Blank Page
I have a simple piece of code designed to register a bookmark in an arrray during a customer site visit. The page should update the arrray and redirect but I get only a blank page. I dont get error messages and this basic code works in a similar application. Code:

View Replies !
Parsing PHP Code In An HTML Page!
I am trying to run PHP code from an HTML file. In my HTML file I have the following code:

<?php include("<counter/counter.php");?>

Now I have read several threads here on Webmaster World, and I have concluded that I need to create a ".htaccess" file, and place the following code in it:

AddType application/x-httpd-php .php .htm .html

But, once I have done this, every time I visit a page on my site, I get the Open/Save this file dialog. It seems like the server is telling my browser, to open all HTML files with the external application called "application/x-httpd-php". Code:

View Replies !
View The Source Code From A Php Page
Is there a way to view the source code from a php page and see the php? If there is, isn't that really bad? Aren't there a lot of websites out there that could be really messed up if someone could see the php part of the page?

View Replies !
Code To Check If Page Was Refreshed
i need to check if page has been refreshed and if it has i don`t want the code below to be executed.

$sql = "UPDATE " . USERS_TABLE . "
SET user_travel = user_travel + 1
WHERE user_id = '" . $userdata['user_id'] . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update travel', '', __LINE__, __FILE__, $sql);
}

View Replies !
Code/page To Be Password Protected
I need the following code/page to be password protected and wondered how I should go about doing it?

$entryID = $_GET['id'];

    $query = "DELETE FROM `bkah` WHERE `id` = '$entryID' LIMIT 1";

    mysql_query($query);

    //redirect to showcart page

    header("Location: index.php");

    exit;

View Replies !
Dynamic Page HTML Code Question
I'm gonna have all my pages load up a dynamic header and footer, depending on what variable I call up.

So at the beginning of my code it will call for a banner, this banner will be set as a variable in a seperate page that i'll call up.

Now i'm wondering, can the page I call up (with a list of variables) have HTML code in it, like this:

View Replies !
Displaying Html Code On PHP Generated Page
I am trying to create a link page in my php application. this is a page that will display a block of html code that a visitor can copy and paste into their web site to create a link back to mine. My PHP page has a line in it like this:

define('TEXT_INFORMATION', '<html page code is here>');

I have added the html code to create the page as noted above. the page contains a same of the banner image file and the html code that goes alon with it. My problem is that I haven't been able to "quote" the html code so that ir will not be executed.

every time I try to run the application from my web server my page will display two copies of the banner iimage not on banner image and text block like it should. Any suggestions?

View Replies !
PHP Code To Access Password Protected Page
I have written the following HTML/PHP code to validate and provide
access to a password protected page to users who are given the user ID
and password through a separate e-mail. The required page,
Articles.html, however does not load when the valid user ID and
password is provided. Instead, the response is a blank page.

validate.php
<html>
<head>
<title>Login Authentication</title>
</head>
<body>
<?php

if (($_POST["username"]=='cutedog')AND($_POST["password"]=='puppy'))
{
header("Location: http://www.domain.com/Articles.html");
exit();

}
else
{

echo "Login denied to the page - Articles.html";

}
?>
</body>
</html>

Does any other file need to be included for HEADER function to work? I
currently do not have CGI or SSI active on my hosting account. I am
using the following HTML form for the user to submit the user ID and
password to access the password protected page.

<html>
<head>
<title>code</title>
<script LANGUAGE="javaScript">
<!--
function validateForm()
{
with (document.saveform)
{
var saveit = true;
if (username.value.length < 4)
{
alert ("Username too short. The username must be at least 4
characters in length.");
username.focus();
username.select();
saveit = false;
}
if ((password.value.length < 4) && saveit)
{
alert ("Password too short. The password must be at least 4
characters in length.");
password.focus();
password.select();
saveit = false;
}
else if (saveit) submit();
}
}
//-->
</script>
</head>
<body>

<form
ACTION="http://www.domain.com/validate.php"
name="saveform" METHOD="POST" align="center">

<div align="center"><center>
<table border="0" width="93%" cellspacing="0" cellpadding="0">
<tr>
<td width="52%"><div align="center"><center><table
border="0" height="59"
width="310" bgcolor="#808080" cellspacing="1"
cellpadding="0">
<tr>
<td width="248" height="19" bgcolor="#C0C0C0"><div
align="right"><p><font color="#000000"><small>Add
Your test username:</small></font></td>

<td width="123" height="19" bgcolor="#C0C0C0"><div
align="left"><p><input NAME="username"
VALUE SIZE="8" MAXLENGTH="16" tabindex="1"></td>
<td width="47" height="19" align="center" bgcolor="#C0C0C0"><div
align="center"><center><p><a
href="javascript:alert('The username must be between 4 and 16
characters long.')"><small><small>Help</small></small></a></td>
</tr>
<tr align="center">
<td width="248" height="17" bgcolor="#C0C0C0"><div
align="right"><p><font color="#000000"><small>Add
Your test password:</small></font></td>
<td height="17" width="123" bgcolor="#C0C0C0"><div
align="left"><p><input type="password"
name="password" size="8" tabindex="2" maxlength="8"></td>
<td width="47" height="17" align="center" bgcolor="#C0C0C0"><a
href="javascript:alert('The password must be between 4 and 8
characters long.')"><small><small>Help</small></small></a></td>
</tr>
<tr align="center">
<td width="248" height="1" bgcolor="#C0C0C0"></td>
<td width="123" height="1" bgcolor="#C0C0C0"><div
align="left"><p><input TYPE="button"
NAME="FormsButton2" VALUE="submit" ONCLICK="validateForm()"
tabindex="3"></td>
<td width="47" height="1" align="center" bgcolor="#C0C0C0"><a
href="javascript:alert('Click to save the
details')"><small><small>Help</small></small></a></td>
</tr>
</table>
</center></div></td>

</tr>
</table>
</center></div>
</form>

</body>
</html>

View Replies !
How Do U Code A Printable Output Of A Part Of Your Page?
im trying to develop a website and im wondring how to make a connection with a printer and make a printable version of the page

View Replies !
Format Source Code For Displaying On A Web Page
Is there a good function or plugin out there to format my source code examples?  I'm writing an article for a web page and want a very simple source code formatter.  Eg: code in black, comments in red, quoted items blue, key words green, class names bolded.

View Replies !
Shows Code Doens't Display Page
When I try and view a page I installed with full permissions to my wwwroot directory it shows the code of the page it doesn't display the website..  I'm using IIS 5.1 with the newest PHP and MYSQL.. any ideas??

View Replies !
Print Code With Line Number On Web Page
I read HTML code from a url and I need to replace 'Beginning of Line' and 'End of Line' with line number.  However, I do not know how this can be done. Any help would be really appreciated.

$enews = file_get_contents("http://my.sony.co.th/newsletter/issue/issue-MySony061aug22/index_en.html");
$enews = htmlspecialchars($enews);
print "<pre>$enews</pre>"

View Replies !
Preg_Match Source Code On Current Page
The problem is that if I set the variable $page_check to a file on our server to test it, every thing works as it should.

But then when I place the script in a template file where the $page_check variable is set to $phpself - when loading a page with the script on I get firefox giving me a download box to download the current page file.

So I figure I cant request a page to fopen a url which is the same url the script is on?

So my question is how do I set up this script so it looks at its own source code, does a preg_match to find out what section its in? Code:

View Replies !
Is There Any Code In PHP That Shows A Page For A Specific Time?
Is there any code in PHP that shows a page for a specific time i.e 10 seconds and automaticlly redirect the page to the other URL ?

View Replies !
Code That Will Load All Scripts Before Page Loads
Does anyone have any leads to PHP code that will load all scripts and everything on a page into a buffer before it displays the page? I guess this would be similar to ASP's Response.Buffer=true I've seen the ob functions, but can't get my code to work.

View Replies !
Code Shows Image In Binary In One Page But Not In Other?
this chunck is part of a 'parent' page and is the page that displays the images' in binary format: Code:

View Replies !
Long Code, Blank Page Response
I've written some code here that doesn't seem to work... It's supposed to send an email near the end, it doesn't send it and it just gives my a blank page, as a response. Code:

View Replies !
Posted Cart Code To New Page Is Not In <body>
When a user clicks on the checkout button they are taken to a final page to choose either to pay by a paypal link or to contact us for other arrangements.

On that final page the code is at the very top of the page and not in the body section resulting in it "breaking" the page design. Is there a way to send this code so that it displays in the <body>? Code:

View Replies !
Php Code Embedded Inside Html Page Not Working.
How do I make or workaround in my Apache server to parse *.html files
for
<?php ?> code embedded in it?

Currently php recognises <?php ?> tag only if the file has a *.php
extension. Any php code inside *.html or *.htm is ignored.

Since I dont have admin access to the server or admin person, changing
the php configuration is out of choice. Now I have to go thru echo
and print statemnets to get it work. But it looks very cumbersome and
prone to errors.

View Replies !
Need Code To Find Last Page, And Passing All Form Variables
I need to be able to make some sort of php function to pull up the last page viewed so I can pass form varaibles to it etc, so the javascript function go.history(-1) wont work for this situation. After diving thru the php function dictionary for hours on end I'm at a loss for where to look, or what to look for.

Also I was wondering if anyone knew an easy way to pass all form variables on to the next page rather than forwarding each manualy. This isn't all that important, but would make the code more efficiant.

View Replies !
When A Search Engine Spiders A Page Does It Read The Raw Code Or The Parsed Html?
When a search engine spiders a page does it read the raw code or the parsed html? I ask as I want to confirm if any text retrieved from a database is 'read' not the php code that gets the data.

View Replies !
Adding PHP Code
How do I correctly add the php code below to the variable $output?

PHP Code:

$output = '<div id="header"> '.
          <?php
            include('../header.htm');
          ?>
                 '</div> <!-- end Header -->'

View Replies !
Adding Onchange Code
I would like to add this code in the script bellow "ONCHANGE="search.value=this.options[this.selectedIndex].text" Code:

View Replies !
Adding A Variable To Url Code
I want my webpage to display a list of links to a website on another server. Code:

View Replies !
Adding Code To MediaWiki
I'd like to add some coding to my MediaWiki. I'm having trouble doing it. I'd like to insert beneath the "Disclaimers" link on the bottom. Can anyone tell me in wich file is the footer located?

View Replies !
Adding 2 Results Into A Code
I have some code that pulls a listing based on an assigned number- for instance, we have listings that are stored under 1, 2, 3 Currently the script pulls listing for one of those assigned numbers. What I need it to do is pull for two or three of them. IE, instead of just displaying results for 1, I would like for it to add results 1,2,3 Here's the snippet of code that involves pulling this info:

$search_str == "";
$result = $obj_property->GetPropertyDetails("3",$obj_property->getMemberID("3"),$searchtype,$search_text,"",$arr_propery_status,$minprice,$maxprice,"Client");
$str = "yes";
}

View Replies !
Code To Check Which Check Boxes Are Checked On The Previous Page And Add Their Names To An Array.
I have a page that has a bunch of check boxes with different names. Once the user presses the submit button another page opens. In that page i am trying to write code to check which check boxes are checked on the previous page and add their names to an array.
How can i check the checkboxes from another page? I have to do it on another page as i am waiting for the submit action to know what boxes have been checked..

View Replies !
Adding HTML Code To MySQL
I am trying to create news Management. I already have the form that would insert a new News record into the DB, but I need to be able to insert HTML code in the DB so that we can use font formatting. I am having trouble getting this to work.

I have tried the following & get errors. They are just listed here, but I have tried them individually get errors. Here is an example of the error You have an error in your SQL syntax near 's name', 'MGE customers, We have finally finished setting up with Money Gram to' at line 2


$news_entry = $_POST['news_entry'];
$news_entry = addslashes($_POST['news_entry']);
$news_entry = htmlspecialchars($_POST['news_entry']);
$news_entry = addslashes(trim ($_POST['news_entry']));
$news_entry = addslashes(htmlspecialchars($_POST['news_entry']));


I also tried this guy's tutorial & can't get anywheres....http://us3.php.net/manual/en/function.htmlspecialchars.php#56400.

I need to be able to make a new News update, but I want to just format the text using HTML & then insert the formatted HTML code into MySQL DB.

View Replies !
Adding A Personal Code Library?
I have developed some functions for my site that I find myself reusing quite a bit. Up to now, I have copied and pasted these functions into each page. But surely there is some way to create a personal code library.

I've even seen reference by others on the boards who have mentioned their personal library. How do I create one? Is it just a php file? like my_lib.php?

Can I simply include this file in my code... include('my_lib.php');

How do I think call functions from it?

View Replies !
Adding Code To Existing Software
When a customer places an ad I want to charge them $5.00 for the first 10 words. Each additional word would be .20 cents. This would be in addition to any other charges that might apply, ie. images, attention getters, etc.

This would only be a billing plan, on the admin side of the program and billing plans are customizable through a drop down.

Thanks to a coder that unfortunately was going on vacation I have this additional information: Code:

View Replies !
Adding An Affiliate Tracking Code To Phpbb Forum.
I am currently running phpBB 2.0.22 with current updates. I am trying to integrate an affiliate tracking code to track new registrations. The current code is:

<!--START SoAndSo.Com CODE-->

<script language="JavaScript" type="text/javascript"  
 src="https://www.soandso.com/affiliate/trackingcode_sale.php?mid=12&sec_id=M_129eJ5kN3vD8uF&sale=<?=$USERNAME?>&orderId=<?=$EMAIL?>">
</script>

<!-- END SoAndSo.Com CODE -->

I do not know if i am using the correct varaibles "EMAIL" & "USERNAME" and i do not know what page to place the code in so that it can grab these variables.

View Replies !
Adding Advanced Flash Code & JavaScript To A Variable
I have a PHP variable named flash, and within it I have the <object> element which creates the flash output. So whenever i call the variable i get the flash.

Now the problem is that I am getting the "click to activate and use this control" box which I want to get rid of. So to do this I want to add the AC_RunActiveContent.js script to this variable. Is this possible? If so how do I write the code? This is the code I have already: Code:

View Replies !
Function With Include A Code
I was just wondering why it didnt work when I put the code below in a function. Does anyone know how to include that code with one command??? PHP Code:

View Replies !
Do Include Without Execute Code
Anyboby knows how I can do a include of a php page without execute the php code that the page have inside.

The target is hide the url of the page that I am including and don't permit execute malicius code in this page.

View Replies !
Include Repetitive Code
On a large site I work on, I use constants for labels that are used repeatedly, for example:

define('VAR1','Shipping and Ordering Information');

when you have short sections of HTML code (say like 7-15 lines) that are used repeatedly, for example:

<tr>
<th>Description</th>
<th align="center">Part Number</th>
<th>Quantity 1-9</th>
<th align="center">Qty 10 or more</th>
<th align="center">Shopping Cart</th>
</tr>

is it better store to it as a constant in one file with many constants OR in it's own separate include file? I would be including either method using PHP include. I guess what I am really saying is, what is the limit for what you want to hold in a constant?

View Replies !
Include Javascript Code
I have a script that uses PHP to automatically redirect a user to an outbound URL. I'm trying to incorporate Google Analytics into the script so that I'm tracking outbound links. It says to add a JavaScript attribute like this:

<a href="http://www.example.com" onClick="javascript:urchinTracker ('/outgoing/example_com');">

But the redirect doesn't use the <a href> tag, it looks like this: PHP Code:

if(headers_sent()) {
$outbound_url = "http://".$row['URL'];
echo "<script type='text/javascript'>location.href='$outbound_url'</script>";
} else {
header ("Location: " . $outbound_url);
}

how I can "merge" the two?

View Replies !
Adding Arrays - Snippet Of Code To Deal With The Insert-part
I'm doing a one-time operation of importing something from a textfile. My bet was foreach() but I'm unsure of the code itself, so I'd appreciate a snippet of code to deal with the insert-part Here's the code of the field which produces about 400 rows. PHP Code:

View Replies !
Include Code Directly From A Database
I searched through the forums and didn’t see a discussion of my question so here it goes.

Is it possible to use a php include() to insert code directly from a database? For example, if I have a file something.inc which contains the following:

<?php
…. Some php statements
?>

and have in my index.php file the statement Code:

View Replies !
Code Inside Include File
I'm new to php and i have an include file with some php inside that kills the rest of the page content for some reason. I have this code in my webpage:

<?php
session_start();
session_name('polv_id');
$page_title = 'User Login'
include('./header.php');
include('./pageheader.php'); <--- This is the problem
include('./pagecontbody.php');
include('./pageleftcol.php');
include('./pagerightcol.php');
?>

View Replies !

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