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.





Repeating My Background


i have a problem with repeating my background yet not haveing 2 images show. what is wrong in this code:

<style type="text/css">
<!--
html {
background-image: #FFFFFF url(http://www.runnerselite.com/images/linedown.jpg);
background-repeat: repeat-y;
background-position:0px 155px;}

body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
}
body {
background-image: transparent url(http://www.runnerselite.com/images/line.jpg);
background-repeat: repeat-y;
background-position:15px 0px;




View Complete Forum Thread with Replies

Related Forum Messages:
Repeating Box
I have this code which displays a cart on the righthand side of the page. Basically I want to take the cart and display a copy of it below the original.

I will eventually be editing this cart to show different information but I seem to be having problems with just copying the php code and pating an exact copy. I get the error:

Parse error: syntax error, unexpected $end in /home/bromi/public_html/ifooter.html on line 182

However line 182 is blank and is the last line of the code. Code:

View Replies !
Random $var Repeating.
I'm trying to pull random lines from text file and print them from calling a variable but everytime I call the variable it pritns the same thing. Here is the code:

<?php
$var = file("vars.txt");
$returns = array("", "");
$var = str_replace($returns, "", $var);
foreach ($var as $num=>$line) {
$var[$num] = strtolower("$line");
}
$n = sizeof($var ) - 1;
$var = $var[rand(1, $n)];

echo $var;
echo $var;
echo $var;
echo $var;
echo $var;
echo $var;

?>

This prints:

line3
line3
line3
line3
line3
line3

When I want it to print each line randomly, like:

line9
line2
line6
line2
line1
line6

Any changes you can see in that code?

View Replies !
Repeating Tables
I am trying to create a image gallery based on a tutorial found on http://www.php-mysql-tutorial.com/image-gallery/ and I need to put image, title and desc in seperate rows so they are aligned and not wonky if one has more text than the other but can not seem to get it. Code:

View Replies !
Repeating Table
In firefox the tables stack side by side until they reach the edge of the table they are nested in then they start a new row of tables on the next line. In IE the tables continue to populate 1 single line inspite of the fact that the user cannot see them. Code:

View Replies !
Repeating Regions
I have a table and I need to do have two repeated regions for it. I can only do one! And when I create two recordsets from the table, there's an error, and the browser loads only a blank screen. Is there a way to repeat two seperate recordsets if they pull from the same table?

View Replies !
Repeating A GD Image
I have a form that will be printing a barcode sticker XXX amount of times due to a form value on a previous page. How do I go about generating the image so many times based on the form value?

View Replies !
Repeating The Same Character
say $a='b'

Say I want $b = $a repeated 5 times. How do I do that without a for next loop? Is there a command for that?

View Replies !
A Repeating Command.
How would I make a line of code in php repeat while something == somethingelse?

View Replies !
Repeating A Function
I', just making some stupid stuff. So i have this forum where u submit, your name, and message. I then have another text box wich asks how many times to repeat. I then have my php script. Well the code wich echos the text i want it to repeat the echo intell it has done the amount of times the persin entereed.

View Replies !
Function Repeating When Called?
I have this function set to call when a form is successfully submitted. Basically it's supposed to display a confirmation/thanks message and the results of their form input. The problem is:

1. it's repeating itself in the display (See below for example)
2. I'm getting this 'invalid query' message for the 'while' function

Here's the function code:

View Replies !
Auto Repeating Script
I was wondering if there was anyway of running a external php script every 30 seconds pretty much infinitely. If possible without having to leave my computer on 24/7.

Any idea how I could do this?

View Replies !
Prevent Repeating Entries
I am recalling entries using WHERE... but I need to know how to prevent repeating entries. The best way to tell you what I'm talking about is to show you the site. www.capitalmemory.com :: on the left side choose "Dell" for instance...once you get to the next page where you choose system type, there are multiple listings for Dimension 2100. The reason being that the 2100 has 3 parts associated with it in the msql database (which you would see on the next page if you clicked "Go".....

View Replies !
Regex For Repeating Characters
I have a form for collecting user input. One user decides to type in:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Doing this messes up my page because it stretches the page too far, and it doesn't wrap.

Is it possible to use regex for detecting such repeating characters?

View Replies !
Foreach Repeating Second To Last Value, Omiting Last
My site is running PHP5 and I'm getting some weird behavior from my foreach loop. I have a form that users fill in data into text boxes and submit. An array is created from the text boxes(the print_r is below): Code:

View Replies !
Repeating Data In A Column
I am having problems repeating in the "Availability" column. The result which goes in the column is done in the math below the query so its not in the recordset. How would I get this information to repeat? Currently, it lists the same value as the first record called "Test Program". I have attached a photo to make it a little clearer.

<?php # /programs/index.php

// Connect to the MySQL server and database.
require_once('../mysql_connect.php');

// Query the database for user information.
$query_programs = "SELECT program_id, program_name, DATE_FORMAT(program_date, '%M %e, %Y at %l:%i %p') as convdate, program_coordinator, program_seats, program_registered FROM programs";
$programs = mysql_query($query_programs) OR die ('Cannot retrieve program information.');
$row_programs = mysql_fetch_array($programs);

$number1 = $row_programs['program_seats'];
$number2 = $row_programs['program_registered'];....

View Replies !
Forms With Repeating Fields
This is probably a simple question but as a newbie I just aren't sure the best way to do it. I'm developing a site with a shopping cart type feature, items added to the cart are inserted into a database and then I want to display the cart and allow the user to delete items or change the quantity of any items.

I could have each cart item within its own form with its own 'update' button but I'd like to just have one form for the whole cart and one 'update' button if possible so when the form is submitted it goes through each record on the form and deletes the records that have the delete checkbox checked and updates the records which have changed quantities. I'm just not sure how to achieve this - Do I need to get my code to dynamically name the form fields (eg. ProductID1, ProductID2 etc.) and then how do I get it to loop through my form records?

View Replies !
Sorting A Repeating Region
1. There is a list of products stored in mysql each with a unique auto increment ID
2. There is a repeating region (yes created in dreamweaver) don't hate! This repeating region is a simple div that repeats with each product in it's own div.

I've got some ideas on how to sort this. Which would anyone here recommend?

1. Create a sortID that the user can modify through a form
2. Create a drag and drop using PHP and AJAX

Or is there some other standard way to custom sort these products.

View Replies !
Repeating Stuff Except At The End Points
$myHobbits = array( 'frodo', 'bilbo', 'merry', 'pippin' );

I'd like generate the string:

"frodo, bilbo, merry, pippin"

One way of doing this would be:

$str = ''
foreach ( $myHobbits as $hobbit )
$str .= "$hobbit, ";

$str = rtrim( $str, ", " );

Does anyone know how to do this in less than 4 lines of code?

View Replies !
Repeating Records Question
I am trying to build a survey for my site. All items are stored in a mysql database.
Here is my php code:

View Replies !
Calendar Function Gets To 10-30 Then Keeps Repeating 10-30 ?
I need a function that takes the date and returns the week number of the year. For example you would pass the date 2005-06-19 and it would return 25. I started with a working calendar script and tried to tweak it to return the week number.

It worked for a while then for some unknow reason (i must have done something) it would start repeating the date 10-30. Here is what I have so far. Also note that the find date code is not in place here. Code:

View Replies !
Stop Category Repeating
I like to stop the categories from repeating here's my code:

foreach($categories as $name[1]=>$identity) {
$identity = trim($identity);
$name = explode("|", $identity);
$num = explode("|", $identity);
echo ("<a href="?cat=$num[0]">$name[1]</a>&nbsp;");

View Replies !
Repeating Random Links
this function takes random links out of a file, i am trying to figure out how to make the links not repeat itself. sometimes it displays the same link twice. Code:

function random_links($file, $display)
{
$filenaam = $file . '.txt'
$f = file($filenaam);
srand((double)microtime()*1000000);
for($c=0; $c<=$display; $c++)
{
$i = rand(0,count($f)-1);
list ($url, $desc) = split("|", $f[$i]);
$desc = rtrim($desc);
echo '<a href="'.$url.'">'.$desc.'</a><br>'
}
}

View Replies !
Dynamic List Items Repeating Themselves
I'm working on this online magazine, and each page (well, other than the front page) has a menu included on the right-hand side consisting of articles divided into three sections: articles, columns, reviews. For some reason, whenever I click on one of these article links, that link takes the place of the first link in the section. You can see what I mean here: PHP for the included right_menu.php PHP Code:

View Replies !
Looping/Repeating Part Of A Script
Can someone point me in the right direction either for the logic or maybe the function, here's what Im trying to do.

I would like a script to run a particular function "X" times based on what a user inputs via a form. So,

(excuse the coding, Im just trying to show what Id like it to do, I will fix it up later)....

View Replies !
Strange Inconsistences When Repeating A Query More Than Twice In A Row
Here is a small sample program I wrote in PHP (running off Apache
1.3.31 w/ PHP 5.0.1) to help illustrates problem I'm having. The data
base is using DB2 V5R3M0. The client is WinXP machine using the iSeries
Client Access Driver ver 10.00.04.00 to connect to the database.

The problem is that executing the exact same SQL select statement more
than twice int a row stops produces results. The first two instances
will always produce the correct results but after that it will simply
return with no results found. I've also wrote the exact same test case
with other various ODBC APIs with the same results.

I've examining the ODBC driver trace log and I am unable to find any
noticable differences between a SQL statement producing the correct
results and one that produces a no results found message. I've tried
three different ODBC driver versions and have the same results.

NOTE: This doesn't occur for EVERY select statement but it does occur
for different files with various WHERE clauses but I've been unable to
determine any relationship between working and non working repeating
select statements.

PHP SOURCE CODE:

View Replies !
Substr Function Keep Repeating Text
Hi everyone.The problem with my code is it keeps repeating the unwanted text when using the php substr() function.Hope you can help.Thanks in advance.

$text = "(blah blah blah 6sys6sys6s 784748574 blah blah blah 383u3y3u3i 838376444 blah blah blah )1 (blah blah blah 6sys6sys6s 784748574 blah blah blah 383u3y3u3i 838376444 blah blah blah )2 ";

$limit_text1 = substr("$text", 0, 50);
$limit_text2 = substr("$text", 51, 80);
$limit_text3 = substr("$text", 81, 110);
$limit_text4 = substr("$text", 111, 140);
$limit_text5 = substr("$text", 141, 170);
$limit_text6 = substr("$text", 171, 200);

if (strlen($text) <= 50)
{
echo "$limit_text1";
}

if (strlen($text) >= 51 AND strlen($text) <= 80)
{
echo "$limit_text1 <br> $limit_text2";
}

if (strlen($text) >= 81 AND strlen($text) <= 110)
{
echo "$limit_text1 <br> $limit_text2 <br> $limit_text3";
}

if (strlen($text) >= 111 AND strlen($text) <= 140)
{
echo "$limit_text1 <br> $limit_text2 <br> $limit_text3 <br> $limit_text4 ";
}

if (strlen($text) >= 141 AND strlen($text) <= 170)
{
echo "$limit_text1 <br> $limit_text2 <br> $limit_text3 <br> $limit_text4 <br> $limit_text5 ";
}

if (strlen($text) >= 171 AND strlen($text) <= 200)
{
echo "$limit_text1 <br> $limit_text2 <br> $limit_text3 <br> $limit_text4 <br> $limit_text5 <br> $limit_text6 ";
}

View Replies !
MySQL Query Without Repeating Same Data
Each piece of data in my table has a category field associated with it, making multiple items with the same categories. I want to create a MySQL query that will only grab the different categories associated with the data in the table. Code:

View Replies !
Simplifying Repeating Database Connections In A Class?
I wrote my first PHP class today. Yeah!
But to get it to work, in each function within the class I have to
repeat the database connection lines, and that just seems redundant;
there has to be a better way that I'm just not bright enough to think
of.

(It's the first 3 lines of each of the two functions below. When I have
it fully written, there will be about 10 similar functions, each
repeating those three lines.)

class e_test {

function gettech() {
include('../Connections/userDBconnect.php');
$db = mysql_select_db("printing", $connection) or $error .= "Could
not select database1: " . mysql_error()."<p />";
$dbconn = $connection;
// CREATE TECH ARRAY
$sql_T = "SELECT email FROM tbl_users WHERE dept = &#391;' AND
active=&#391;'";
$result_T = @mysql_query($sql_T, $dbconn) or $error .= "Could not
query1: " . mysql_error()."<p />";
$count_T = mysql_num_rows($result_T) or $error .= "Could not select
query2: " . mysql_error()."<p />";
$i_T = 0;
while ($row_T = mysql_fetch_array($result_T)) {
$email_T = $row_T[email];
$techs .= $email_T;
$i_T++;
if ($i_T < $count_T) {
$techs .= ",";
}
}
echo $error;
return $techs;
}

View Replies !
In Background
Here's my situation. I'm creating a website (basically a store) and in the admin section users will want to download zip files of images or products added in the last 7 days, last 2 weeks and the last month.

I have scripted a cron to run every 24 hours to zip all the images and this process takes over 1 minute (there's over 6,000 images!!) and the size of this is 250MB. This has now taken me to my quota on my webspace of 500MB (including all the individual images)

I have decided the only way to do this is dynamically create the zip when the user requests it. As PHP times out after 30 seconds it needs to do it's stuff in the background and display a message saying something like' We'll email you with the zip file in 5 minutes or so'.

View Replies !
Run In The Background?
I have a script on my website that takes a long time to run, and it's slowing down my pages. Theres nothing I can do about the wait time on the file.

Is there a way to use include or fopen or anything along those lines, to have it execute my file in the background; without having the file that's executing it waiting for it to finish its thing? Or to have the expected output redirected to another file (as mentioned in http://ca3.php.net/manual/en/function.exec.php)?

View Replies !
Running Background Job...
Is it possible to get a php3 script to check what day it is, and then do some stuff, If it’s let’s say Monday?
This without you doing anything. Like a background - or cronjob…
I guess you would use perl or something to do this, but that is not an option I have.

View Replies !
Background Processing
What is the technique you use for background processing? Like when user submit a task, the user could then wait for the result by email or through a result page.

I'm wondering how would they do that?

View Replies !
Background Color
I am totally baffled by what is happening in my code. I have a section
of code (shown below with two comment lines inserted). They are
essentially identical text boxes (names and variables different). Yet,
the first comes up with a white background and the second comes up with
a yellow/gold background....

View Replies !
Run Process In Background
I want to run process from my php script in background.
I try different functions from functions list but all of them whaiting for
process ending. How can I run `wget -b ...` and finish my script, but wget must still working? I use PHP5, Linux, Apache2.

View Replies !
Background Processes
I'd like to know how to send an external process to the background, so that I can run multiple instances of the same process at one time. Any tips, links.. etc?

View Replies !
Php Running In The Background?
In order to run a php script - do I need to access it via a browser? Is there a way to write a php script and let it run from the shell in the background?

View Replies !
Running Php In The Background
I am trying to run a php executable (GTK) from a browser... now exec() does the job, but the browser hangs waiting for the .exe I have just called to finish, I assume so it can 'report back' to exec(),

any ideas how I can get around this ? - I have tried backticks,passthru,system,exec - all with the same results, i.e. they all expect a returned value and sit around waiting for it. This is a windows app so /dev/null wont help & it is not a CGI with output I can dump anyway.

View Replies !
Run A Php In The Background Using Http
i have a script (script1) which needs to call another script (script2).
It should not wait for the answer, so script2 should run in the background.

I really need to call the php script using:
http://urlof myscript/script2.php

I don't want to use it as a cgi and use CLI.

I did a test with fsockopen and curl and a timeout of 10 seconds and call
http://urlof myscript/script1.php from my browser:
Script1 stops after 10 seconds => OK
Script2 has been called by script1 and continue to run in the background
=>OK
After 60 seconds Script2 is killed by php!! => KO :(

The script is working fine if i call http://urlof myscript/script2.php from
my browser. It needs around 120 seconds to finish.

Why is it stopping after 60 seconds when I use fsockopen and call it from
script1?

Here is the script in SCRIPT1:
$fp = fsockopen("$host", 80, $errno, $errstr, 30);
stream_set_timeout($fp,10);
if (!$fp) {
echo "$errstr ($errno)<br />
";
} else {
$out = "GET $path HTTP/1.1
";
$out .= "Host: $host
";
$out .= "Connection: Close

";

fwrite($fp, $out);
$status = socket_get_status($fp);

while (!feof($fp) && !$status['timed_out']) {
echo fgets($fp, 128);
$status = socket_get_status($fp);
}
fclose($fp);
}

I have added this in SCRIPT2:
ignore_user_abort(FALSE); // becareful, FALSE really means it should ignore
user abort !!!
set_time_limit (120);
ini_set("max_input_time",120);
ini_set("max_execution_time",120);

Do you have any idea?

View Replies !
Background Refresh
I am using php_move_file to upload some files to the server. I want to
be able to support large files. But the Apache settings is that after
90 sec. the connections resets. This becomes a problem with large
files (slow links). Is there anyway to write a script that would
refresh in the background....

View Replies !
A Way To Get Current Background?
I have several websites running on a global script. Some pages, the backgrounds black, other, white. Sometimes people have the taste of posting black font on a black background, or white font on a white background.

What I wanted is to know if theres a way to 'check' the current background color? Because I can then add in the script to 'change' any incorrect colors before posting. I'm not sure if theres a way for PHP to tap into CSS and check, but it would be alot easier to change the global script since its *Checking* for the background color rather then me do it per site and change it manually.

View Replies !
Background Redirection
I need to create a redirection from a php page to another, without having a web browser opened.

Imagine that you make a php starting via command line or cron job, then your php is running in background and no web browser is open on it. How can this php (from the background, with no web browser opened) call (trigger) another php? please note that I'm not talking about include.

I need that the background php gives control to ANOTHER php url . per what I tested the php 'header' command does not work and obviously also any javascript redirection cannot work because there is no web browser opened. so, finally, how can that php running in background call another php url?

View Replies !
Using SWF Files As Background
Im not sure if it posilbe, but im trying to get a SWF file as the background of my page, but the swf file is dynamically named.  Its like a gallery and when a user clicks on the lick to that file, it displays the image /swf.  but i want the file to appear as the background. code:

echo "<body background = '".$POST['file_name']."'>";

ii have 3 files so far.  file1, 2, 3 .swf.  and i can easily view each one as a seperate file, and they work once i embed them as images. is this my php code, or do i have to look at my browser to display the swf as BG..?

View Replies !
Background Running
I have a php script. It basically fetches data from MySql DB, processes it, and updates the results back in the Database. There are some 18k rows in the DB. The processing involves querying some remote servers.

What is the MOST efficient method to run the script in background ?

View Replies !
Random Background In PHP
Not sure if this can be done in PHP but I'm looking at giving users an option to choose a background image from a list ie when they click on a url it changes. If you click on the links to change of scene on the left hand column, you'll hopefully see what I mean.

Can this be done in PHP? I've tried googling it, searching on various forums but can't seem to find anything..

View Replies !
Background Tasks
I'm using some weather rss feeds in a web site. The feeds are updated once every hour and cached in a local file. My problem is that every time the weather report is updating I get a long wait (not that long.. 2 or 3 secs) before the page is displayed.

This happens becauses the teplate engine that parses the page is waiting for the weather section to be parsed and cached. Is there a ay I can start the weather parsing as a background thread and return immediatly to the template engine to continue to parse the page? And if so How?

View Replies !
Background Image
i created a calendar in php. i have this calendar displayed on another php page (index.php).

i added a background image to the calendar. it displays fine on the calendar alone but it won't display as a background image when i display it on index.php.

View Replies !
Run PHP-Script In Background
I am using php 5.0.4 under IIS 6 under Windows Server 2003 and want to
run a php-script as a separate process. This schript dies not have any
output. I tried several variants without success:

exec("c/php5/php.exe path/to/script parameters &") will run the schript
but will wait until the schript finished processing.

exec("c/php5/php.exe path/to/script parameters > null &") gives me the
error message "The specified CGI application exceeded the allowed time
for processing. The server has deleted the process."

Dealing with other variants of php cli procesors like php-win.exe gave
the same result. Also trying to use the start command did not help. My
head is burned out, what else could run my script under this
environment?

View Replies !
Transparent Background
i'll try to explain myself the best i can, here is the problem:

i have a html page and inside this i want to put an iframe that contains a php page. That's ok, i can do it and it works, but the problem is that i can't make that php document to have transparent background.

it turns white. Is it because of the iframe? the php document has transparent background, but when i see it inside the iframe it doesn't work.

View Replies !
Sleep() In The Background
how much the sleep() which is set to no limit can consume the system resource. Could it cause to hang the server? I tried the following and couldnot see the server got busy. Although the browser seemed to be so, if I access to a different page, it responded very quick as usual. It's not a big deal, is it? sleep.php PHP Code:

<?php
set_time_limit(0);
sleep(0);
?>

fork_sleep.php

PHP Code:

<?php
$str = "php -f sleep.php";
exec("$str > /dev/null &");
?>

View Replies !
Set Background Color
I am designing with flash and am sending variables on the end of a url to a php document which also contains a swf - I want to tell the php file what color to make the background in the html section I have:-

<body bgcolor="<?php echo $bgcol">>

I've tried moving the quote marks around but nothing seems to work - I also use php in the title and that is working fine - is it because it is inside a tag or something or do I have the wrong syntax?

View Replies !
Execution In The Background
I want a php script to be executed in the background when the admin presses a button in an application which is running on a Linux environment. This page execution will take a long time(Maybe 16 hours).

There I want the window in which the administrator presses the button to display logs of the background executing script after this script has been started. How do you go about acheiving this?

View Replies !
Background Process
I would like to create a script that acts like a background process. Basically once every hour, it will access a website, gather data from it, and write that data to a file on a remote server. The PHP code would be running on this same server. Is this type of non user activated, constantly running code possible?

View Replies !

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