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.





Next Page Link


I have pages, 1.php, 2.php, 3.php and so on. I would like to make a next page and last page links at the bottom of each of them. Is there a way to get the pagename then take the .php off of it, and then add or subtract 1 and then echo that?

$nextpage = "(php_self - .php + 1)";
$lastpage = "(php_self - .php - 1)";

I know that is not even close, but use that idea.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
$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 !   View Related
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 !   View Related
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 !   View Related
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 !   View Related
Redirect A Link To Another Page After It Has Been First Used?
Is there any way to redirect a link to another page after it has been first used? Or even kill the link after its first use?

View Replies !   View Related
Check For Link In Web Page.
I am putting a form on my site that will allow someone to submit a link to me. If they have a return link back to me it will effect the way I display thier link. Closer to the top of the page.

What do I have to do in order to see if my link is up on the page they submit.

View Replies !   View Related
Redirect At Other Link Page
by php which the fast solution for make redirection at homepage ?
Time ago read some solutions, but one most fast because not load
or not make a reload of itself page, not remember
exactly but was a solution more fast...

View Replies !   View Related
Link Display On Same Page?
I want to list the titles of all my articles from my database onto my webpage at articles.php. Then when the users click on each title, the individual articles will load on the same page.

I'm new to PHP/MySQL, so here is what i've done so far. row[0] as my unique id numbers for each article, and i've included it so that i can somehow tell the page to load the article related to the unique id number. Is this all making sense? Code:

View Replies !   View Related
Dynamic Web Page Link
I want to create a simple dynamic page where when i click on a link to automatically create the page. What i mean.. I have some news that display by date, and because they will be updated every day i don't want to create a page for each one of these.

So when the user goes to the index page of the news(where the news are displayed by date) and clicks on one, I want the php do all the job and create a new web page where it will add the hole text of the "new" the user selected in a page template. How do i do that? Can i use the dreamweaver templates?

View Replies !   View Related
Link To Page 2 From A Table
Trying to learn and create my own classified script. on page one main page i was able to read the categories from mysql databse and display the the categories in a 3 col table (row1['category']).

what can i add in terms of code so when i click on a category that it takes me to page_2.php carring with it the category i selected (the page must open in the same page)?

i tried different version of $_service(php_self) but not getting anywhere. page_2.php will display a sub category which i will work on later.

View Replies !   View Related
Use Button For Link A New Page
how to use button for link a new page.....

View Replies !   View Related
Unique Page Link
I am trying to make a page have a unique link so people can send it to friends. What I am trying to do is something like:

Your Name:
Your Friends Name:
Submit

After that, the next page will display that information and output a unique link where that friend can send the link to other people with the information saved (a unique link [I have PHP Code:

View Replies !   View Related
Check Link Page Url
I am trying to find the pages url then see if it contains a certain string. Here is the code I used but doesn't work.

<?
$link = $_SERVER["PHP_SELF"];

$exp = explode("=", $link);
$linkname = $exp[0];
$linknumber = $exp[1];

if($linkname == "/viewpage.php?page_id")
{
echo $linkname;
echo $linknumber;
}
?>

What I'm trying to do is see if "$_SERVER["PHP_SELF"]" contains a certain page. If it contains "/viewpage.php?page_id" I want it to go into that if statement. The problem is it doesn't

Btw I need it to explode it because I need the page id number in the other variable for something later.

Also another problem is if the link doesn't contain the "=" sign to explode. Would that cause a problem?

View Replies !   View Related
Changing A More Link Into Page Numbers
I have the following code which I've tried to edit to fit some examples others have posted on here, with no luck. I have a page that displays More and Prev links but not the page numbers. How can I change this code to have page numbers instead of the More Prev? PHP Code:

View Replies !   View Related
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 !   View Related
User Last Clicked A Link On My Page
What I want is to display how long ago it was since the user last clicked a link on my page? How would i go about doing this?

View Replies !   View Related
Home Link From Navigation Page
I got a code which helps me to create navigational links and only show 4 results per page. Now I want to add a link on each page such that if anyone clicks on that link it takes it to HOME page. I have added

<a href="Home.htm"><b><font size="4">Home!!</font></b></a>

inside the loop that generates NEXT and PREVIOUS page link but whenever I click on HOME it does nothing at all.

View Replies !   View Related
Add A Link From The Front Page Of Forum
Is there a way I can add a link from the front page of my forum out to my php photo gallery.  I would like to make it so instead of clicking on the forum name on the first page which then takes you to a sub forum which then takes you to a thread with the link, To just click on the forum name which takes you to my photo gallery. 

Next best would be on the front page in the description of the new photo gallery be able to add a link.  Which file would I edit to change or add these links?  I know I can add a link in the overall_header.tpl but I do not see a way to change the forum name link that takes you from the first forum page to the next. 

View Replies !   View Related
Using A Link To Change Page Content
Basically I have a page to enter data into a mysql db via a form. After the data has been input, this form disappears and instead (on the same page) the data is shown in the same format, just not editable anymore.

What I need to do is have a link that will be able to switch between the two states, being 'edit' and 'view'.

View Replies !   View Related
MYSQL - Link To An Index Page
I'm working on a site which has several hundred articles stored in a MySQL database. On the bottom of the page are two links for the previous and next article. The site has been constructed in such a way that the database has fields containing the url of the previous and next pages (i.e. article.php?recordID=137) and these are pulled out of the DB in the form of links.

Rather than them having to add this to the DB every time a new article is added I'm trying to automagically do it in PHP. I've sorted the main part by taking the current article and either subtracting or adding it's ID by 1 to create the prev and next but I'm a bit stuck when it comes to the current (highest) article number. What I want it to do is link to an index page when there is no +1 (or -1 for the start).

View Replies !   View Related
Open Link In Included Page
How to include Link that could open in same page rather than going to another page


for example, if i include a file in home.php

 <? include("/index.php") ?> and I want to open up the LINKS in  "index.php"

in same home.php.

example   - open    "/index.php?p=Hits"  on same home.php page

I know i could have FRAMES but i dont want to frames in my site

View Replies !   View Related
Multiple Page Link Exchange
I am in need of a PHP Link Exchange script (preferably free) that is not for single pages.  The use of this script will be for having 4 pages on the website - the home page with paid links for $1, and then 3 other pages for free link exchange (Free Links Page 1, ...2... and so on)

If you know of a script out there then please post a link to it here. It would be a huge help to me and I greatly appreciate it. I saw one almost a year ago on the HotScripts Most Poplar page, but cannot remmeber it nor find it in HotScripts now.

View Replies !   View Related
How To Create Dynamic Page From Link
I'm practicing to understand and learn and have the following example. My page displays the state with the pet names under them, like this: Code:

View Replies !   View Related
Redirect Page Click A Link
I have page1.php. Click a link on it and it goes to redirect.php. This uses a redirect to page3.php.

If I click the Back button in my browser when on page3.php, will I go back to redirect.php and therefore be sent to page3.php again? Or will I go to page1.php?

View Replies !   View Related
Submit Wont Link To Next Page
I have written this as an answer to some other major issues I had with another form I was trying... The problem now is, If a required field left empty...it links to this page..."ALL GOOD" But when the 'Submit' button is clicked, the page goes white and doesn't show the page reqested... Code:

View Replies !   View Related
Current Page Pagination Link
When you use pagination, how do you disable the link for the current page you are on?Example:

<a >1</a> |
<a href="pagination.php?pg=2>2</a> |
<a href="pagination.php?pg=3>3</a>

I think you would use some type of php_self code to do this, but I am not sure.

View Replies !   View Related
Pagination - Not Showing A Link To The Next Page
I am having problems with my pagination code. The limit is 15 and there are 16 threads in the selected forum but it's not showing a link to the next page and it's displaying all 16 threads. Code:

View Replies !   View Related
Link To Form Results Page Dynamically
I have a dropdown box that pulls information from a database. What I want to achieve is that when a caller selects an option, the option determines that page that comes up.

I tried setting the form action to the name of the option, but this down not bring up anything; actually the resulting page is .php. I also tried moving the form action statement after ther selection, but that does not work either - the Submit button does not work. PHP Code:

View Replies !   View Related
Link To Local Files Through A Dynamic Page
I decided to flesh out my php skills by building a web application
which could scan through local files on my intranet (specifically
mapped drives on my server) and generate a list of Movies or pictures
or music, etc. Which worked fine, I created the code to do that and to
store the results in a mysql database. I can even print it out to a
..php page and sort it however I like.

What I can't seem to do is to create links to the data I've indexed in
a way that will let me open them from the generated php page. I've
searched and searched and there just doesn't seem a way to do this.
I'm pretty sure I've exhausted the obvious options.

The following trials did not work when the document was served from an
apache web server.

<?php
echo "<h1><a href=file:///c:/temp.txt> HEY </a></h1>";
echo "<h1><a href=file:///c: emp.txt> HEY </a></h1>";
?>
<a href=file:///c: emp.txt target="_top"> temp.txt </a>
<a href=file:///c:/temp.txt target="_top"> temp.txt </a>

When the same page was loaded directly from the file instead of served
through apache the bottom two links worked. This doesn't really help
me however. I need to be able to dynamicly generate pages that link to
the files.

I've read that browser security is the restricting factor in this but
changing all of my security settings in IE to low didn't seem to affect
it (not sure what the equivalent of security settings is in Firefox).
Does anyone know of a way to link to local files directly in a way that
lets you open them directly from the source instead of by downloading
them to a temp file or saving the file to somewhere locally? Is it
even possible in PHP?

View Replies !   View Related
Form Input Page To Sort With Link
I'm looking to create a page that a user can input data into a form and submit it to a mysql database.  From there I want another page to display the data sorted by a certain field of the data that was entered (i.e. Year) and then be able to click on the field that is sorted by (Year) and go to another page that displays all of the information that was originally entered.

View Replies !   View Related
Transfering Me To A Page When I Follow A Wrong Link..
in many sites, when i try to go to a page that doesn't exits, it transferes me to a page saying so instead of showing the annoying page cannot be found, how to do this?

View Replies !   View Related
Setup My Form To Link To A Page After It's Submitted
I want to setup my form to link to a page after it's submitted. Right now it simply prints out "Thanks for contacting us. Someone will get back to you shortly. Instead, I want it to go to a new page of my choice. How do I do this? I figure its just a command I am unfamiliar with. not entered an email, please go back and try again";}

else {
$send = mail($to, $subject, $body, $headers);
if($send)
{print "Thanks for contacting us. Someone will get back to you shortly.";}
else
{print "We encountered an error sending your mail."; }
}

View Replies !   View Related
Pagination Problem - Second Page Link Isn't Showing.
EDIT: Ok got my first problem taken care of, next problem is if you view the link below you will see that [1] displays, but there should be [1] [2] so I can't figure out why the second page link isn't showing.

EDIT2: I also need to change ?num=$page to ?page=$page, from below I"m afraid to touch anything as I don't wanna break it.

EDIT3: Once I had enough inserted for 1 full row on the second page it started showing the page numbers properly so now that is the fix.

PHP Code:

View Replies !   View Related
Using Bakspace Cannot Link Back To Previous Page
i use backspace to link back to my previous page.. but it fails me ...showing webpage has expired .. what should i do??

View Replies !   View Related
Call A Php Function By Clicking A Link On A Page
What i needed to do was call a php function by clicking a link on a page. Simple right?wrong. Everyone on here says to everyone that it can not be done... when if fact "it can". here is how i did it. Quote:

<a href="?Event=true>

^---html code

and in my php script i had an if statment with this. PHP Code:

if($_POST['Event']==true)Function();

which then went and excuted the Function Function within that script.

View Replies !   View Related
How Do I Point The Link Back To The Original Page?
I have a link that creates a pop-up window.

<p><a href="javascriptopUp('calendar.php')">Calendar</a></p>

On the pop-up window the user selects a link. How do I point the link back to the original page? i.e. the page that created the pop-up window.

View Replies !   View Related
Random Link Form Current Page
I have huge page of links, to whcih I am currently adding. I would
like to add a "random link" button which would parse the current page,
extract all URLs then load a random link.

View Replies !   View Related
Displaying Hidden Divs With Link From Another Page.
i have three files:

index.php
content.php
drdMain.php

content.php calls up drdMain.php via an include function. drdMain.php has a handfull of links:

link1
link2
link3

each link displays content in corresponding div tags that by default are hidden. Code:

View Replies !   View Related
Making A 'Go Back' Link From An Errorous Feedback Page
I am working on a 'contact' page on my website. All the code is in contact.php When $name, $email and $message are uninitialised, the page loads with all the input fields.

If they are initialised, the page checks for errors. If there are no errors, a "success" message is displayed. If there are errors, the errors are displayed. In addition to displaying the errors, I'd like to have a link which goes back to the input fields (i.e. contact.php without $name, $email and $message initialised).

Making a link to contact.php does not work, as the variables are still initialised, I think, and therefore all the error messages are just displayed again. Hitting 'Back' in the browser works well - how do I make a link 'go back' though? (I think I saw some javascript 'go back' commands a few times before...)

Hitting 'Back' in the browser unfortunately resets/clears all the fields, if something was typed in. I'd like it if the fields would not be reset/cleared. Could I please get some advice on how I can solve this problem please? If I need to use cookies, sessions or something like that, then just let me know how I can make a 'go back' link - I don't know how to use cookies / sessions atm, and right now I don't feel like learning to use them.

View Replies !   View Related
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 !   View Related
Encrypting Variable Values Passed Thru A Link In A Web Page
I am working on a project in PHP / Mysql on linux platform. The project has a login page where any registered user is supposed to login before he/she can have access to some major functionalities in the project.

Since I need to check the authenticity of the user in other secured pages, I have to carry forward the username with which he/she has logged. As I am doing so, the username is appearing in the url. This of course is a major security lapse.

View Replies !   View Related
Query - Link One Of The Products Thats Pulled From The Database To Another Page
i was wondering when using a simple piece of code such as

$sql = 'SELECT * FROM products ORDER BY id';

how i would link one of the products thats pulled from the database to another page

View Replies !   View Related
Highlight Certain Items On A Page Depending On Incoming Link
A PHP solution to the challenge was eventually developed by participants
that suited the original poster's needs brilliantly. My needs are somewhat
similar. I have a page of links (something like a big site map) several
times larger than the advert page at the center of the thread above (it
cannot be split into smaller pages). Code:

View Replies !   View Related
Dynamic Menu Link Color Changer On One Page.
I have one issue i need a little assist on. I am using the PHP active link color change-hack from a list apart. The code is an instance like this repeated once for every link to a subpage in the menu: Code:

View Replies !   View Related
Displaying A List Of Products And Link To A Product Page
I have site with products... I've been able to create a product template page that queries the product image, description, price etc...

But now I want to create an index page that a) queries the db for all the products in there and b) when they click the product link, it gets taken to the product page...

I'm just wondering how that linking relationship can be established?

For example, I know that the page name will be something like product.php?=id=223 or something like that but I don't know how to create that.

View Replies !   View Related
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 Replies !   View Related
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 !   View Related
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 !   View Related
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 !   View Related
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 !   View Related
<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 !   View Related
Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.
This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong?

<?
include("dbinfo.inc.php");

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$id="delete from todo where id='$id'";
mysql_query($id);

mysql_close();
?>

View Replies !   View Related

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