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.





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 Complete Forum Thread with Replies

Related Forum Messages:
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 !
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 !
Map Image Displays
I have the following code and the map image displays, however there is no red ellipse:
PHP Code:

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 !
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 !
Result Displays Seven Times In A Row
I'm trying to list out songs of a specific album and I think my code is fine. The only problem is that all the songs are displayed seven times. Everything else is fine.

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 !
Highlight_syntax() Displays 1 After The Function
I am using the highlight_syntax() function for some code, and it works fine, I echo it, and it shows the code highlighted, but it also echo's a 1 after all the code. Why is that? I've tried substr() to remove it with no success.

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 !
Changing How Date Displays
I've got dates saved in a MySQL database in the format 0000-00-00, and I'd like to display them as "15 September 2006" or whatever..

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 !
Displays A Word For Two Months Before Changing It
I need a piece of code that displays a word for two months before changing it. So, if we are in September and October the word 'Apple' is displayed and if we are in November and December then the word 'Orange' etc.

In all, there are 6 pairs of months, so six words. On the first of the first month, the word changes to the word for that pair of months. I think this might have something to do with arrays but I'm not sure.

View Replies !
? Character Displays Instead Of Pound Sign
im outputting text from a db and where a £ sign has been entered a
? character appears instead which i cant seem to get rid of with a
simple str_replace. is their a way to get rid of it? and what is
causing it?

View Replies !
Php Script That Displays Last Uploaded Jpg In A Directory
As title really, does anyone know of (or could write?) a php file which
in a directory of .jpg files display the most recent added to that
/dir?

View Replies !
Takes The Rating And Displays A Corresponding Image.
I'm making a site where people can make posts which are then rated 1-5.  I want to write a php code that takes the rating and displays a corresponding image. I have written this:

function ratingImage($overallrating) {
if ($overallrating == 0){
echo "<img src="images
atingzero.jpg">";
}
elseif ($overallrating == 1){
echo "<img src="images
atingone.jpg">";
}
elseif ($overallrating == 2){
echo "<img src="images
atingtwo.jpg">";
}
elseif ($overallrating == 3){
echo "<img src="images
atingthree.jpg">";
}
elseif ($overallrating == 4){
echo "<img src="images
atingfour.jpg">";
}
elseif ($overallrating == 5){
echo "<img src="images
atingfive.jpg">";
}}
echo ratingImage($overallrating);

This codes works perfectly in safari, but when I view the page in firefox or netscape navigator, the images do not appear. Can anyone think of why this code would not work in these two browsers?

View Replies !
Generate A PDF And IE Displays A Blank Page. What Happens?
I have two server one is local and the one is the live server? for the pdf in local it display in IE and give me a good results, but when i test it online (live) the IE gave me blank?

Is this something on limit time?

View Replies !
How Can I Track Banner Displays On Another Site.
Hopefully someone can clue me into a solution (coding) to create a banner url that I can post on another site to track the number of times the banner is Displayed on that site.

Its pretty straight forward tracking 'clicks' and visitors as the hyperlink can be set up to count track and record visitors easily..

Question is.. what if the do NOT click on the link? I want to know if the banner link I posted is actually being viewed as many times as I am told they are... Same thing would apply to a banner exchange.. How do I know if my banner is being viewed on the other site.

Any suggestions on how I can build a link that displays the banners on another site and allows me to record how many times the banner was displayed?

View Replies !
Order By - Displays Numbers Before Letters
I have a database query that retuens the results correctly, but i need to do an order by clause. When i do this it displays numbers before letters, whereas i need to display letters then number e.g

Jobcard No Page No.
PRE001 page 1
PRE002 page 1
POS001 page 1
POS001 page 2
POS002 page 1
455101 page 1
455101 page 2
455101 page 3
567070 page 1 etc, etc, etc,

the field Jobcard No. is a Varchar i think i need to changed to asci and Order By that way.

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 !
Hitting The Back Button Displays Last Search
I have a website where people can perform searches. Once they find what they're looking for they can click the link and get more details on an item. The problem I'm having is that people read the details and then hit the back button. Here they get a message warning them how the browser needs to resubmit the data that was entered in the search form or they're sent back to the search page.

How can I cache the search terms or search results so if the person hits the back button they get the results of the previous search and not a message or are not sent back to the search page?

View Replies !
Get The Mysql Timestamp Converted To The Way Time() Displays It
I have a field in a mySQL table that is defined as timestamp. It auto updates itself whenever I do an update on the record. I want to be able to take the current time and compare it to the time in the record, and find out how much of a time difference exsits between the two in hours, mins, secs.

I'm currently using time() to get the current time, but it seems that the time returns things in a different format then timestamp stores in. If I can get the mysql timestamp converted to the way time() displays it, then I'd assume I could just do some division as the time() is in the # of seconds from some date in the 70s.. correct?

View Replies !
PHP Displays Parsing Error And Line Number
I know I got syntax error some where.  But php simply say "Errors parsing esearch.php".  It does not display line number or any kind of hint. I've also set the error reporting to display all error and E_PARSE in ph.ini I am using php 5.2 and command line to run.

View Replies !
Displays DBase Table Wrong Charset
I read an dBase table under Win XP by the common dBase functions of PHP 4.3.5. But all records are displayd with a wrong charset. All umlauts of the databasefile like .....

View Replies !
MCrypt (Decrypt) Displays Null Characters
When I use decrypt from MCrypt, in firefox, it displays a bunch of null characters at the end of my string. I've checked my records, and the strings are encrypted properly, so I am not sure why it is adding a series of nulls at the end of the string. e.g.

String is "hello"

Encrypts fine.

When I decrypt it, it shows "hello[][][][][][][][][][][]"

where [] is the null character.

Is there anyway to remove the null characters at the end of any decrypted string?

View Replies !
Maths :: Displays A Number That Is Rounded To Two Digits
I am having a little trouble. I have a php form that does some math, then displays a number that is rounded to two digits (x.xx) using this code.

<?php
printf ("%5.2f", $numbertoberounded);
?>

That part works fine, where I am running into trouble is when I try to store the rounded number in a new variable. Trying to figure it out on my own I tried

<?php
$newvariable = ("%5.2f", $numbertoberounded);
?>

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 !
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 !
Displays Email Addresses On The Screen And Saves Them To A File.
I have the following code that displays email addresses on the screen and saves them to a file. The problem is, depending on what flag I put for $fp, it either doesn't write or if it does it doesn't overwrite what's there, just appends it. What can I do about this?

Also, on the screen, it displays each record followed by a <br>. In the file, it just displays all the email addresses in a big block. PHP Code:

View Replies !
Creating A Form That Once Submitted Displays A Tabled Output
I have a form that I am trying to create that ideally will present a desired output based on the selections of the form.

The following is an example of the dataset I am pulling from:

I am trying to:

1. Have a drop-down selectable to select a start date.

2. Have another drop-down selectable to select a stop date.

3. Have radio buttons to select which datas I wish to view for the range set by steps 1 and 2. Example is nodes_available, nodes busy, one, both, or all.

4. Have the ability to select the interval of minute, hour, or day.

Once the form variables are selected, then it is submitted with the desired results displayed in a table on another page. Ideally this output will eventually find its output displayed in some type of graph form, but at the moment I am trying to atleast achieve the desired outcome.

View Replies !
Php Script That Displays A Form And Inserts Into Mysql Database
I am having trouble with this. I would like to combine a html form
and the php processing into one file and insert the info into mysql.

So a basic form which gets processed in the same script which also
inserts inot mysql whats the general syntax for that. does the php go
at the top or vise versa

View Replies !
Setting Default Value On Drop Down List - Displays Wrong Value
I have the following code segment, which is meant to show the drop down list with default option selected 'Any type'. It takes the other values from an array called $arr_proptype. Code:

View Replies !
Single Page Login That Displays The Contents Of A Directory
Im running into a problem, I have a single page login that displays the contents of a directory. Code:

View Replies !
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 Replies !
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 !
PHP Dynamic Drop Down Menus, Page Displays Diff Data Depending On Dropdown Selected.
I currently have two drop down menus the first one with countries and then the second one changes depending on which country is selected to display counties.

This works fine, now what I want to do is have it so when it county is selected it shows all the squash clubs that are in that county below the drop downs. Code:

View Replies !
Solution To How I Coded "nested Repeat Regions" Or Heirarchical Displays
the code below assumes 3 result sets:

rsAuthors - authors table
rsBooks - book table
rsBooksSummary - summary of book table, Count(bookid) grouped by authorID

It displays something like this:

Jim Smith
One who flew over the clock tower
The hunting game

Roger Smtih
Polly wants a cracker house
Today is the day
......

Code:

View Replies !
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.

View Replies !
Adjusting Time Displays For User's Local Time
I have a news/comment site where stories and comments are accompanied by the date they were posted. Currently I'm doing that in the GMT format, simply because it's easiest.

What I'd like to do, however, is have the page display posts and comments with "your time," i.e., the local time of the user (example of what I'm talking about here).

I know how to get local time variables from a user with javascript, but I'm not sure how to pass that information to PHP, especially since I'd like to do this on the front page, which means no passing javascript information via query strings.

View Replies !
Command-line Php Displays Code Instead Of Executing Code
I am using CLI PHP to run a PHP script, c:wampphpphp.exe, but
instead of executing my script, it's actually displaying the raw code
instead.

How can I run my code using CLI PHP? I installed WAMP5 on WinXP.

View Replies !
Browser Displays "No Input File Specified"
Why is it that my browser displays a "No input file specified" message? My code is to simply output a string in the browser using a simple function like the one below. Code:

View Replies !
Pulls An Image From A Database & Displays It In Print $image;
I have a routine that pulls an image from a database & displays it in print $image;

all works great however... Is there a way that i can set the size params of the image as when i set width & height is just returns a load of chars instead of the image itself.

View Replies !
Inserting Adsense Code - Html Program That Automatically Coverts All My Text Files To Html Webpages?
I've purchased a text to html program that automatically coverts all my text files to html webpages within a template, but the only problem is how do I insert my adsense code into all 250 pages? I've seen articles regarding PHP includes for page templates, but I'm not sure how this would work inserting my code.

View Replies !
PHP HTML Email Doesn't Format The Text Using The Html Tags
I had a PHP script that sent an html email from a Flash form. It was all working on a Windows based server. Then my server was switched to a Linux based one. It now sends the email, but has a lot of random characters and doesn't format the text using the html tags. Code:

View Replies !
Can't Get Apache To Run PHP Inside Html From Localhost - Works Fine From /var/ww/html
I had a look at the stantonfinley fedora core 5 instructions and robooted but to no avail. PHP scripts work fine from var/www/html whether the suffix is .php or .htm but not from localhost. Code:

View Replies !
HTML Email Using PHP Problem (Receive Html Tags)
When I send the html email, the only thing I receive is the tags (the
html codes basically). I want to be able to see the email like a html
page, what is wrong with my code? Here is a copy paste of it.

$HTML = "</html><body><img src='http://www.somewebsite.com/
someimage.jpg'></body></html>";

$headers = "From: $from
";
$headers .= "MIME-Version: 1.0
";
$boundary = uniqid("HTMLDEMO");
// Now we attach the HTML version

$headers .= "--$boundary
".
"Content-Type: text/html; charset=ISO-8859-1
".
"Content-Transfer-Encoding: base64

";

$headers .= chunk_split(base64_encode($HTML));

mail($to,$subject,"",$headers);

print "mail Sent<br>";

The email I receive has this as text:

</html><body><img src='http://www.somewebsite.com/someimage.jpg'></
body></html>

View Replies !
RemoveHandler .html .htm (parse Php In .html Files)
I want to parse php in .html files.

I put this in .htacces file:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

Its work, but some of my php aplications have urls:

www.mysite.com/this-is-page

without .html in the end

how to parse that? Which code I must use.

View Replies !

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