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




Create Multiple Pages


how I would alter this code, which displays a list of my site pages as a single sitemap page, to generate multiple sitemap pages (like 20 links per sitemap page or something) with next and previous buttons? Trying to avoid having a ton of links on one page.. Code:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Avioding Expired Pages, & Carrying Data Accross Multiple Form Pages
I have a checkout/order form that consists of 6 pages, all PHP. The are linked to one another, like, after the user finishes page 1, they proceed to page 2, etc... The first two pages are submitted by a GET link, so those are not in my question. The next 4 are submitted using a <form>. Throughout all of the pages, i would probably have about 25-30 variables, things that the user has to fill out. I have two questions,

1. What would be the best way for me to keep track of all the data moving throughout the pages, like storing it from page 4, and i still need to access it on page 6.
2. I don't know if anyone could help me here, but does anyone know of a way to code around those ugly "page expired" pages, because of a submitted form. If a user needs to go back, which most likely they will, is there some sort of way for me to skip the expired page?

How To Create Many Pages Dynamically From A Template?
Is there a way to create many pages dynamically... say using a template? I've over 110 html pages with the same format and I'm sick and tired of creating new pages, updating old ones, with content and links. I've access to linux and unix, php, perl, and java...
Any suggestions?

Create PHP Pages From List Of Files In Directory
this is probably easy for a php pro... but I cant figure it
out..

I have a directory of mp3 files named like this.
Chevy_Car_Commercial.mp3

There are about 150 files.

I am trying to find a script that will make php pages based on the file
names.
chevy_car_commercial.php

And also dump that variable title
Chevy Car Commercial into the <title> of the web page...

I have made dynamic pages before... but that was using a form..

PHP Script To Sort Data/create Pages According To Fields?
Someone fills out 3 fields. (There will be more but this is just to
give you an idea)

1. Country
2. State
3. City

I want this script to generate a web page and list the people by
information submitted.

eg. Everyone that put in USA will be listed on a page.

or

Choose California and everyone that typed in California will be listed
on a page.

I can also create links with criteria at the end. eg.
mysite/search.php?=montana

This script will also accept data from people. So people will visit,
type of the form and if the information is valid (not spam) then
they'll be in a database and able to be sorted.

Looking For A PHP Script To Sort Data/create Pages According To Fields.
eg.

Someone fills out 3 fields. (There will be more but this is just to
give you an idea)

1. Country?
2. State?
3. City

I want this script to generate a web page and list the people by
information submitted.

eg. Everyone that put in USA will be listed on a page.

or

Choose California and everyone that typed in California will be listed
on a page.

I could also create a link with the search term at the end. eg.
mysite/phpsearch=?montana

This script will also accept data from people. So people will visit,
type on the form and if the information is valid (not spam) then
they'll be in a database and able to be sorted.

Which Tool To Use To Create Form For A Database? How To Build A Interfaces (or Web Pages) In Easy Way?
how to build a interfaces (or web pages) in easy way? how to build a form in easy way? how to automate and create web pages with a tool? which tool to use to create form for a database? I mean there is a way or a tool which help me to build an interfaces (web pages) to deal with the data in a database?

Php To Pdf Multiple Pages
I can write a page - no problem.
when I start a second page I cannot open second page.
at the time of a page break I have tried:

php_close_page($sessionname)
php_open_page($sessionname,x-coord, y-coord)
and
php_close_pdi_page($sessionname, $pagename)
php_open_page($sessionname,x-coord, y-coord)
and just
php_open_page($sessionname,x-coord, y-coord)

It always opens and writes the first page but hangs
up when it tries to open the second page.

Multiple Pages
I am working on a php script that would allow members to post artices on the homepage. I think I have that pretty much down, what I don't know how to do is to limit the articles posted. I only want, say 10, to show up on the hompage, then users can click next page to see the next 10 articles. How would I do this? And how would I beable to make a next page link, too?

Also, this might be a bit much, but how would I make an administrator page, that allows me to authorize which articles are posted, and which are discarded? Just a simple one that says, post or delete. I can do the rest that would let me edit etc. but I just don't know where to start!

Multiple Pages From One PHP Document
I'm trying to work out how to query a database in MySQL, get a nuumber of
listings that match some of the criteria. For example the database has a
"town" field. If the town field matches the form's town field (as input from
the user), that listing's "Title" field is printed.

This title should act as a link to the full information of the listing. EG.

The user enters "Plymouth" as the town,
The php sends a query to the database
The database says "yes we have 10 listings in plymouth" and lists the titles
of all 10 as links.
The user clicks on one of the titles named "Neil's House"
The php then sends a query to the database and prints all the details of
this listing including "Description" and "Directions" fields.

I hope that makes sense, but anyone have any ideas HOW to do it?

I have a feeling I'll need to add includes or if / else statements to only
print the whole listing if the database is certain it has the listing
required, but otherwise keep giving details until only one is listed.

Also is it possible to create an SQL database from an Excell spreadsheet?

Forms And Multiple Php Pages
I'm working on a site which has a form page for users to request information from our company. I have the form working correctly, and a php page which lets the user verify his/her input. On this page, I have a submit button which opens the next php page which sends the email message to our servers regarding the info request.

My problem is that it seems that my variables from the form (i.e. $name, $address, etc.) as well as any variables I created in my first php page can't be passed to the page that contains the mail-sending script. Does anyone know how to pass these variables on?

Multiple Pages Script
I have adapted this multiple page script and its not working anymore.... i'm sure it worked when i first installed it but i've done some pretty heavy script changes since, here the 2 parts, the first part is right at the top of the script and the second part is at the end, just before the results are given to the page parser...PHP Code:

Multiple Pages Script
I have this basic php script that sort results from a database into 5,10,20,50 results a page and then divides the pages up into how many is required by the number of entries in the database...blablabla.

Ok, so I run it on MAMP server on my computer and it works great and just as planned. But as soon as I upload it to my hosting company server it doesnt work at all. http://jwcsk8r.com/iaredrunk/multiple_pages.php.

Now, the page recognizes the total number of entries and divides the required page links up properly it just seems to be the "navigation" isn't working.

I really have no idea where the difference might be in the set-up (php.ini file, maybe?) or how to correct the issue. And both MAMP and my hosting company are running php4. I think it might have something to do with the register_globals or the server variables being called improperly. (i.e. $_SERVER["PHP_SELF"] and not $PHP_Self) but ive messed around with both and cant get it to work. Code:

$_SESSION Not Sent Across Multiple Pages....
I am using the following:
Apache version 1.3.37 (Unix)
PHP version 4.4.4
MySQL version 4.1.22-standard

I have a page which sets a few $_SESSION variables as such:
$_SESSION['username'] = Bobby;
$_SESSION['authentic'] = 1;

I didn't use session_start(); at the beginning of this page because from what I read elsewhere there is no need to when using $_SESSION[](only when using session_register()). Now, when I click a link and go to a new page (same domain and same window) none of the $_SESSION variables are read. I just get empty when I echo $_SESSION['username'].

Gzip Multiple Pages
I'm coding forums but i want to Gzip every page but not sure how to go on this one....

$_post Varible For Multiple Pages
I am not able to use the global variable for multiple pages using PHP 4.3 version while everything is clear in the PHP.inc file.
I am using a submit button with post method. The value using $_post is available for the immediate post but not available for subsequent pages. I am not able to use global vairables in *.inc file using include function.

Displaying Results On Multiple Pages
I have a search query via PHP and MySQL that has list of results, but I only want to show 10 or 15 on a page. Much like Yahoo! or even here on the Devshed forums. I have been working on a system that cycles through all the results with a while loop and a counter. It only displays results >= 11 or <=20 as an example. I am passing that data (the results start point through the url) I am just worried that if the results are in the thousands this system would get very slow.Is there an easier/better way that I am not seeing?

Article Split Into Multiple Pages
I have a website with articles from a MySQL database and i know its possible to split an article into multiple pages because i have a thing from http://xhawk.net/projects/yaapi/ that shows the intro when a id=?? is used and then displayes the rest when id=??&page=1 is used. ok

But when i try to edit the code it is hard to extract the bits that actually split the article up.

Is is possible to o the following things:show the article in multiple pagesshow a 'next' and 'back' linksuse tags such as #intro# and #page#not have coding like the above url use, when i say that i mean using a main file to do everything from and then a another page to actually show it.

Dividing Articles Into Multiple Pages?
I'm using GeekLog (modified) to have a site with articles. Some articles are large, and I would like a simple way to divide them into pages. Now there was ages since I coded any PHP, and when I did I was not exactly a master. I don't have any time to learn again, so would really appreciate any help. What I thought of, is some simple function that displays the text between some tags.

For example, if I insert this into a article: [page=1] some text [page=2] more text [page=3], you get the point. And when it displays the article it show the text between page=1 and page=2, then automatically adds a link to next page and etc. This shouldn't be so hard? Anybody would like to help me?

Session Variables Across Multiple Pages
I'm busy fiddling with sessions under PHP5, and very quickly learned
what I would have found out even sooner in the PHP manual - declaring
your session variable on page1.php makes it available on page2.php
(assuming that's the next page you load) but doesn't then make it
available on page3.php unless you respecify it on page2.php. I'm sure
there's a very good reason for it, and I know I can get around it by
using a database and the session ID, but I would really like to know:
why? I've already searched, but can't find any more information on the
issue.

Passing An Array Through Multiple Pages
I have a form that creates an array. That array (on the next page) is expanded in a loop and then compared to an SQL database for a display of items. I need to know how to pass that array from this page to the next for a similar expansion and for SQL data entry.

I tried to create a new array in the loop but it did not work. I am new at this so if I have my original array (array[[]) can't this be passed through multiple pages and have each page perform a different function on it?

Breaking Up Text For Multiple Pages
I was recently put in charge of heading up my company's website, and
while I have a lot of experience on the design side of things, I'm
still very new to the programming side. When I started, the website had
just gotten a revision, but the site was an utter mess, so I've been
trying to fix it up. As I've gone along, I've learned some aspects of
PHP, but my knowledge is still very limited.

Here is the problem I'm trying to fix. A backend is used to enter
information into our MySQL database, and then a page template pulls it
out to make the page. For our reviews, the PHP coding currently breaks
up the review's text so that it can be places across multiple pages.
The problem is, the way the text breaking was set up, the end of one
page and the beginning of the next are totally chaotic, with breaks
often coming mid-sentence.

Here is what I'd love: other coding automatically puts an HTML break at
the end of paragraphs, and then another in the space between one
paragraph and the next. I'd love to have the code search for when those
double breaks come up, and then break up the text after, say, every
sixth pair of HTML breaks. I'd also like the option to break the text
myself by putting in some sort of text code in the original text. At
this point, though, anything that can make the breaks more elegant
would be a huge improvement.

I really appreciate any help anybody can give me in this one. Please
remember that I know very little of PHP, and I'm not much of a
programmer anyhow, so things that you may take for granted that people
would understand about PHP, I might not know.

I tried to pull out what I thought was the current coding for the text
break. Here it is. I'd also like to get rid of the part1/part2 factor.
Before, they had the text breaking to help in fitting into the layout
around an image, but I've fixed that so I no longer need the break. So,
that portion no longer needs to be a factor.

if ($page == ""){
$page = 1;
}
$no_letters = strlen($Game_Full_Story);
$times = ($no_letters / 3800) +1;
$Game_Full_Story = wordwrap($Game_Full_Story,3800,"*#^");
$Game_Full_Story = explode ("*#^", $Game_Full_Story);
$pages = array();
for ($i=0; $i<$times ; $i++){
$part[$i] = $Game_Full_Story[$i];
if ($i != 0){
array_push($pages, $i);
}
}
$page = $page-1;
$story = $part[$page];
if (strlen($story) < 460){
$parts1 = $story;
}else{
$story = wordwrap($story,460,"*#^");
$story = explode ("*#^", $story);
$parts1 = $story[0];
$count = count($story);
$parts2="";
for ($i=1; $i<$count; $i++){
$parts2 .=$story[$i];
$parts2 .=" ";
}
}

Create Web Page In Multiple Language
i want to craete site which shows the contents as per the langauge i
choose. so can anyone give me idea that how this is possible. i know
tha problem but i don't have any idea about soultion. so pls reply me
if u know

Create A Multiple Entry Forms
This is what I am trying to do but have no idea where to start (I'm more of a designer then a programmer): I need a form to open in a pop-up window with the following fields as mandatory:

1. Name
2. Company
3. Position
4. Email

On this form there will be a "continue" and "cancel" button.

Cancel - closes window.
Continue - Prompts new form on same pop-up window.

New form (2nd page after someone clicks on continue):

1. Please describe the business requirement.
2. software modification (optional)

On this form there will be a "submit another request" and "finish" button. Submit another request - Opens same page as New Form (2nd page) but will have new values.
Finish - Will submit form by EMAIL and redirect to thank you page.

I need the "submit another request" to create new form pages as many times as the user needs. Is this possible? I can't wrap my mind around this but I was told that I
need to use loops / hidden fields, etc .

Generating Multiple PHP Pages W/ Different Quries On Each Page
I'm writing a guestbook. So far, so good, except now I need multiple pages. How would I write my scrpt to automatically generate multiple pages (or the same page, just changing query variables on it)?

For example, if I limit a page to 10 posts and the page exceeds 10 posts, and I press "Next page", I want it to display the next 10 posts.

Carrying Over Variables From A Form To Multiple Pages...
I have some data from text fields that are being passed over through a
form that I am displaying with the $_POST superglobal. Once i have
echo'd out this data onto the next page, i'd like to continue to use
it on the next page. I haven't figured out how to do this properly
just yet, but I'm guessing it has something to do with sessions. I
have MANY variables being passed (over 100) and I'm hoping i don't
have to register each one of these manually with $_SESSION[].

example.

//first page (index.html)

<form action="form.php" method="post">
<select name="color"><option value="blue">blue</option><option
value="red">red</option>
<input name="submit" type="submit">

//new page (form.php)
<?php
echo "Bill's favorite color is {$_POST['color']}";
?>
////

Now say I want to use this $_POST['color'] value on another page that
the form.php takes you to next.....how do i continue to use this value
across multiple pages?

I'm assuming this is a trivial question, but i can't seem to figure it
out!

Display Results From A Database On Multiple Pages
I am new to PHP and Mysql but am really determined to learn these techniques. I have some script that reads and displays results from the databse onto a page. However, I really wish to limit the number of results that are displayed to 10 per page and then have the next/privious links under the results. With these results, the results under the email field should be hyperlinked so that the person viewing the results should double click on the email link and send the person an email. How can i do that? I have to learn this technique.

The code is:-

Sorting DB Entries Over Multiple Pages (and Columns)
I am making an image gallery, and have previously had problems sorting the database entries over several columns, that is now sorted.

However, I don't know how to make the entries on page 2 to begin from image 10, page 3 to begin from image 19 etc (given that I am using a 3x3 table so 9 images per page. Here is the code that prints the URLs of the images (i am working with text, rather than IMG tags until it works): PHP Code:

Parse Multiple Pages With Curl Session
I'm having trouble parsing multiple pages in a curl session..

I am using curl to parse a page that requires a cookie, I can do that fine and store the information that I need using
$result=curl_exec($ch);

and then parsing $result

after doing that, I want to go to another page and parse that one, I change the variable $url and then use

curl_setopt($ch, CURLOPT_URL,$url); 
$result=curl_exec($ch);

but $result is the same page as the first one :-(

why am I getting the same contents for $result?

Display Results From Text File In Multiple Pages
i use a string, eg "&&&" to mark pages in a text file. i use $count to count the above string. how can i display the contents of this file in multiple pages (by identifying the above string or any other method)?

How To Display Mysql Database Information In Multiple Pages?
how to display mysql database information in multiple pages? i would like to display all my member with consist of 400 people and i wan it list in mulitiple pages, and contain a "delete tick" for me,and when i click the member, can redirect me to member detail imformation. it just similiar to email pages of yahoo inbox.

Display Results From Text File In Multiple Pages
i use a string, eg "&&&" to mark pages in a text file. i use $count to count the above string. how can i display the contents of this file in multiple pages (by identifying the above string or any other method)?

Converting Html Pages Into Dynamic Pages
I built a website in html, using Dreamweaver. I need to have a database built within these pages and the person who is going to do it told me that they will have to convert all my html pages into dynamic pages (php).

Is it complicated to do this or do I just have to save my pages in php instead of html in Dreamweaver ?

Sending People To Specific Pages That Are Coming From Specific Pages...
I want to show some specific pages to people that comes to my site from
specific urls, I know the variable $_SERVER['HTTP_REFERER'] will be
used but how?

For ex if the visitor comes from a site that is like:

I want to send this person a specific.php . I used below code but not
worked:

<?php

if($_SERVER['HTTP_REFERER'] == "www.cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "www2.cominghost.com"){

// Specific page html goes here

}
else
{
header("Location: index.php");
}
?>

This code not worked for some cases like if the visitor comes from
http://www.cominghost.com/account/targeturl.php or
http://cominghost.com/account/targeturl.php Ok I know the if statement
not working but How?

Selecting Multiple Values From Multiple Tables Using Checkboxes
I've been struggling with this for a bit but cannot seem to find a simpler, cleaner way of doing this.

a. I have a Table A - Customers , Table B - Contacts .
b. I have a form where a user types the first few alphabets of a customer name and then gets a list of contacts, cities.
c. The user is supposed to select multiple options from this list and then send that data to another form for processing.

I'm able to only pass data from Table A, not from B . Could someone please have a look at the 2 snippets of code and advise? And is there a way both these php scripts could be combined in a single one ? Code:

Grabbing Data From Multiple Tables For Multiple Requests
Here's what I'm trying to get at.

A table that displays all the Process Server's name, the number of summons's he has out within 7 days, 7-14 days and 15+ days...pretty simple, it's just a report so management can stay on top of how many papers are out.

I've got the server_information table with the server name and ID. and a case_information table with the serverID.

I've got a while loop that displays all the server's name, the problem is when I try to get the # of cases....here's what i've got so far. Code:

Multiple-combo - Multiple Mail Recipients
I am new to scripting but trying to create a page that lets users create an e-mail (mailto after having chosen from two drop-down menus (arrays).

I have managed to do so in HTML by using a Java script borrowed from Randall Wald (http://www.rwald.com).

However, I don't want the e-mail addresses to appear in the page to avoid spam. Is there a way to do so by using PHP?

P.S.: The first array contains (University A, University B) and the second array (Faculty, Staff, Students), i.e. 6 different e-mail addresses

To Search Multiple Words In Multiple Fields
I have a $phrase made of some words.Every query has a number variable of words. I would sort of my_table all records that have at least 1 word of the $phrase into field_a AND/OR field_b of my_table.

Multiple Users, Multiple Tables, One Form
I have a small group of users that will submit their 'goals' via one form (placed in a postnuke block). I have created one table (mysql) for each user to collect collect their goals. I need some direction in writing the php that will submit the form data to the correct table based upon the users Postnuke login.

Multiple Multiple Select Boxes
I'm looking to have multiple multiple-select-boxes on a page. But I
can only get the contents from the last selected value within a box,
via PHP. I've tried numerous methods. What am I doing wrong?

You can see ALL the values present in the url:
http://myserver/test.php?notify_use..._updcats=Update
e.g.......

On The Fly Php Pages
what coding you would use to create pages based off 1 template. For example

http://www.mysite.com/index.php?page=1
http://www.mysite.com/index.php?page=2
http://www.mysite.com/index.php?page=3

So that I can edit changes to all my pages just be editing index.php.

I don't have access to a sql database so I have tried different ways of using the echo command but no luck. Does anyone know how to do this?

Utf-8 Pages And Php 4.1.1
I'm running into a problem with php 4.1.1 on IIS (XP Pro version).
For example writing a page test.php that starts with

<?php session_start(); ?>
<?php echo '<?xml version="1.0"' ?>
<?php echo ' encoding="utf-8" ?>' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en"><!-- InstanceBegin template="/Templates/stdPage.dwt"
codeOutsideHTMLIsLocked="true" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
....

and saving the test.php in UTF-8 format in UltraEdit-32 or SciTE,
then running the page, there's a complaint for session_start() about
headers/page data having already been sent. If the same page is
saved as "plain" ASCII, it works. Any ideas how to get an UTF-8
encoded page to work in php 4.1.1, without upgrading?

Web Pages
i am trying to make a homepage in PHP but something along the same lines as the frames that you can use in HTML, so it allows you to have the different frames for opening different pages, but i was wondering how i would do that within PHP.

Secure Pages
I have a login system that checks the database for auth and sends them to the destination according to auth.

Now what I need is some way to secure the pages so you cant go straight to the pages by typing it to the browser. I would like for you to get directed to the login page if you try to go straight to the page(s). Is there some code I can put to keep from viewing the page(s) without logging in first.

PHP In Html Pages?
I have a problem. I need to include a php script in a simple html document on a server that does´nt support php.

I´ve tested following but it does´nt work..
<SCRIPT LANGUAGE="PHP"
SRC="http://www.domain.com/include.php3">

Does anybody know a solution for this problem or is it impossible?

Can I Expire Pages Myself?
I was wondering weather it be possible to have the browser say page expired or if it is posiblw to have a script that will detect the browser back button has been pressed.

Expiring Pages
Just a quick question, is there a way to expire prev pages users look at?

How To Redirect Pages
How can I redirect the URL if URL is underlined. I mean, I made alink to the site with URL. How do I change the site with URL, so that it redirects the browser to the page defined by that URL?

Members Pages On The Fly?
I would like to make a members site, where my members can update their personal page via the web through forums. The pages would be generated by a template. I would also like these member pages to have id=10 so that it is easy to link up.


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