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.





Html Page Link Prints Path 3 Times In Header


I have a website with html pages and a php page (a form). I just put in links on the html pages to the php page. When I click them I go to the php page and as bonus the path of the html page is printed at the top three times. (The text in the php page changes depending on which page I have hit the link from.) For example:

Quote: http://mysite.com/sitefolder/previouspage.htmlhttp://mysite.com/sitefolder/previouspage.htmlhttp://mysite.com/sitefolder/previouspage.htmlhttp

If I highlight and then delete this text in Navigator or Explore both browsers return me to the page written out three times at the top of the page. Here is the code that is giving me this result. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Page Redirection - Link Index.html Page To A .php Pag
I have an index.html page with a link to a .php page This is the complete code of the .php page 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 !
Make It Link To Another Html Page
How to retrive feild from table and make it clickable and link to another html page.

View Replies !
<link:page.html,xxx> => <a Href="page.html?id=xxx">
I want to transform this code <link:page.html,xxx> to

<a href="page.html?id=xxx"> dynamically.

I tried out alot of preg_replace stuff, but I didn't get to manage it.

View Replies !
How To Strip Header Section From An HTML Page?
I have an html page returned from a curl session in a variable. I want to
strip off the header portion of the file and replace with a new header.

It seemed to me that this is probably a well-known thing to want to do, but
before I try to write the code myself, anyone have any code examples of how
to do this?

View Replies !
Cannot Modify Header - Html Page With A Form
my code was working fine yesterday. I have a html page with a form and a php page that plugs the posted fields into a .rtf file.

All of a sudden i get this error:

Warning: Cannot modify header information - headers already sent by (output started at.

View Replies !
CURL Login/page Prints/ No Fields Posted
I am trying to log into my yahoo mail account using cURL. When i run the following code in my browser i get no errors, the page is displayed by my last $print result comand, but my post command does not fill in my username and password into the text fields. Code:

View Replies !
Regalar Expression To Extract An Html Link From A Page
I have a regalar expression to extract an html link from a page:

href=(["']?)([^>1]*.html)1(?: [^>]*)?>

It looks after the "href" for an optional quote and then looks for something
that is not the quote or the endarrow.

The problematic part is [^>1]*. It should exclude anything with the quote,
but somehow that doesn't work. Maybe 1 is not allowed inside brackets?
I would like some advice on how to handle this.

View Replies !
How To Get My Upload File To Automaticaly Post A Link To A Html Web Page
Can some one direct me to a good tutorial that can teach me how to get my upload file to automaticaly post a link to a html web page on a web site.

View Replies !
A Web Development QUICK LINK PAGE (QLP) - HTML, Perl, PHP, JavaScript, AJAX, CGI, Etc.
I've recently organized and even color-coded many of my favorite
bookmarks on WEB DEVELOPMENT (and a few other favorite subjects too)
into what I call QUICK LINK PAGES. These are very condensed, compact
(no graphics), fast-loading pages with a 100+ links to some of my
favorite web sites on a particular subject. I hope you'll give them a
try...

Here's the link...

The easy-to-remember link above gets you to one of the Quick Link Pages
(QLP). The current categories (DIVERSIONS, INVESTING, JAZZ, MACINTOSH,
OPERA, PHYSICS (with ASTRONOMY and MATHEMATICS), SPORTS, WEB
DEVELOPMENT, and WINDOWS) are color-coded on the top of every page.
Just click your favorite category. I hope you'll find a lot to enjoy.
If you find any errors, or have suggestions for additional links or
categories,

View Replies !
How Do I Exit An Html Frameset As I Have A Link Which Has To Redirect Back To The Index Page?
I was just wondering in how do I exit an html frameset as I have a link which has to redirect back to the index page as shown below, which should not have the frames. header("location:index.php");

View Replies !
Link 2 Tables, But JOIN 2 Times.
I have 2 tables

Table:tag_tag_link
tag_id1|tag_id2

Table:tag
tag_id|tag_name

Now, I want to join these 2 tables, but with 2 join statement because each tag_id in tag_tag_link refer to the tag_id in tag... what can I do, like this?

SELECT *
FROM tag_tag_link
LEFT JOIN tag ON tag1_id = tag_id
LEFT JOIN tag ON tag2_id = tag_id

surely that doe not seems right... any ideas?

View Replies !
Long Load Times With Link Validation
I am creating a webpage that has a bunch of my friends webcams and displays whether they active or not. The webcam software we use basically runs a webserver on our computers and can be accessed by going to http://<ip>:<port>.

At first, I simply used the fopen function to determine if the page was active, however when I found that it took so long to work (It works, but takes about 1min-1.5mins to load) I downloaded a more complicated script from the internet that I don't quite understand at this point in my PHP career. Same result, works but takes forever. PHP Code:

View Replies !
Click Counter :: How Many Times Link Clicked
Anyone know about a script/code that count how many times a link have been clicked..
I have tried hotscripts.com, phpbank.net and so on.. Only found scripts that costs money or uses a MySQL database.

I need one with no needs for MySQL. It should look like something like this: [ Download ] Been downloaded (NUMBER) times.Anyone know about a simple script to do that?

View Replies !
How To Count The Number Of Times A Link Is Visited
how i can get the total number of times a particular link has been visited.for example:this is the link. www.abcd.com/upload.php?id=761786717.jpg. i want to display how many times this link has been visited.

View Replies !
Link Path
$ur = $_SERVER['HTTP_HOST'];
$dir = dirname($_SERVER['PHP_SELF']) . "/";
$url = "$ur . $dir";
header("Location: http://$url?url=$url");

I need to get the info for the link path clicked on my page and send it back to a data base without having to hard code the urls as variables.

View Replies !
Using Preg_match_all To Locate HTML Anchor Link BUT Only If The Link Is A .pdf File
The subject line describes what I'm trying to do, (and after thinking about it for a day or so and trying different things; searching around for similar questions on the board,) but I still haven't found a proper regular expression.

I am trying to use preg_match_all to locate HTML Anchor link BUT only if the link is a .pdf file within text from a database table. It actually was working just fine until I recently made a change regarding new lines () and (<br />) in the text that is to be searched. But after making changes regarding the new lines and things, my previous regexp doesn't work correctly. Here is the regexp I am trying to use:

preg_match_all('/<a href="(.*)">(.*)</a>/U', $entry->Record['e_entry'], $res_output, PREG_PATTERN_ORDER);

That regexp does find each occurance of an <a href="">something here</a> link... but I need it to only find occurances of an anchor link if it is a PDF file link (ex: <a href="../something.pdf">something</a>). So I tried changing the regexp to something like this:

preg_match_all('/<a href="(.*).pdf">(.*)</a>/U', $entry->Record['e_entry'], $res_output, PREG_PATTERN_ORDER);

But in the preg_match_all results array ($res_output) a regular <a href="">something here</a> link is ALSO found as well as the .pdf links... I am trying to only find links that contain .pdf at the end of the file name. Sorry that this is written kind of strangely, if you need more info let me know. Does anyone know what I need to change in the regexp to ONLY find HTML anchor links that contain .pdf at the end of the HREF?

View Replies !
How Can I Get My Current Full Path? (and Use It In The Header)
I have a few 'secure' area where the user needs to log-in b4 they can make
view it.

I know how to redirect them to the login page but how can I return them to
the page they were?

if I get the path ...and save it, (in a cookie or in MySQL ). Code:

View Replies !
Download File - Display The Path As A Link
The following code, uploads an MP3 file to a folder located in the root directory of the server, whilst adding the files path to a database.

For each record in the database, how do I display the path as a link and upon a link being clicked, download the file? Code:

View Replies !
Simple Add Link To File Path Script?
I am trying to build a simple PHP script that will append links to video files on a simple PHP page. The page already has video links posted, but the admin (idealy) will have to open a page that has a "name of video" field, "description of video field" then a path of file field. This would the add a link to the path file in addition to the rest of the file links...the simpler, the better. Code:

View Replies !
Php Mail() Change Header Return-path
I'm using php mail() to send emails back from a contact form, but the emails are being stopped by the mail server's anti-spam settings, it seems, most likely because its own domain is included in the email header's Return-path:

From - Mon Mar 27 00:59:54 2006
X-Account-Key: account2
X-UIDL: UID2902-1234266529
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-path: <admin @ domain.com>
etc

I know I can add additional headers, but I'm looking at the main header in the email source. Is this a server setting that the hosting provider needs to change, or can the php mail script be made to change this to something like:
Return-path: <nobody@servername.com>?

View Replies !
Posting Many Times To Page
I have a situation where I need to post alot of data to a legacy system we have and it takes a long time for the system to do the inserts.

I was wondering if there is a way to post without waiting for the response, so I could do say 15 posts one right after another and it would open 15 connections but not wait for them or put them in the background. Preferably without forking if its possible.

View Replies !
Warning: Cannot Modify Header Information - Headers Already Sent By (file Path)
Warning: Cannot modify header information - headers already sent by (output started at /path/index.php:9) in /path/header.php on line 9. Can somebody explain to my why this error occurs?

View Replies !
Looking For - Page Generation Times Script
I am looking for a good script can calculate the time taken to generate a page, including mysql queries.

View Replies !
Count The Number Of Times A Page Is Viewed?
can PHP count the number of times a page is viewed? Doesnt have to be unique views.
Wish to insert this in a db.

View Replies !
Difference Between Link And Header Redirect
What's the difference, if any between a hard link and header('Location: ...')

Clicking on link versus being re-directed to the destination via header() -- are there any difference from perspective of the destination site?

I am interested to know this to implement Affiliate logging. i.e. affiliate links implemented using re-direct? Will the affiliate cookies be set if I use the header() redirect?

View Replies !
$PHP_SELF - Create A Link Which Refreshes The Current Page, And Based On Certain Items On The Page
On a page, I want to create a link which refreshes the current page, and based on certain items on the page (simple form objects like radio buttons)the page will load differently. My link looks like this: PHP Code:

View Replies !
Warning: Cannot Modify Header Information - Redirect From Login Page To Logged In Page
I am trying to redirect from login page to logged in page, but using the {header( 'Location: C:wampwww' ) ;} is giving me this error {
Warning: Cannot modify header information - headers already sent by (output started at C:wampwwwpassword.php:14) in C:wampwwwpassword.php on line 35}, find below my code:

View Replies !
How Can I Reliably Get An Html Path With .htaccess 'RewriteBase'
Hi,

if I have a site

htt://www.example.tdl/folder1/folder2/page.html

I want to get the folders from the root, so the folder would be
$f = './folder1/folder2/'
and the page
$p = 'page.html'

I have 2 problems:
First if the user does not enter a page
htt://www.example.tdl/folder1/folder2/
How can I reliably get the folders and page?
$f = './folder1/folder2/'
$p = ''

And secondly if I use RewriteBase in my .htacess, (I do that a lot).
RewriteBase /folder1/

the user would enters still enter
htt://www.example.tdl/folder1/folder2/
but the 'root' folder would now be '/folder1/'

How can I then get the right path.
$f = './folder2/'
$p = ''

Because if I use $_SERVER['REQUEST_URI'] then it will return
$f = '/folder1/folder2/page.html'

View Replies !
Getting The File Path From A Html Form Input
I want to get the file path from a file input field, not just the filename. I don't have to necesarily use the input of type 'file', but that is the only way i know how to have a browse button.I tried using javascript to fetch the content of the file with this function:

function GetDirectory(){
   strFile = document.FileForm.filename.value;
   intPos = strFile.lastIndexOf("");
   strDirectory = strFile.substring(0, intPos);
   alert(strDirectory);}

but i don't know how to pass the javascript variable to the php.

View Replies !
Send Header Info To A Page, Retrieve Response And Send That As Header
I am sending a header to page.html from sender.php using fgets(). I am then trying to retrieve that page's response, and set that as a header in sender.php in order to set any cookies etc.... that page.html might want to set. Right now I am using the following code:

View Replies !
How Can I Log When Someone Prints?
I have an application which I've written primarily in PHP. There are a few snippets of JS here and there, but the guts of it is PHP.

What I would like/need to do is to log whenever someone prints off a report in my application. I am aware that IE has a JS onbeforeprint() and an onafterprint() function but I believe FF is lacking in support for this.

I know I could put my own print button on the app but I'm concerned that someone could just press <CTRL> P and bypass my code.

So, can anyone suggest a way I can put an entry in my log table whenever someone prints from the application? (Print screen isn't an issue)

View Replies !
Setup A Link In My Page That Will Change My Page
I am working on a page with a right column that I want to use for
navigation. In this right column I am using the below code to set a
value for the link. I am using the variable $test right now.

I want to click on the link and when the value is set to a certain
value, say 1, I want the script to run and load a page based on a
switch case. This way I can use different links for navigation that
will load different forms and areas of my application. So here is the
code for the link line. Code:

View Replies !
It Just Prints The First Register
Do you know why is it only printing the first register of the select?
My query is the following:

$grade = mysql_query("SELECT SUM(note) FROM examen , matiere WHERE (matiere.no_matiere LIKE examen.no_matiere && matiere.nom_matiere LIKE '$matiere') GROUP BY examen.joinaneedossier");
list($calif) = mysql_fetch_row($grade);
$Num_Rows = mysql_num_rows($grade);

for($a=1; $a <= $Num_Rows; $a++){
print($calif);
}

I don´t know how to print all the results. It only prints the first one all the times as Number of rows I have.

View Replies !
PHP Path Shows On Web Page When Script Is Executed
So this is an aesthetic question, the code all works, thank goodness.

The issue is that whenever I call/execute my php scripts, which all
require the path as the first line, i.e., #!/usr/pubsw/bin/php ... and
I want to know why that line shows up on the web browser?! (None of the
other code shows, except for whatever other html things that are
supposed to show).

My "workaround" at the moment is to have <body text="FFFFFF"> which
makes it white like the background, but there's gotta be a reason for
this, right? :-)

View Replies !
Array Only Prints First Row Of Data
I've used the following code to display some info about a users perscription history from a database. The code below works fine but only shows one row of data when there are 17 in the database for one particular user...(this applies to al users) Why may this be?? It only prints the first bit of data in the array! Code:

View Replies !
How To: Click Button, Something Prints?
Is there a way to do this with PHP?

I'd like a button that says "Print Form" which, when clicked, prints (or opens with print dialog) a PDF or Word document (i.e., I'm not trying to print the page that the script is on or another html page).

I'm familiar with print_r and all that jazz, but I can't seem to find anything like this.

View Replies !
HTML Link
The select options include each of the products which are coded by an ID number. To create a link in the outgoing mail by PHP page. I have a var coming from a Select Option $productid. It is written as

<OPTION VALUE="23532">

What I need to do is have this provide a complete link and name of the product. I would like to parse the databse of the store so that if the ID number is provided, on the resulting php page that sends the mail and displays the results on the screen, I want to read from the data base to complete the link that goes on to the screen and into the mail

Thus pulling
$product_name
$product_description
$product_thumbnail

and composing it into a preformatted HTML email message.

<P ALIGN="CENTER"><IMG SRC="$imagelink" width="100" height="120"><BR>
<A HREF="http://www.foobar.com/products.php?productid="$productid"> $product name</A> $product_description</P>

View Replies !
Url Html Link
Rather than make my own function Im just wondering if there is a predefined one or one you guys know of I want to have something that will turn a link someone has entered (www.website.com) and wrap it in html to make it a link so:

<a href="http://www.website.com" target="blank">www.website.com</a>

View Replies !
Links Stopped Working - Use PATH/index.php?p=PAGE In My URL
i have just moved my website from one server to another, on the first my pages worked perfect (not considering markup) but now my links just won't work anymore...

i use PATH/index.php?p=PAGE in my URL, it worked well on the other server, but after i switched it just stopped working...

and i have no clue where to find the error... it just keeps showing the first page...

View Replies !
Prints Automatically In Landscape Mode
I have a table of report generating from a mysql database. I have also given the print option to the users. But when i view the print preview, some sections of the table is going out of paper. I mean the few fields from the right side of the tables is going out of paper. Is there any script which takes care of this Or is there any script which prints automatically in landscape mode.

View Replies !
Create An Html Link
Is it possible to create an html link for in internal *.html file where $filename.html is posted from a form?

View Replies !
Html Link To Data
The site I am building needs several html links, from images, to variouse categories. There are two foreign keys in the table so there is no need for a join. I simply wish to search those fields and gather all the relevant numbers to display on the results page. The method is a link with the correct variable. The query:

<?php require_once('Connections/sports_connect.php'); ?>
<?php
mysql_select_db($database_sports_connect, $sports_connect);
$query_qLinks = "SELECT department_id, cat_id, advert FROM entry";
$qLinks = mysql_query($query_qLinks, $sports_connect) or die(mysql_error());
$row_qLinks = mysql_fetch_assoc($qLinks);
$totalRows_qLinks = mysql_num_rows($qLinks);
?>

I am trying to get a "detail" link modified to send to the results page to where the data will be recieved. search_result.php?department_send=<?php echo $row_qLinks['department_id']; ?>

View Replies !
Header Function Into Html
i am trying to put an header function into html, but it doesn't work. Am I put the function wrong or what? Below is my script.

<? header("Cache-Control: no-cache, must-revalidate");?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

View Replies !
How To Redirect To 404.html Using Header()
we need to redirect to a custom 404 page in PHP source code.

For example, a page URL is htt p://www.site.com/info.php?id=123

When the DB query for id=123 returns nothing, I will redirect user to a custom 404 page, by using the following method:

header("Location: /404.html");
However, according to Server Header Check, I just sent a 302 header and tell google that the content of www.site.com/info.php?id=123 is temporary moved to www.site.com/404.html (and please come back later). Code:

View Replies !
Can I Output Html And Still Use Header()?
I have a php script running on my localhost which on completion redirects to another script (itself actually - but with different parameters) using header(). It takes about 10 seconds for each script/page to load/run. Is there any way I can output some text without stopping header() from working?

View Replies !
Php Page Will Not Process Link To Different Page
I have just installed RH Linux ES 3.0 (basic) kernel 2.4.21-9.EL, i686,
Apache 2.0.X, and php 4.2.X. I have made no changes to the php.ini.

I am trying to use the following page (code listed here) to click on
link, and display 1 of three pages. The code does not seem to work, it
only shows the "else" condition of the php code, which is page:
"stuff.php". What do I need to do to my apache/php config to get this
to work? Of course I copied this code from a php site tutorial somewhere.

Page code below:
<?
if ($link == page2){
$page="files/page2.html";
}
elseif($link == page3){
$page="files/page3.html";
}
else{
$page="files/stuff.php";
}
?>
<html>
<head>
<title> index.php </title>
</head>
<body bgcolor="#999999">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="3"><h1>The Template (index.html)</h1></td>
</tr>
<tr>
<td align="center" valign="top"><a href="index.php?link=index">
Page 1 </a></td>
<td align="center" valign="top"><a href="index.php?link=page2">
Page 2 </a></td>
<td align="center" valign="top"><a href="index.php?link=page3">
Page 3 </a></td>
</tr>
</table>
<? include($page); ?>
</body>
</html>

View Replies !
Upload A File And Prints The Code Into The Directory Specified
I am using the code from php.net to upload files, and everything works ok but when I upload a file ir prints the code into the directory specified. So say I set my upload path to:

C:/phpdev/www/uploads

Then I go to uploads, it will just show me the code of the file I uploaded. How do you do it so when you go to uploads, it will show you all the various files uploaded to this directory, and you can then refer to them.

View Replies !
Carriage Return - Write A Line That Prints
I'm trying to write a line that prints

<PT:Semi-Annual>

When I put:

echo "
<PT:Semi&#45Annual>
";
or

echo "
<PT:Semi-Annual>
";

I seem to end up with:
<PT:Semi-
Annual>

View Replies !
From Html Form To A Sitengine Link
My problem is this. I want a code, that would allow the phrase that i type in my html/php form, to be automatically put into a link in a search engine. I know how to do this with frames using variables, but how could i do that with opening new pages? How I would like it to go:

View Replies !
Grabbing A Link Out Of A Line Of HTML
I currently have a huge function that will crawl a page of a site and grab all the links off the page. There seems to be a problem though by grabbing the link text. I was curious how I can improve my function.

So I was curious if anyone knows how I can make a function that will grab "info@test.com" out of this line:

Just some text. <a href="mailto:info@test.com">Contact Us.</a>.

The main problem I come up with is sometimes it will grab the "Contact Us" or it screws up when they have additional values in the <a href> tag.

View Replies !
Can I Inser Value From Mypage.html?src=[value] Into A Link?
Let's say I have an incoming link going to

www.mydomain.com/page.html?src=[value]

where the value is the id of an ad or whatever. Is it possible to insert this value in to an outbound link on www.mydomam.com/page.html, i.e. is it possible to create a link that will automatically pass on this value to a different page?

View Replies !

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