Displaying Parts Of A Page While The Page Is Not Complete Yet
A script I'm writing outputs a HTML table with many rows. Each row is the result of a query which takes about one minute to perform. When I run the script in a browser, the page takes several minutes to load and then displays the entire table. Is it possible (using PHP) to display the table as it gets constructed, one row at a time?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Reading Complete Page Content
I'm looking for some php code or for ideas how to read the complete content of a single page. Like a small spider or indexer. I want to read the content and put it into a MySQL database for a small search funktion.
Complete Newby Who Is Keen To Make A Search Page
I am keen to make a search page on a website, but I have absolutely zero experience with PHP. I am going to hire an expert, but I thought that it may pay to try it a bit first myself (I do want to learn how to do it). What I have is a search page (HTML) and an access database. Now, can someone give me some clues or links on where to start. I prefer not to install the whole PHP thing on my own computer, but just to try it straight on the server (if this is possible).
Parts Of Page Disappearing
I have a message board page that displays one page of one forums' messages using pagination. It all works really well unless there are no messages in which case nothing below the bit in the pagination code that echoes 'first prev [1] [2] ... next last' is shown. Below this section I have the form to add a thread and some links, but they aren't shown because of this problem in the script. This means that the first message in each forum can only be put in from PhpMyAdmin or by a script I make specifically for it. Code:
Extract Specific Parts Of A Page
I have a js script that runs from a remote location, it displays the latest lottery results, but there are ad's on it, i would like to extract the gif/jpegs from it, can it be done and if it can how??
Displaying Your Page Url On The Page
I'd like to find the function/method/http_header (not sure how to call this) that will return the full path of a document as. http://www.domain.com/directory/filename.php This will display the full url of the document it is written on as I want to use it to dynamically generate links to bobby/w3c to check some pages against html validator and accessibility. This link will be in an include a the bottom of all the pages on my site (~20 pages)
Displaying A Page At A Specified Position
I have a form about half way down a web page, which posts criteria for the WHERE part of an sql which then returns the results at the bottom of the page. Trouble is when the page reloads it goes to the top of the page again so the results are not visible and the user is sometimes unaware that anything has happened. I could get a message to display at the top to tell user to scroll to bottom but i would prefer the page to display at the start of the records(in a html table).
Displaying Just A Blank Page??
I have commented out a lot of my code and have realised that the code below is what the problem is. I have placed ini_set('display_errors', 'on'); error_reporting(E_ALL); at the very top of the page. No errors are displaying. However I can't see what the problem could be. Code:
Displaying Mysql On Web Page
i am archiving data in mysql, each has an id number from smallest (oldest) to largest (newest), by the week. on my website, i would like to display only the newest week and the week before it. (or the weeks with the largest ids). how can i do that?
Displaying X Number Of Results Per Page
What I need to do is this. I query a MySQL database and, for example, 400 results are returned. I can get it to display the number of results, but I would like to set a value to display, say 20, results per page and generate numbered links with and offset to browse through and next/previous buttons -not unlike this page. Can anyone point me in the direction of a good article or if you have it, post some code here?
Displaying Page Render Time
Some sites (some forum software etc) have a line at the bottom of the page that says Page rendered in 0.0002414 seconds or something of that ilk. My question is - how would one code this? The only way I could think would be to take the time at the top of the page and the time at the bottom of the page, take one from the other and display that - am I on the right track?
Displaying Text While Page Is Loading
i'm trying to display text while a page is loading using a method similar to the following: <? ob_end_flush(); echo 'AAA<br>' flush(); sleep(10); echo 'BBB' ?> in this script, AAA and BBB appear at the same time - when the page has fully loaded - which is not what i want (i want AAA to appear and then 10 seconds later, BBB to appear). pursuant to the suggestions on php.net's entry for flush, i've also tried the following to no avail: <? echo 'AAA<br>' ob_flush(); flush(); sleep(10); echo 'BBB' ?>
Displaying Last Visitor On Profile Page
I'm in the process of malking a php/mysql website where each registered member has a profile page. This is what I'm trying to achieve: -When some member visits someone else, I want that someone to see the recent visitor's username on his/her profile page. Can someone give me some hints on how this could be done?
Displaying X Number Of MySQL Results Per Page
I'm writing a search on a MySQL DB, and everything so far has just gone swimmingly. I've got a "results per page" drop down box in my form, with a few different values. At the moment, I'm just using: while($myrow = mysql_fetch_array($result) to output results to screen. I'm not too sure how to go about it, but I did have two thoughts: 1) Suck the results into a multi-dimensional array, and pass the array to a display results script (not sure if you can pass arrays to other scripts??? 2) Display x number of results, then have the "Next" (or 2, 3... ) links call the search again, but displaying results x+1 - x+x. 1 sounds like too much trouble, and 2 sounds inefficient. Not too sure how else to go about it. Any info / thoughts you guys have would be much appreciated. On a side note, how do you look at a specific row in the result?
Displaying Html Code On PHP Generated Page
I am trying to create a link page in my php application. this is a page that will display a block of html code that a visitor can copy and paste into their web site to create a link back to mine. My PHP page has a line in it like this: define('TEXT_INFORMATION', '<html page code is here>'); I have added the html code to create the page as noted above. the page contains a same of the banner image file and the html code that goes alon with it. My problem is that I haven't been able to "quote" the html code so that ir will not be executed. every time I try to run the application from my web server my page will display two copies of the banner iimage not on banner image and text block like it should. Any suggestions?
Displaying Members Edit Profile Page
I have an edit profile page for my memebership system which works fine until i call a function to make sure that the user is logged in before displaying the content with their details. When I log in and go onto the edit profile page, all the form fields are there but as soon as I click submit the page goes blank. I don't have this problem if I don't use the function but how else am i supposed to only display the page to registered and logged in users? Code:
Format Source Code For Displaying On A Web Page
Is there a good function or plugin out there to format my source code examples? I'm writing an article for a web page and want a very simple source code formatter. Eg: code in black, comments in red, quoted items blue, key words green, class names bolded.
Displaying Currency Exchange Rates On A Page For Product Price
i want to display the price of a product on my site in multiple currencies that is constantly updated to keep in line with exchange rate fluctuations can anyone tell me how i could get access to basic exchange rate data automatically for my site? (just a few major currencies)
Page Expired After Going Back From Del. Pageto Form Page Where Comment Is Submitted..
i've made a submit comment form with php and mysql, the form has an action to itself with a hidden var like this: input type=hidden action=add When i delete a comment on the page i go to a page called delete.php3 and there is a link with a javaline which goes -1 back in my history.. When ive added a comment, the comments page contains action=add and when i delete a comment, i want to click on the link to go back to the comment page, but then, it doesnt work and it says: Page has expired. I wondered how to deal with this kind of problems........
Page Has Expired Message In Between The Php Page When I Click Back In Explorer Menu
I have a php script page, which is basically quiz. Visitors (after login in with their email address) are supposed to answer each question, and when they click the button at the bottom, the next page will show which problems they got right or wrong. Now my visitors, after seeing some problems they got wrong, click Back button at the Explorer menu, and if they do, they get the below message: ========================= Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. ======================== Below are the script that I am using. This scripts are after initial login page, which asks for visitor's email address. I have authorized visitors already in my MySQL table, and only the visitors whose email address is in my MySQL table are allowed to login......
Session Var Is Setting ONLY AFTER I Reload Page, Form Var Displays First Page Load
Page1 has a form that calls Page2. The beginning of Page2: <? php session_start(); $s=$_POST['sSelected']; session_register("s"); ?> in the middle of Page2 I have a form varaible: <?php echo $_POST['stateSelected']; ?> <?php echo $_SESSION['s']; ?> The form var displays the first time the page loads. The session var displays only after reloading the page2.
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(); .. ..
[refreshing A Php Page Resulting Page Cannot Be Found Error]
i have a php page that will refresh by itself by using a meta tag and meta timer. however, without a clear indication, my page will just go "Page cannot be found". bizzarre but when i press refresh, the page can be found!. i am not sure whether this is an IE problem or issit my script problem. i don't encounter this problem if it's just a plain file.html. perhaps is my session string? i am passing my session thru the URL and i constantly refreshing it. is that the problem? my url looks like this: domain.com/myfile.php?authorize=mike&token=f5c0f7edd785a6a9448c50249bad18ed
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.
Launch New Page And Refresh Exisiting Page
I know about not being able to change header info after output to the browser but what are the workarounds if any? I have a basic form where a user logs in - the details they submit are verified in supportlogin.php and then if successful I launch another browser window with Javascript but the window in that they logged in at remains on supportlogin.php and is blank... How can I launch the new window and send the first window back to the login page? PHP Code:
If Value =1 Direct To Page Otherwise Show Data On Page
In the member account area there is a button saying (list) when the member clicks this they are redirected to add.php here i am wanting to check if a members account is limited, if it is direct them to a page saying you must pay your bill. if its not display the info on the page. in the database there is a field called limited which is tiny in if its not limited the value of the field would be 0 if it is limited the value would be 1.
Keeping Lots Of Values From Page To Page
I am doing an online questionnaire which is going to have 5 questions per page and upto 100 questions. If somebody hasn't completed the entire questionaire I do not want their data stored in the DB. I was wondering if anybody can tell me the best way to either use sessions to store the data and do a final update at the end, or use a temporary db table to hold the data.
Page Rotator Without Leaving The Actual Page...
I'm trying to write a homepage page rotator. The home page is default.php and I want 3 pages to rotate in that file without leaving default.php or directing to the actual pages I'm rotating... Basically, a content rotator but I want the content to be individual pages. Here is what I have but it seems I have a bug somewhere: <? $pages = array( include(page1.php), include(page2.php), include(page3.php) ); shuffle($pages); $i=0; $number=2; while(list(, $page) = each($pages)) { if ($i>=$number) { break; } echo "$page"; echo '<br>' $i++; } ?> For some reason the pages aren't coming up right in the default.php page.
Passing A Parameter From An HTML Page To A PHP Page
I want to pass a language value (EN/FR/DE etc.) from an Index HTML page to a PHP page with a language code in the call, so that the PHP page can select texts in that language. I would like to to it from an unordered list item if possible by extending the link ... <li><a href="scripts/pricelist.php???>Pricelist[/url]</li>
Login Page Produces Blank Page
What I get when I enter username/password and hit submit is a blank page and the URL never changes. In other words, the login page is 'index.php' and when submitted it should redirect to 'admin.php'. Instead the url/address stays at 'index.php' and the page turns completely blank. In the previous thread, the problem turned out to be some missing indicator to the md5 encrypted password. Well, in this version, that's there! In fact, I used the ending scripts for that project in creating this project. So, why it won't work is a real mystery. Code:
PHP Sessions Not Carrying From Page To Page
I have a website that allows a user to sign up. Then they can login. Now when they login it creates a session in the C:PHPsessiondata but once it loads a new page.. The session doesn't carry over to it. IT just reloads the login page.
Using PHP To Load Another Page Or Html Page
Ive got a PHP script, which if it ends correctly, i want load another PHP file or an HTML page automatically, ie without user intervention. The new page shoud replace the current page on the browser. Is there a PHP command or function which does this?
How To Persist Objects From Page To Page
I just started getting into PHP5. I'm thrilled that it has moved more toward OOP. However, conceptually, i don't understand how, when you instantiate a class, that instance can persist from web page to web page. How does the web application know that a new instance has been created and to keep the object alive until te end of the user session or when explicitly made null? Do session variables come into play?
HTML Web Page Hyperlink To Php Web Page
I am still having a problem parsing a html page with php. Code in my HTML is <? php echo '<a href="index.php">Home</a><br /> <a href="login.php">Login</a><br /> ' ?> However the link is to the Login page is: file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/TeeJayUu/login.php I am using PHP 5.0.2, Apache 2.0.52, MySQL 4.0.21, and Windows XP SP2. All pages are in the htdocs folder and the following instructions have been followed: - Copy php5apache2.dll to Apache's module dir and rename it to mod_php5.so; - Copy php5ts.dll to Apache's bin dir. Finally, add the following line to your httpd.conf file: LoadModule php5_module modules/mod_php5.so Apache has been stopped and restarted. Help - I am lost for what else to do. I want to keep this local until I have got it working.
Log In Page That Goes Back To REFERRING Page
I am using the following code to initialise a session, depending on whether-or-not the users' log in attempt has been successful. if ($session_ok == "TRUE") { //open the session session_start(); //assign user details to session $_SESSION[txt_user] = $user_id; $_SESSION[user_pass] = $user_pass; $_SESSION[ses_state] = "TRUE"; header("Location: ../index.php"); } as you can see the script then refers back to my index.php page, after the session is ok'd. What I would like to do is change this so that is goes back to the referring page, instead of the index.php page, which requires the user to then navigate to their previous page again. I have attempted to use $HTTP_REFERER, although for me (on IE6) for some reason their is no value in the variable!
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>
I Want To Create Something Like AMAZON: Those Who Liked Page A Also Liked Page B
I want to create something like AMAZON: those who liked page A also liked page B (I am going to apply the concept to a few different selections, but to keep it simple I will talk about page popularity here - like AMAZON talks about purchase patterns: those who bought A also bought B, C and D). In my mysql table, I record everytime a visitor looks at a particular page (I keep track of people with sessions and they can only look at a page once). Next, what I want to do is to show a small list of similar likes. That is, people who had an interest in page A also had an interest in page B. The structure of my table is: id timestamp session_id page_name There is a unique index on the combination of session_id and page_name. To work out similar likes for page X, my idea was to make an array of all the session ids that looked at page X and then select the top 10 of pages that these folk looked at. My question is, should I do this in PHP with a bunch of arrays, adding total counts while looping through an array or shall I use SQL statements. I could even make a really long string of WHERE session_id = A or session_id = B, etc..... Although this seems really inefficient. Another question I have is whether you think this will be a self-fulfilling prophecy (e.g. if you say that page Y is also popular then people will check it out and therefore make it more popular).
Calling A Function Or Page To Another Page
I have two pages that are part of a user registration script. For simplicity's sake I will call one registration.php and the other validate.php What I basically would like to do is instead of going from registration.php to validate.php, I would like to call the script from validate.php and use it without leaving registration.php The following code is a portion of the validate.php code. Here are my questions regarding this page. 1). If I want to call it or include it in registration.php should I make it a function? If so, how would I do that. 2) Can I call the validate page or function through an a href statement? (see registration.php code) PHP Code:
I Want The Page To Go Back To My Login Page.
I want to logoff my application and I have set up a link to do this. I got it to destroy my session, but I can't get the page to go to the top of the browser and do a page refresh. Here is the code I am using. First there is the link I am using. printf("<a href="%s?logoff=%s">%s</a><br>", $_SERVER['PHP_SELF'],"logoff", "LOGOFF"); Here is piece I use right at the top of the script to destroy the session and try to refresh the page. if (isset($_REQUEST['logoff'])){ session_destroy(); $_SERVER['PHP_SELF']; } What do I have to do to get the refresh to work?
If Page = 'about' Show The About.html Page?
I wanted to do some kind of PHP script so that if the current page the viewer is trying to view is called index.php?page=about then it will use the php script to embed with an i-frame the about.html file into a cell in my web page's table. Basically, so that the whole page stays the same other than one cell of the table which is dynamic depending on the status of the index.php?page=whatever. Code:
Login Page - Previous Page
I have a login page, and instead of going to the index.php page all the time after a successful login, I want the user to be directed to the last page they where at, as long as it is a page on the website.
Sessions Expiring From Page To Page
I just installed a site on a client's server. I'm using a session based login, and have the session_start() at the top of the pages I need. However, when I first log in, the session variables I register are all there, but when I click on any page, they are gone. Does anyone have a clue as to what might be set that's cuasing this?
Login Page/members Page
I am having trouble getting my login page and mebers page to work. I believe it has something to do with the way the cookies are set or something because the if(isset($_COOKIE['cookiename'])) area of the code seems to be what is not functioning correctly. Code:
|