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.





Automating Page Navigation And Control Transfer


Is there a system available to do the following:
consider an app of a few pages:

page1.php:
form1----->page3.php
form2----->page4.php

page2.php:
form3----->page3.php
form4----->page4.php

when I am at page3.php, I do not know whether I came there from
page1->form1 or page2->form3.
I can check for $_SERVER['HTTP_REFERER'] and get an answer. But this
example is simple. Let us generailze that I want an app that keeps a
track of all the pages the user requested, in the order that they were
sent to him.

Obviously, it can be written based on sessions. Is there already some
popular open source application for this?

Also, this brings me to a broader question of page navigation rules. In
an app made of 20-50 pages/scripts, life will be hell if there is no
systematic approach to transferring control between pages. Is there
some kind of structure already made and readily available into which
you just plug-in your pages by telling some rules ?

E.g. the scheme is something like:
$ListOfPages = array(
1=>"Main.php",
2=>"Edit.php",
3->"Add.php",
..........,
N->"Error.php");

$RuleSet = array(
1=>array("Main.php","Edit.php","allow_edit"),
2=>array("Main.php","Add.php","allow_add"),
...................
3=>array("Main.php","Error.php","my_error_handler")
);
The RuleSet is a set of page transfer rules based on evaluation to true
of the specified functions, i.e., allow_edit(), allow_add(),
my_error_handler() etc.
Obviously, form submission is the chief means of control transfer for
PHP programs and the use of ?op=add_something in URL's(GET) and <input
type=hidden name=op value=add_something> (POST) are a step towards
making some kind of structure.

So the grand code will look like:
$MyGrandAppControllerObj = new GrandAppControllerObj();
$MyGrandAppControllerObj->setPages($ListOfPages);
$MyGrandAppControllerObj->setRules($RuleSet);
$MyGrandAppControllerObj->Run();




View Complete Forum Thread with Replies

Related Forum Messages:
Form Submission (no Button) Using PHP+cURL+ Transfer Control To Other Site
I'm trying to send data using the POST method and also have control of the browser be turned over to the website that's receiving the POST data (note that this is NOT the same as sending the data via POST method and then redirecting to the website after). I need it to work exactly like hitting the submit button on an html form, and I need it to work from PHP. It needs to POST the data to the site and also let the other site have control at the same time.

I've tried a couple of methods using both cURL and an fsocket function, but it seems like in both cases that (1) the data gets sent to the other site first, (2) then my program gets a response back, (3) and then it redirects to the other site afterwards. The data gets sort of POSTed to the other site (I get a 200 response back, and I get info showing it was posted correctly), but since the other site does not get control, it seems to dump (not save) the posted data. Code:

View Replies !
Transfer Session_id() Between A Secure Page To An Unsecure Page - SSL
I am having problems understanding how to transfer session_id() between a
secure page to an unsecure page. When I move from the secure page to the unsecure page the session_id changes.

Here is the script:

Secure page:
<?php
session_name('thename');
session_start();
echo session_id();
..
..

View Replies !
Transfer Certain Portions Of Text From The Right Page To The Left Page.
I have a page split in two and I want to be able to transfer certain portions of text from the right page to the left page.

View Replies !
Page Control - Next/previous Or Select Page Number
I'm looking for php script examples that will help me control page layout. Using a table with 12,000 records, would like to be able to display only 5 records per page with page controls at the bottom of the page. The bottom edge would have next/previous or an optional insert desired page number.

View Replies !
Transfer Variables To Another Page
I have a script that on the first page is a form for users to fill out, when they choose to submit the form it goes to another page that actually processes the form to my MySQL database. ATM I use statements like this to carry over those values:

$article_author = $_POST['news_author'];

Is there a better or more effecient way to do this? It's not too bad on a short form, but typing out all those lines for a long form is tedious.

View Replies !
Transfer A Variable To The Next Page
I want to transfer a variable to the next page. Here is the code:
First Page:
$page="1";
<a href="fav.php?page=$page">I like it!</a>
Second Page, (retrieves the variable)
$page = $_GET['$page'];

View Replies !
How To Do Page Navigation Bar Using Php Codes?
I would like to know how to set up a page navigating system in a web site using php codes.

View Replies !
Keep An Html Page And Use Php For Navigation
How can i keep an html page and use php for navigation so it can be easily updated.

View Replies !
How To Create The Navigation Page
how to create the navigation page in php. The navigation should be from first page,next page,end page,and previous page.Give an example to code for the navigation page.

View Replies !
Browser Trys To Transfer Something After Loading The Page
I have some real web pages in PHP and sometimes after loading them the
browser still show the transfer indicator in the status bar, although it
also says 'Done'. My client isn't very happy with this and I don't know why
this happens. Visit
http://193.247.86.118/loveparty/index.php
and click Home in the page header (the site is not really functional yet)

The page will reload and after that the transfer indicator in the status
bar (IE 6, Mozilla Firefox looks ok) will show an ever incomplete transfer.
Otherwise the page works. No errors, no warnings. The pages are some sort
of a tag soup unfortunately. I didn't do them from scratch.

This is an old problem of mine and appears on many pages, not only this
site.

Anyone knows what might be causing a last, ever incomplete transfer with
the browser, or maybe a tool which can show me what URL my browser is
trying to get ?

View Replies !
Transfer Data From Several Differnet Forms On One Page
In php how could i transfer data from several differnet forms on one page. The forms would have different names/ids

View Replies !
Page Control
Trying to read through all the manuals to determine how control is returned to the calling page for the following scenario: Code:

<form method=post action=myproc.php> Code: header(Location:mypage.php)

View Replies !
Page Navigation From Search Results
I have created a search form that searchs for results from my database matching the criteria to what ever the user inputs. I have done this using 2 php pages the first page points to the second, where the data is sanitised and cleaned accordingly. The results are displayed on the 2nd page. Code:

View Replies !
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 !
Navigation Back To An Html Page
I can't seem to figure out how to navigate back to an html page from a php page.

View Replies !
Adding Page Navigation To Record Set
I have gone through the tutorial on php freaks for adding page navigation to records. I am in the middle of integrating the page navigation and have stuck on  2 areas.

1)
I have a page which displays a set of records (limited to 6 per page)
Below,is the Next and Previous navigation text bUt it is not hyperlinked!!!?? 

The line of code specifically is:

<?php
echo("<a href="$PHP_SELF&page=$pageprev">PREV".$limit."[/url] ");  - This should be hyper-linked but is not??

I think there could be a problem with the <href bit being AFTER the <?php. I am basing this on the fact that a previous record i made began the hyper-link <href BEFORE the <?php where as before the <?php was added only after : Code:

View Replies !
Control SSL Error Page
Is it possible to somehow redirect users to a cutom page if their browsers/firewall do not support SSL? Almost like a customized 404 page? We'd like to offer SSL form submits by default, but show a special page if SSL is not possible for the user.

View Replies !
Page Numbering - Change My Navigation Menu
i am busy with a image gallery and i have it working. but now i want to change my navigation menu this one: [1] [2] [3] [4]  to:

<<first [1] [2] [3] [4] [5] [6] last>> i have also this code, (c second code ) but i cant link it to my foto folder and unsort it from 10 to 1 ,like the newest u c first. Code:

View Replies !
Multiple Navigation Tables On One Page (master - Slave)
I just wanted to refresh only part of the page, i.e., table2 on my php page. here is my javascript code which performs the refresh it works fine and my php file display all the records. the only problem is: I have got two tables on the same page and i only want to refresh the second table when i click the a row of my first table rows. Code:

View Replies !
Session - Sort ALL The Columns Then Transfer That Sorted Table To A New Page For Printing.
I'm not fully conversent with sessions and I suspect they are the answer to this problem but I cannot figure this one out yet.

I have a table with data drawn from a database and some calculated on the page.
e.g.

 1 Name | Score 1 |Score 2 | Average Score  where average score is calculated on the page.
 2 Name | Score 1 |Score 2 | Average Score
 3 Name | Score 1 |Score 2 | Average Score
 4 Name | Score 1 |Score 2 | Average Score
etc.

Can I carry this data to a new page without having to call from the database again.
The reason is that I want to sort ALL the columns (which I can do already) but then transfer that sorted table to a new page for printing.

View Replies !
How To Control The Number Of Page Links Displayed With Pagination?
Does anybody know how to control the number of page links displayed with pagination?  I mean like, with the tutorial on this site, if I had, say 50 pages of results, it actually creates individual links for page 1-50.  How could I make it truncate say 1-5, and then an arrow to goto 6-11 and vice versa? Here is the code the tutorial uses

    for($i = 1; $i <= $numofpages; $i++){
        if($i == $page){
            echo($i." ");
        }else{
            echo("<a href="$PHP_SELF?page=$i">$i</a> ");
        }
    }

View Replies !
Create A Control Panel So That I Can Edit The Content Of A Particular Page Via Internet Explorer Without MySQL
I am trying to create a control panel so that i can edit the content of a particular page via Internet Explorer without MySQL. I have cerated the login part of the panel and now have no clue to make the edit page script. My questions are: Can this be done and what script will do it? I'd like the script to be primarily HTML/PHP based. Any ideas anyone?

View Replies !
Automating PHPUnit2 With SPL
I don't blog much any more. Much of what I work on any more is for my
employer, Zend, and I don't feel at liberty to talk about it (and some of it
is indeed confidential). However, I can say that I've been
programming heavily on PHP5 the past few months, and had a chance to do some
pretty fun stuff. Among the new things I've been able to play with are SPL and PHPUnit -- and, recently, together.

I've written before about unit testing, and my preference for the phpt-style tests used in PEAR. However, since Zend Framework uses PHPUnit2, and I work at Zend... I must to as the Romans do.

I've actually come to enjoy the PHPUnit2 style of tests. In the end, I find
that my tests are much less verbose than the way I was performing them with
phpt, and I tend to test for failure rather than success; failure should be
the exception to the rule. The myriad of 'assert' methods make this
relatively easy (though some operate in unexpected ways -- try testing
assertSame() on two objects that contain PDO handles, for instance).

One thing that was missing for me was an easy way to run all tests in a
directory, ala 'pear run-tests'. I read the Pocket Guide, and noted the
possibility of creating test suites to automate running tests. (Indeed, the
newer versions of PEAR now support running PHPUnit tests via pear run-tests as long as there is a file named AllTests.php containing
the test suite in the test directory.)

However, I was initially disappointed. The demonstrated way to do this is to
manually require each test file and add the class contained therein to the
test suite. Basically, I was going to need to touch the file every time I
added a test class to the suite. Bleh!

So, I started thinking about it, and realized I could just go through the
directory tree, grabbing files matching the pattern '/(.*?Test).php$/',
load them up, and add their respective class (by substituting '_' for '/' in
the path, and trimming the Test.php from the end) to the suite.

Initially, I was going to do this with the combination of opendir(),
readdir(), and closedir(), and then thought, "I'm doing something new with
PHPUnit, why not keep learning and do this with SPL?"

The problem with SPL is that it's not documented very well. It has extensive
API documentation, but that's mainly of the sort, 'such-and-such class
exists, with such-and-such properties and methods.' If any use cases exist,
they're typically in the user-contributed comments. I know, if it's a
problem, get off my duff and fix it -- and maybe I will, when I have a spare
week or so.

Fortunately, there's a nice use case of RecursiveDirectoryIterator in the
comments to the DirectoryIterator::construct() entry.
One thing to note: you can't use foreach() with the
RecursiveDirectoryIterator, as you need access to not just the 'array'
elements, but the iterator itself; a for() loop thus becomes necessary.

With RecursiveDirectoryIterator in hand, I was then able to whip up a very
nice quick routine for creating a test suite:

View Replies !
Automating Emails
I have a hockey league and would like to send out an email every week.  I would like this to happen at the same time every week (say Sat. night). All the info in the email will be from MySQL database so I won't need to change anything that often. 

View Replies !
Automating Requests
I'm looking for a way to read a list of ID's from a file and parse them into a request. Firstly, I need a function that will return a count of the lines in the file, and after that, how would I impliment the following example? I've tried fopen() / fread() and fopen() / fgets(), neither output anything. Code:

View Replies !
PHP COM - Problems With Automating Outlook
I have been reading through some examples on using PHP with Outlook. I have been trying to get this simple example working, but its starting to really puzzle me. PHP Code:

View Replies !
Automating A Datafeed Import
I am integrating an external datafeed that is changing daily. How do I make my MySQL database pull this fresh data daily and update all my pages with new content?

View Replies !
Automating PHP / MYSQL Backup
I am using php exec to run mysqldump and take a backup of my database, it runs just fine, but someone mentioned that I could get CRON (or something) to automate the running of my backup.php script. My script is called backup.php3 and is located in the ../../web/database directory.

My site is hosted by a ISP, I can run perl, php, mysql, etc but I have absolutely no idea how to set up a CRON script to call a PHP script (I don't know what a cron script is come to that!? All I need is something (simple and easy!) to call and run the backup.php3 script, the php will do the rest!

View Replies !
Automating Returns (&amp; MySQL?)
I work for a Mac retailer and currently on our website we have a form where anyone with a defective product fills in their details and when we receive the form submission we send them an email with an RMA number which they need to attach to the product before sending it back so that we can trace who it's come from.

We'd like to automate the process so that the user types in their details and a unique RMA number is automatically provided to them both on-screen and via email.

The RMA numbering is very straight forward and could start at 1000 for instance and simply increase by one each time a user correctly fills in the form, so the first person to submit gets an RMA number of 1000, and next gets 1001, etc.

How could this be done using PHP?
Would it need a database (MySQL?) to hold the RMA number and associated details about each person's product fault as they are submitted, simply adding a field to the database with each submission?

Does anyone know if anyone else has already written such code (there's no sense in reinventing the wheel!) and is there any code resource sites that are worth looking at?

View Replies !
Automating Email Reports
A friend would like to have a signup form on his site. Anyone that
signs up will be entered into a database and automatically sent an
email report. This much I can do!

However, he'd then like the person to recieve a further 2 reports with
a specified delay (say a week) between each email. He'd like this
process to be automated - sending anyone who signs up the three reports
with a week between each emailing.

Any ideas on how this is achieved much appreciated! A script on the
server?

View Replies !
Get The Text Within The Text Box To Transfer To Another Page.
I have found a free rich text editor for my website. I have played around with the code to get the text within the text box to transfer to another php page. My problem is that the varible is passed with. I have set up a page to remove them but nothing happens. The code:

View Replies !
Data Transfer From A Non-SSL To And From SSL
I would like to know how we can transfer data through a
secured channel to a non-secured site. I am designing an
e-commerce site and getting data from secured site
database(on a firewall) and display to my site.

View Replies !
Data Transfer
In mysql there is table downup
************************
site enum('site1', 'site2'),
down datetime,
up datetime
************************
and there is file with such statistics about site1, site2 down and up period
************************
2003-01-28 15:42:08 (back up)
2003-01-27 14:05:45 (down)
2003-01-25 15:54:17
2003-01-25 15:11:19
2003-01-23 09:38:19
2003-01-23 09:06:55
2003-01-10 13:42:38
2003-01-10 12:45:40
2003-01-07 01:56:44
2003-01-07 01:34:47
************************
how to transfer these datas to the mysql table. If there is not back up the data will not be transffered and always check the highest datetime / event has to be on the top/last.
should i use regular expression (preg_match).

View Replies !
Session Transfer
I need some help in transferring my session from one page to the next. I know it has to do with the URL, but whenever I try it never fowards me. If anybody has a suggestion that would be great. Also referancing me to some tutorials would be great too!

View Replies !
How To Transfer A SQL-Database
I am about to switch my hosts, and of course want to switch all my contents. The only problem for me is the transfer of the sql-database. Code:

View Replies !
MySQL Transfer
I am transfering a database from one host to another and I am having problems figuring out how to export it.

View Replies !
Files Transfer
Its like i am creating a website Builder and i have to transfer the files via PHP to the clients website after the website is created by the client. I dont have SSH - PHP has FTP Commands but in that i cant set permissions and file transfer is too slow and i fear it will give timeouts while transferring PHP Files. Also i need to create tables and db on the clients server and adjust the site. This i can do but the main thing is how do i transfer the files over.

View Replies !
Secure File Transfer
I'm trying to transfer a database dump from one web server to another in a SECURE way...

If I didn't care about security, I could just use PHP Code:

View Replies !
Remote File Transfer
hi, ive been messing around with uploaders and the like,
how can i use an uploader to transfer a file from server to my server ?

via a http://www. connection ?

my reason for this is that i am on 56k, and there would be no sense in me downloading from a website and uploading to my website, especially using huge files.

View Replies !
Database Transfer (using PhpMyAdmin)
I'd like to transfer a database from one server to another, using PhpMyAdmin (the only way I can manae the database)...
Only problem is I don't know how to do it.

The database isn't gigantic, so perhaps an idea would be to download it and upload it on the other server, but can this be done ? Any SQL wizards to give me an hand ?

View Replies !
Data Transfer Problem
I have an interesting problem. I have a (LARGE) set of historical data
that I want to keep on a central server, as several separate files. I
want a client process to be able to request the data in a specific file
by specifying the file name, start date/time and end date/time.

The files are in binary format, to conserve space on the server (as well
as to increase processing time). The data in each file can be quite
large, covering several years of data. New data will be appended to
these files each day, by a (PHP) script. The server machine is likely to
be a Unix machine, whereas my clients will be running on windows
machines. My clients program is written in C++.

My two main problems/questions are as follows:

1). Transfer method issue:
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?. I think SOAP is likely to be too slow,
because of the sheer size of the data

2). Cross platform issue:
How can I insure that that the (binary?) data sent from the Unix server
can be correctly interpreted at the client side?

2). Security issue:
How can I prevent clients from directly accessing the files (to prevent
malicious or accidental corruption of the data files.?

View Replies !
Is There A PHP Equivalent Of Server.Transfer (in ASP.NET)
I've only been at PHP for a couple of
days, and I'm trying to get some stuff done as fast as possible. I'm an
experienced ASP.NET programmer, and am trying to find some equivalent
stuff in PHP.

In ASP.NET there is a method called Server.Transfer which transfers the
request to a different page from the one that the user requested, but
without doing a redirect. The user gets sent headers as though they were
seeing the page they requested.

Does PHP have such a function? I have seen the function...

header('Location: page.php');

....but these seems to be a redirect, which is not the same thing. I
don't want the headers altered as I want the search engines to see the
page with the original URL.

View Replies !
Use Ftp To Transfer Or Download The File
I've just set up an apache web server on my Linux system. I would like to allow people to click on a link and download a file (from my server) using a php 4 web page - but i dont want to use ftp to transfer the file (i dont want to run an ftp daemon on my server).
Is there an easy way to do this?

Also a quick question on security - is there any way a remote user can get to see the php4 code via the web server (ie using only port 80 - assuming the rest of the server is secure etc)?

View Replies !
Transfer Session To New Window
I have written a custom content management system for on of my clients.
I use sessions to achieve a multilevel acces system. One of the levels is Administrator.
Whenever the administrator is logged in, he has an extra set of menu-options to edit the database.

However, what I want is to open a new window from the main window, with the administrator screen in it. The problem is the following: When the administrator clicks the Admin-button a new window is opened. To validate if he is really the administrator I use the following code: PHP Code:

View Replies !
Encrypted File Transfer
the following problem occured to me

I need to implement an encrypted File download with
a PHP script on the server side and a c# client application.

I know there is a way to symmetrically encrypt files
with the php mcrypt routines and already did implement a
protocol based on xml for querying files from the
server.

So the problem is, I need to generate and exchange a
random key for each transfer. This is possible,
for example, with the Diffie-Hellman Key Exchange
Procedure. Because I found nothing about this
procedure in the php function list, I began
to implement it myself.

The problem in this case is that I need arithmetic
support for Big Numbers (>=1024 Bits). The bc* functions
are too slow and do not work in this case. An alternative
would be the GMP Library, which is not supported by the
ISP where the script will be running.

Setting up my own Server with GMP support is no alternative either in
this case.

So perhaps anybody knows how I could achieve an encrypted
file download with different keys for every "Download Session" in
php. Is it possible over an ssl / https connection ? Or what am I
missing here ?

View Replies !
Transfer Variabele Outside Function
how can I transfer a variable from a function to the part after the
function?

<?php

$var="before function";
func_xxxxx();
echo $var;

Function func_xxxxx() {
$var = "after function";
}
?>

View Replies !
Transfer Between 2 Mysql Databases
I wanted to know how one can transfer between two my sql databases on the same machine using PHP . The updated table in one of the database is to be transferred to an identical table in the other database.

View Replies !
GET Method Transfer Size ?
I want to know, whats the maximum amount of data that may be transferred via the get method ?? is it 1 KB or 4 Kb or something else ?

View Replies !
File Transfer Method (CLI)
I'm using PHP (CLI) on a client machine, and I need a script on the client (executed via CLI) to transfer/upload a file to a web server using HTTPS (I could use HTTP if I have to).

The catch is, I can't use FTP methods (firewall/port issues) ... but I have complete control over the client machine as well as the server machine.  I can however use the following ports; 8080, 443 & 3306.

I realize that of the three ports I can use, 8080 would be the best but still not suited for mass data blocks.  I think 8080 will be okay because I am transferring files that are less than 5k.

Anywho, I thought I could get away with fopen() but I'm reading in the manual that the HTTP & HTTPS wrappers are 'read-only' which isn't going to work (because I am trying to write a file to the server, not read one).

So as I research further I am think that somehow 'sockets' might do the trick.  I have a very basic understanding of sockets & php but I would like to know if I could do what I am trying to do using sockets?

View Replies !
Slow Down Local Transfer?
I am trying to test a loading bar, but I am running it off my local apache server, which means there isn't any real load time. Is there some way to lock my transfer rate at like 10kbs or something?

View Replies !
PHP Data Transfer In Forms
basically I am looking for a way to transfer form data into php variables. Most of them are not a problem but I can not figure out how to transfer select values or radio button values. Can anyone help? I will be posting the code for the page I am working on after I get home from work.

View Replies !
Transfer Filteref Data
I have two databases which are identical in structure. One is called stats and the other is called statistics. I have a program in php (encoded by zend hence I cannot make any changes to it) that updates the stats database tables with data. However I need to filter this data to trim it down and insert it into the statistics database tables. I want this to happen everytime a record is added in the stats table. So i guess i will be using triggers. I am using pgadmin III. Can anyone think of a solution to this?

View Replies !

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