Displays Page Will Not Parse Till The Sql Query Is Finished.
I had PHP 4.3.3 running before I updated. When a page was loading, all the php/html that was doing simple prints of tables and images would load while an sql query was running. When the sql finished, the rest of the page displayed. I have now updated to 5.2.3 and when I go to the exact same page, nothing displays until the sql has completely finished.
The issue with this whole thing is the javascript I had loading on certain pages that displayed an image telling the visitor "please wait, processing..". This no longer displays since the page will not parse till the sql query is finished.
View Complete Forum Thread with Replies
Related Forum Messages:
MySQL Query - Page Which Displays A List Of Orders
At the moment I have a page which displays a list of orders, with the following query: Code: <?php mysql_select_db($database_connOriental, $connOriental); $query_rsOrders = "SELECT *, date_format(OrderDate, '%d %M %Y') as formatted_date FROM Orders INNER JOIN Customers WHERE OrderCustomerID = CustomerID ORDER BY OrderID ASC"; $rsOrders = mysql_query($query_rsOrders, $connOriental) or die(mysql_error()); $row_rsOrders = mysql_fetch_assoc($rsOrders); $totalRows_rsOrders = mysql_num_rows($rsOrders); ?> .........
View Replies !
Query Repeated Till End Of Execution Time?
i created a table with some content (this is not inportant what it does) i have this script <? //including teh dbconnection script include"conn.php"; while($links = mysql_fetch_row( mysql_query('select * from content))) {echo $links[id];}; ?> Its So small its almost inpossible to detect an error in it. Anyways what it does now is puttying as many times the id after eachother but i dont know why it does this. Anyone experianced this before?
View Replies !
PHP Script That Displays Another Page Partial Content
If you go to http://europe.nokia.com/A4305060, fill the "Enter your product code:" field with the value "0523183" and press "Go" (the ending page URL varies because there's a variable session-ID in the URL-link associated to "Go") you will obtain this string: "Version: RM43_V1.10.030" Is it possible to have a string.php page that just display this string?
View Replies !
Displays 5 Posts Per Page In Descending Order
I have been doing up a website which will, among other things, display news that I input into the MYSQL database. I have a working version of this where it just displays 5 posts per page in descending order (the latest at the top of the page) with the page numbering underneath them. Now what I wan't to do is just dispaly the latest 5 posts on the page but, I want to dispaly them so that I can put in a Javascript function to maxamize and minimize each post by clicking on the title. So, I have, ID, Title, Newstype, Author, Post, Date. In my mind I see this as display each of these using the COUNT(*) thing and just subtracting 1, 2, 3, 4 to get the 5 posts I want. I just don't know how to do it.
View Replies !
Script That Reads My Log File And Displays It In An HTML Page.
I have a problem. I am trying to make a script that reads my log file and displays it in an HTML page. I got the base code from a book, being that I am still learning PHP and I needed a little help starting out. But the code I am using gives me an error. The error is : Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/home/web/php-site/log-file.php on line 15 It ranges from to line like so : Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/home/web/php-site/log-file.php on line 27 I want to know if anyone knows the specific reason or maybe a place to start at to find out the problem and the solution.
View Replies !
Developing A Page That Displays Latest 5 Images In A Database
I am currently changing my web site so that it is PHP and mySQL powered. On the front page I have an area that will display the latest images in my portfolio and the latest text description. Therefore, what I need is an admin page which allows me to upload images to a database which has a timestamp/date field, a thumbnail field, an image field, a text field for the title and a text field for the description. I also need a HTML form with inputs for the thumbnail upload, image upload, title and text description (in a textarea). It would also be useful to have the page display the database contents and allow me to edit the details and also, delete rows. I then need code for that will display the most recent 5 thumbnails and the title on my index.php page.
View Replies !
PHP Page That Displays Html Based On The Address Enterd
I would like to have a PHP page that displays html based on the address enterd. For example: index.php?example=a would show a page with <body>Example1234</body> whereas index.php?example=b would show a page with <body>Example5678</body>. I've done this before, but I can't remember the code I used.
View Replies !
Exec, Run Until Finished
I call a program through exec that can take a long time to execute. This is fine but I would like to show some kind of animation or something while the program is running and when it is finished letting the user download the file. Code:
View Replies !
Finished Download
I'm using php/mysql on linux server. I have a php page with a simple link to download a zip file. How could I detect when the visitor finished the download? The zip file may be very big (40 Mb), so I need to know if someone is patient enough to download it. It should be somehow on client side I guess.
View Replies !
Finished File Download
I am not sure if php can achieve this, but i guess that my problem shoulb be solved with an server side language. Is there any way i can tell if a visitor of my website has finished a download? For example the visitor clicks on a file download link, and when his download is finished then i want to happen something (for example some download counter or something like that.)
View Replies !
Redirecting After Queries Are Finished
I have a php file that performs a few UPDATE statements in succession. I want the page to redirect after the last statement is finished updating the database. However, when I use: header("location: nextpage.php"); exit; I get the warning : Cannot modify header information - headers already sent... Is there a way to perform this script at all? or is there another way to make this work better?
View Replies !
Parse Query String Question
Hello, I have a querystring (&amt=138.06&opt=none), and I dont know how to read these passed variables. For example, where my querystring says "&amt=138.06" I cannot read these variables in my php script as $amt , or . $amt....these give me a parse error. When I do this: $data = $HTTP_SERVER_VARS['QUERY_STRING']; echo $data; It outputs the complete querystring-- can anybody please suggest some code to extract the value of "amt" from $data?
View Replies !
Parse Error In Nested Query - Please Help.
I am having troubles finding the parse error in this script. I've been checking for weeks. I am too new to the subject I guess. I am trying to show a readord and them have a form at the bottom of the page for inputting data to Update the record. I get a parse error that points to the last line in the script so I know it is something I am missing earlier in the script but doing a line by line it seems fine to me. ------------------------------ <--cut-- $query = "SELECT sub_id, username, story_title, DATE_FORMAT(date_submitted, '%m/%d/%y'), category, story FROM Submission WHERE date_processed < 1 LIMIT 0,1"; $result = @mysql_query ($query); // Run the query. if ($result) { // If OK, display the record. echo '<table align="center" cellspacing="5" cellpadding="1" border="0" width="500"><span><tr><td align="left" width="100">Story ID:</td><td align="left" width="100">Name</td><td align="left" width="250">Title</td><td align="left" width="100">Date Submitted</td><td align="left" width="50">Category</td></tr><tr><td colspan="5"></span><hr></td></tr>' // Fetch and print the record. while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo"<tr><td align="left" width="100">" ..$row[0] .."</td><td align="left" width="100">" ..$row[1] .."</td> <td align="left"width="250">" ..$row[2] .."</td><td align="left" width="50">" ..$row[3] .."</td><td align="left" width="50">" ..$row[4] .."</td></tr><tr><td colspan="5"width="500"><br>" ..nl2br($row[5]) .."</td></tr> "; } echo '</table>' echo '<hr>'
View Replies !
Parse Error In Update Query
This is the first time I have ever used the update query. I am not having any luck figuring it out. Please post if you find my mistake, Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in [bleeped] on line 46 here is the location of the problem: $sql = "UPDATE $table SET pagecontent = $_POST['T'] WHERE id = $_POST['id2']";
View Replies !
Form Inside Loop, Need To Wait Till Submit Is Activated.
I have the following. $result=mysql_query($sql); $nrows=mysql_num_rows($result); for ($i=0;$i<$nrows;$i++) { $row_array=mysql_fetch_row($result); echo "<form name='testform' action='ins_op.php' method='post'>"; lots of form stuff echo "<td><input type='submit' value='Save'>"; echo "</form>"; } I'd like to have the loop wait until the form submit is pressed before it continues and grabs the next record from $row_array. Right now the code displays all the records with their submit buttons. Doing it in this form permits one query to the database to get all the open records.
View Replies !
Parse A Query String To Populate Form...
I have created a Content management System that writes content to flat files. I have a single PHP page that calls/opens each flat file and places its content all around the page. I want to send a URL to people such as (www.??????.com/whatever.php?flatfile&firstname=mike&lastname=jones) where the "whatever.php is the landing page, the "flatfile" is the name of the text file that supplies the content, the "firstname" and lastname" will populate a form found on the php page. Can this be done? And if so, can you help me out? Code:
View Replies !
Parse Web Page With Fopen()
Can anyone lead me to a good tutorial (or even book) on effective ways to parse web pages? I'm thinking about creating a function that will parse UPS.com pages to get tracking information. to make it a bit trickier, the way to get to the page with the data is by clicking a button. Is that possible? Or does UPS open their data like Amazon does? I've searched their site and not found a suitable solution.
View Replies !
Parse Html Page
How can I import a html page with my php script? I have a simple html page that actually just generates a simple table of values. I just want to strip the values to insert in to a database. How do I import the html page to my php script to parse it?
View Replies !
Parse A Remote Web Page
I would like to display some information from a remote web page on my own website. The tags I am looking for are <a name="picture" href="pictures" title="variable1"><img alt="variable1" title="variable1" src="mysite.com/myimage.jpg" border="0" height="140" width="98"></a> I need to get the <img tag. I don't need the <a part.
View Replies !
Parse Page Content
I have a request from boss that create a small function which will keep login inforamtion. Then the page will automatic login into targeted site using stored login info and capture content of the page.
View Replies !
Parse Multiple Entries On A Page
I'm trying to parse multiple entries on a page, i've managed to get it working for the first entry, but can't seem to figure out a while statement that will run through all the entries on the page: Code:
View Replies !
Preg_match - Parse A Web Page And Get A Matching Phrase.
I am about to dive into regular expressions, which look like a giant puzzle to me. I'd like to parse a web page and get a matching phrase. Somewhere in the HTML there is this particular part: <a name="picture" href="{generated dynamically}"> <img border="0" src="{generated dynamically}" width="{generated dynamically}" height="{generated dynamically}" alt="{generated dynamically}"></a><br> What I need from this string is the image URL. I wrote a code for this, but it is not working.
View Replies !
Parse An Html Page With Php To Pull Some Information
Im trying to parse an html page with php to pull some information from it and its not working correctly. I am running this to pull the ul from the page. its the only one on the page with the class directories and it doesnt stop pulling information after the end of the ul. preg_match('/<ul class="directories">(.*)</ul>/', $postResult, $array);
View Replies !
Warning: Pg_exec(): Query Failed: ERROR: Parser: Parse Error At ...
I have the following: $sql= "select shopname from shop where exits SELECT shopname FROM shop where shoptype = '$_POST[option]'"; Its embedded within php. keep getting error: sportsselect shopname from shop where exits SELECT shopname FROM shop where shoptype = 'sports' Warning: pg_exec(): Query failed: ERROR: parser: parse error at or near "SELECT" at character 39 . in /home/students/ug/ug75ixc/public_html/shops/storeSearch.php on line 46 i know what i am doing.
View Replies !
IE Displays Php Different Than Mozilla
I have a wierd thing where for some reason internet explorer processes the php differently than mozilla, something i find interesting since i thought that php was run on the server side and the only the result outputted to the browser. I have on my page a top flash banner that i only want it to show its animation every couple of pages rather than every time a user clicks on a link so i threw this code together (probably considered sloppy, i know there is even some redundance that isnt needed but this is the result of rewriting it several possible ways to try to make it work correctly .....
View Replies !
How Php Displays The Output?
If I have a PhP code below in a linux+apache environment, ============================== <?php> the first php block code <?> The HTML code goes here <?php> the second php block code <?> ============================ does php open a temporary file to store the output from "the first php block code"? then combined with "The HTML code goes here" and then the output from "the second php block code"? Then display the output of this temporary file to web client and remove this temporary file afterwards?
View Replies !
PHP/HTML Displays
I am using a PHPed version of an HTML file in order to include an onload function to write to a log file. The problem is that large parts of this file display as garbage 9 times out of 10, and sometimes again with a refresh. Is this a HTML or a PHP problem?(it doesn't occur in my other HTML only pages) If it is a PHP problem, is it a question of delaying script execution until images are displayed? And how do I do that (or whatever else may need doing)?
View Replies !
Calls On A CSV And Displays Every Row
I have a script that calls on a CSV and displays every row. At the moment it seperates each field with a comma. I am struggling with how to seperate each field and put it into a table column. Can someone push me in the right direction. Code:
View Replies !
PHP File Displays
I'm having a strange problem when upgrading the content management system eZ publish from PHP 4.4 to PHP 5.1. Some cache files related to i18n are included with the "include" function, but they are being displayed to the user agent instead of being parsed by PHP. With PHP 4.4 there was no problem.
View Replies !
Sort Displays
I don't know what's wrong with this coding, I get an error Notice: Undefined variable: orderby in F:Htmlfsyc_databasegraduates_list.php on line 11 Notice: Undefined variable: color in F:Htmlfsyc_databasegraduates_list.php on line 30 <? $connection = mysql_connect("localhost","****","********"); $db = mysql_select_db("job_seekers", $connection); $table_name = 'personaldetails' If (isset($sorting)) { $orderby = "ORDER BY $sorting "; If ($sorting == "personaldetails") { $orderby .= "ASC"; } else { $orderby .= "DESC"; } } $sql = mysql_query("SELECT * FROM $table_name $orderby"); ......
View Replies !
Header Sometimes Displays Sometimes Downloads
using Javascript - open a new window: $s=contents of database field in rtf format header("Content-type: text/rtf"); echo $s; This works perfectly in Safari (Mac browser) but in both Netscape and IE5 it tries do download. If I use: header("Content-type: text/rtf"); it downloads in all browsers. I have two questions: 1. How do you know which behavior to expect (download or display) 2. I want to display an RTF file in a browser window. Is there a way to do it that works in IE and Netscape?
View Replies !
Displays A Date From A Database
I have a script running (with great effort and help from the group) that displays a date from a database and the amount of days to that date. I would like to change the date into a more "human" format. The date now displays: 2002-12-08 I would like to change it to: Sunday, December 08th Is this a property of mktime()?
View Replies !
Pear DataObject_FormBuilder Displays Nothing
I'm having problems getting the FormBuilder package to work. I've spent the last 3hrs reading what little documentation and examples I could find and the idea seems great, if only it'll actually display a form. I'm not getting any error message, and I know that my DB_DataObjects are working as I'm able to auto generate the classes and search them. However using the following code which I believe is meant to display a form for the 'users' table, does absolutly nothing except displayed <html><body></body></html>. I did some experimenting to see if there was something wrong with displaying anything, and I found that nothing would print after $builder->getForm() and I have no idea why : CODE: require_once('DB/DataObject.php'); require_once('DB/DataObject/FormBuilder.php'); $config = parse_ini_file('example.ini', true); foreach($config as $class => $values) { $options = &PEAR::getStaticProperty($class, 'options'); $options = $values; } $_DB_DATAOBJECT_FORMBUILDER['CONFIG'] = $config['DB_DataObject_FormBuilder']; $building = DB_DataObject::factory('users'); if (PEAR::isError($building)) { die($building->getMessage()); } $builder = DB_DataObject_FormBuilder::create($building); if (PEAR::isError($builder)) { die($builder->getMessage()); }
View Replies !
Mysql Select Displays Nothing
I'm having some trouble with this script. I have within a table the column "item1name". When I try and run this script everything echos out okay yet the final if statement always displays nothing when there is actually text in the column specified. Any ideas why this is happening? <? $userid="2"; $refslot= "item1"; $ex= "name"; $refiname= $refslot.$ex; echo $refiname; mysql_connect("localhost", "xxx", "xxx") or die(mysql_error()); mysql_select_db("xxx") or die(mysql_error()); $query= mysql_query("SELECT * FROM pcitems WHERE userid='$userid'")or die(mysql_error()); while($row= mysql_fetch_assoc($query)){ $iname= $row['$refiname']; echo "Working"; ................
View Replies !
Multi Column Displays
I'd like to know if there's a good tutorial around that can help me regarding multi-column displays. I'd like to work on photo galleries where the table displays 3 images across, until the last item. Apart from this, I'd like to have some sort of tutorial wherein I can display more columns at a time.
View Replies !
Code Displays In All Browsers
I have installed Apache 2.2.0 and PHP 5 on a Fedora Core 4 box. Both installs finish without an issue but when I check info.php on any browser (have tried IE, Netscape and Firefox) it just displays the code. I have checked the apache error_log and it tells me that PHP is configured, which i thought meant it was ok. Code:
View Replies !
|