Loading Part Of Page Using Includes
If I use includes to create a website pages, how can I make sure that the header part I where i have a flash movie, will load only once?
View Complete Forum Thread with Replies
Related Forum Messages:
$row->fieldname When It Includes A Variable Part
I'm trying to have different fields called depending on the language the user has specified. So, for instance, the table "sections" has fields called section_en" (section name in English), "section_de" (section name in German), etc. The language is set in a variable which the user can fill by (eg) pressing a button on the page. PHP Code:
View Replies !
Script To Open A Small Page When Loading A Large Page?
the idea is a script that loads when a large page is trying to open that need for example 5-6 mins to load and in the mean time to open a very small page that is saying loading the page please wait and when the large page is loaded to go directly to that page. Do u get my idea?
View Replies !
Page Loades Part Of The Page
the below code is kinda working but its only loading part of the page, when I do a page refresh the rest of the page loads. the part of the page that is not loading correctly is the bottom 1/2 which displays images. Code:
View Replies !
Caching A Part Of A Page?
I am working on a custom banner generator for some of our users. Its basically a flash banner that can take vars for colors etc, so users can integrate with their sites colour scheme. Its set up currently with the banner at the top as a preview, with e.g. .swf?color1=00000&color2=45efef in the object and embed tags. Below this is a script that is 3 nested for loops, that increment a var each and convert that to hexidecimal. The three hex refs are then concat'd together, and set as a CSS background to a transparent gif with an href around that calls the same page with the new colors in the url, which get passed back to the flash movie. (hope im making sense here :)) So theres about 500 or so (im incrementing the vars by two,otherwise its way sloooow) <a><img></a> that have to be generated on each page load. Im wondering how and if i can speed this up?
View Replies !
Getting Part Of Another HTML Page
I'd like some help with writing a script that grabs part of another HTML page. For example : I want to grab the content of a HTML page that contains the following strings : <!-- begin --> and <!-- end --> Then I want to get all the content (including these two tags) that is in between the two tags.
View Replies !
Refreshing Part Of A Page
Can some one help me if it is possible to refresh a part of a page, without reloading the whole page. Let's say, i want to add a small message box to my webpage. After writing a message, the user presses the send button and i want only this part of the page to refresh and give him a status message saying his message was successfully received.
View Replies !
How To Let Php Reflesh Part Of Page
I want to write some code that when some variable condition is met, it will change a table cell value (only reflesh that value instead of the whole page), I used to think it as calling JavaScript function first, which in turn change that table cell value in the page. But I don't know how to let php call JavaScript, or mimic click button action to call JavaScript.
View Replies !
Page Loading?
At last page of my prepaid system i want to show the information of the user means display congratulation,the username and password etc. which he/she choosen before. And at the last line i use a perl script which disconnect the user(Dial up) using killuser. But the whole code is execute at a time for that perl code is execute before the php file load. As a result the user never seen the username and password because the dialup line is disconnect before the information page is load. Some of my code is : echo "Thank you for chosen the $username"; echo $username; echo $password; And the last of my code is : $kuser = "/usr/bin/killuser.pl $prepaid_serial_number"; $run=exec($kuser);
View Replies !
Allow Page Loading
i have a page (frame.php) that is loaded in an iframe of another page. now i want to disallow that frame.php is loaded in the browser without the mother-page. i know there is the javascript solution, but in case someone turns that off, i want to add a php solution as well. i was thinking that this problem is solveable using sessions, but i have never used them before.
View Replies !
Loading A Web Page
I'm presenting users with an input box and asking for a ref number. The submit button loads a php file which searches the database for the ref nunber. If its founds I'd like the PHP code to then go extract a web url from the database and load that page. I can do all the searching bits but have yet to found out how I can get php to load a page if the ref number is found in the db.
View Replies !
Loading Page
I need to know if theres a way i can stripout the value of variables (take out characters) or revert them to their previous state?
View Replies !
Loading Another Page
I have built an entire website in php ad html, eery page ends wth .php. Know when i proccess a html form it loads another page. Now on that page can i load the main one or do i have to copy the hole source.
View Replies !
Page Loading
I have built a web site entirely using PHP and MYSQL. When I click on a link on my web site the screen immediately goes blank (I'm using IE5.50) and there is a pause until the new page is generated and then displayed. During this time all the user gets is a blank screen. Is there anyway to generate the page and then load it when it is ready without the page going blank first?
View Replies !
Selective Rendering Of Part Of A Page
I want to skip the rendering of certain parts of a Web page if the user doesn't have a certain permission (e.g. a cookie). I'd like to do it along these lines: <p>Anybody can see this paragraph.</p> <? start_protected_section($got_permission); ?> <p>Not everybody can see this paragraph.</p> <? end_protected_section(); ?> Is it possible to disable the rendering of a section outside the code like this (perhaps by setting a PHP flag to redirect subsequent output)? I don't really want to complicate things by moving part of the page into a separate "include file" or mixing the HTML and PHP by using a here-document (the <<<END syntax).
View Replies !
Include Specific Part Of Page
i know that the include() function allows you to include a page with php but how do i only include PART of a page like specific tables? what im trying to do is get the certain parts of this page: ...
View Replies !
Need To Copy Text From One Part Of Page To Another
It has been great so far but I hit a road block on one thing and I figured the brilliant minds here could help. This site isn't in a database because its 3000 pages of HTML now and we figured we can do work arounds to make it look right. We are starting a database for future data though Code:
View Replies !
Extract Each Part Of A Page That Are Enclosed In A <b>-tag
I would like to extract each part of a page that are enclosed in a <b>-tag, but ONLY if there are no other tags enclosed. <b>some text</b> <-- a match <b>some text <i>in italic </i></b> <-- should NOT match This is what I have so far: $pattern = "/<b>(.*?)</b>/si"; preg_match_all($pattern, "<b>some text <i>in italic </i></b>", $out); Any thoughts?
View Replies !
Loading Another Page Within Script
Quick Question for a newbie, I would like to know how i can get php to point another page, so that in the middle of a script eg. www.somedomain.com/firstscript.php the php script can make the web browser load the next page eg.
View Replies !
Exit() And Page Loading
I am using exit() at the end of an "if" statement that identifies if a variable has or has not been submitted to the page. The problem is that if the variable does "not" exist the exit() stops the script at that point and the rest of the page does not load. If I take out the exit() then the php script continues to run but when the script reaches the point that it need the variable it spit out an error and once again the remainder of the html page does not run. Any ideas on how to fix this problem?
View Replies !
Slow Loading Page
Have a website using a mysql database with php pages created to add to fields in the database. One of the pages has recently started to take minutes to load and when I go to 'save' changed info to be loaded in to the database, it takes up to 20 minutes ... times out and often does not save the changes.
View Replies !
Continue Loading Page
I have a form to allow a user to change their password. Pretty standard form with 3 text boxes, old password, new password and retype new password. I have some pretty standard checking, like comparing the old password typed with the actual old password, comparing both the new passwords, etc. Anyhow, if a condition isnt met, i want the script to exit and then to notify the user what happened. If I use the exit() function any HTML that comes afterwards wont load. How can i just exit out of the php script but continue to load everything below it.
View Replies !
Loading Diffentet Page Each Day
What i want is a new page loading every day. So the index of my site will be index.php, and i want to tell the PHP page to load page1.php/htm if it is day 1, page2.php/htm if it is day 2 and so on. These pages will be stored on the same server, but may be contained in their own directory. I believe that some arithmacy is involved, and that i have to base the calculations on the time or date functions, however i have not used these before, so would appreciate any help in this area.
View Replies !
Page Loading Order
Is there a function in PHP that will allow items to load up order? For example, lets say I have three images on a page. Is there anything that can ensure image one fully loads up before going on to image two?
View Replies !
Page Loading Indicator
I have been trying to figure out a way to have an indicator that shows when you go to a page on a web site that takes a little longer to load then other pages because of a script that is being executed or something else. I have found a lot of different ideas for using Java Script to do this but none of them really seemed that simple or were a little buggy. Does anyone have any recommendations on what I might use that works well? I don't have a lot of experience with Java Script so that is a small set back for me.
View Replies !
Page Stops Loading
i have a form for people to submit information. that form has an onsubmit fetaure to execute a javascript. then it goes to the next page. on that next page is where it puts information into a mysql database. then its supposed to display that information ina printable form. The page will enter information into the database but not display the data. It used to display the data fine, then i added the insert statement and it stops. heres the last line that gets executed: return mysql_query($q,$conn);
View Replies !
Automatically Loading A Php Page
I have a php page that has a flash intro in it. After the flash intro completes I need to load another php page. Does anyone know how to redirect the header on a php page after a flash intro completes. Do I have to do that in flash or can it do it from php?
View Replies !
Safari Not Loading PHP Page
I have a html page that has a flash movie embedded in it. In the movie, when a button is pressed, it passes variables to a PHP script, processes them and then sends the variables back to the movie (all behind the scenes). It works perfectly in Firefox, but in Safari 2.0.4 (for mac) nothing happens when I press that button. looking at the 'Activity' window in Safari, it shows the url to the php file and beside it Ɔ bytes of?' indicating that it can't locate or process the page properly. The strangest thing is that I just tested it on my older mac laptop which has Safari 1.3.2 on it, and it worked fine. I've never had problems with php on the 2.0.4 version of Safari before (being run on an intel iMac). and I also tested this file on a PC with both IE and Firefox and it worked fine.
View Replies !
Perl Includes In A Php Page
I'm converting some html pages to php pages. The original pages have perl includes in them with this syntax in the html: <!--#exec cgi="/cgi-bin/ads/zonea.pl"--> Of course, such includes in my php pages aren't working. Is it possible to run this perl script and put the results into a php string variable by something like: $variable = system("perl /path_to/cgi-bin/ads/zonea.pl"); that might not be syntacticly correct, but I hope the idea is getting across. I just discovered the answer to my question, and I'll go ahead a post in case some else would like to know, or if someone else knows a better way to do this, but this worked: $variable = echo("perl /path_to/cgi-bin/ads/zonea.pl"); echo $variable; Which printed the banner to the php document just like the ssi did in the original html doc. Hope someone finds it helpful!
View Replies !
Using PHP Includes In A .shtml Page
I have a PHP page on an ecommerce website with some PHP includes in it. I use these PHP includes in a sort of stock/price CMS system - they call other PHP files which look up the correct price of an item in a textfile database, and slap the correct price wherever it's needed on the page. It all works fine, but then on the same page I tried using a javascript which does some fancy work to display the current shopping cart contents. It didn't work because the remote shopping cart page's "continue shopping" button couldn't be fixed to GET, only to POST (if it detects that the return URL is to a script - ie a PHP page - it overrides the settings and makes the POST method stick). So I thought to get around this I'd turn the page into a .shtml page instead, so the cart wouldn't detect a scripted PHP page. But of course now the PHP includes don't work in the .shtml page (I get the "[an error occurred while processing this directive]" message). Is there any way I can get the PHP includes to work on a .shtml page? Or is there another way to call these "look-up" PHP files on a .shtml page?
View Replies !
Includes Html Page
I need to make a script in PHP in a html page, with the html page included and being called up with the use of include in a PHP page. Being a huge noob with PHP, i logically came to the conclusion anything with the extension .php will recognise everything that is PHP in the pages being called up within, but as this script will take a couple of hours to all up research, make and debug, i'm looking to get clarification.
View Replies !
Change Part Of A Web Page After X Seconds Delay?
I was asking about how to pass a new array number with a page refresh and someone responded: But what I don't understand is why you want to change images like that on page reload, I have never seen it before. That raised the question to me - if I have written out a web page in PHP that has an image displayed on the page - is there a way to have it change the image every 10 seconds? Could you do this with a For Each or While type loop? I thought once the script was parsed it then wrote the page source and it doesn't change on the screen.
View Replies !
Loading Page Fresh (without Cashe)
I have a Database driven site, and I use some tricky url parsing stuff out of a file called index.php3. Now depending on where the user comes from, the url will remain the same, but the header info will be different.
View Replies !
Loading All The Data Of A Page Into A Variable.
I was wondering how you would go about emulating header('Content-Type: application/csv'); header('Content-Disposition: attachment; filename=' . 'test' . '.csv'); but instead of getting a file...I would like to load all the data into a variable. Is this possible?
View Replies !
Automatically Loading A New Page In A Frame.
the basic idea here is that I want a web page that is made up of frames to redirect automatically to a frame depending on an if statement... if($1 == $2) { load url1.php in frame "main" }else { load url2.php in frame "main" } The frame "main" is an <iframeif that makes a difference.
View Replies !
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' ?>
View Replies !
Loading A Page With Ajax Or Sajax?
Well i have a problem i want to be able to run my messenger and music player or every page on my site just right now not much of the site is using Ajax or sajax, is there a way to load a php document in the page without having to reload my messenger or music player?
View Replies !
Stop Loading If Page Is Slow
I have an external newsticker on my site. The newsticker is often heavily slow, and slows down my site. I don't want to remove it, but I want php to stop loading that ticker if it doesn't display in 2 seconds. Code:
View Replies !
Measuring Page Loading Time
if there's any solution out of PHP that can measure load time of an HTML page. I know adding a javascript into a page and then calling a php script would do the trick but I'm playing around on this thing for a month now and I could get anything better. Would anyone care to share a solution or a script for that matter?
View Replies !
Forum - Single Page W/ Includes
I'm coding a forum for one of the sites I maintain, and I'd like to ask the community's opinion. Should I code it one main page, index.php, and have it use includes like index.php?p=newthread or should I have multiple pages, i.e., index.php, newthread.php, attachment.php, etc. What do you guys think is the best way to code this?
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 !
Memory Consumption: 15 Class Includes Each Page
I am trying to get an estimate on how much memory my scripts are using.. I am growing more concerned as I keep adding functionality to my site.. so far I'm up to about 15 different classes (user class, customer class, personnel class, etc. etc).. so 15 different includes on each page.. man.. that's gotta be hard on apache I figure. I'm apache, winxp, php5, on the dev. server. I don't have the option to compile with memory_limit flags to get memory_get_Usage() so I got this code from php.net and it produces: Array ( [0] => [1] => Image Name: httpd.exe [2] => PID: 1816 [3] => Session Name: Console [4] => Session#: 0 [5] => Mem Usage: 18,676 K ) But I'm thinking this is telling me that the entire apache process is using 18M? When I try to open a new browser window and go to the same page, trying to hit refresh on both at the same time (or close, whatever), the PID does not change.. so that's why I'm thinking it's just the entire apache process, unlike the native memory_get_usage() function. I have tried to deduce the following: *running memory_get_usage() yields 14M at the very beginning of the script. *running memory_get_usage() yields 18M at the very end of the script. *including ~200 functions in a 145K include file spikes the memory usage 2MB alone. *the way i have my site, i have frontend pages: app_admin.php, customer_admin.php, etc. and then I include the functions.php into all of them -- however it seems like it may be better (memory-wise) to put functions that are specific to each frontend page in the frontend, and in the case I need to reuse the function, move it into functions.php which is included throughout. *4M per "session" is required per client, so if I expect 250 simultaneous users, I need 1GB free worst case (all 250 sessions hit per second) Interesting tidbits.. I tried the following code: echo memory_get_usage() . ",b4<br>"; for ( $i = 0; $i < 10000; $i++ ) { $test = new appointment(); $test2 = new customer(); $test3 = new company(); } echo memory_get_usage() . ",aft<br>"; and it produces the following: Code: Array ( [0] => [1] => Image Name: httpd.exe [2] => PID: 1976 [3] => Session Name: Console [4] => Session#: 0 [5] => Mem Usage: 17,124 K ) Array ( [0] => [1] => Image Name: httpd.exe [2] => PID: 1976 [3] => Session Name: Console [4] => Session#: 0 [5] => Mem Usage: 17,128 K ) which is quite amazing.. after 30,000 instantiated objects only 4K of memory was additionally allocated. (considering on just the three includes of the three classes memory went from 16.6M to 17M -- about 400K memory allocated) also, my linux is a bit rusty.. if I've installed via RPM/yum apache on my prd (fedora) server, how do I enable the memory flag since I never really "compiled" it?
View Replies !
Includes The HTML In Between The <BODY> Tags Onto The Page?
how can I get a php page to have 2 includes? One works fine, but then I copy and paste the script (<?php include("page.htm");?>) and the second page doesn't appear. How can I get the page to display? Is there a php function to have an include page that just includes the HTML in between the <BODY> tags onto the page?
View Replies !
|