[PHP] Php and CSS where to put it

2009-01-12 Thread Terion Miller
I have this code and the css seems to not work in IE at all, do I need to
put it somewhere different on the page maybe?

link rel=stylesheet type=text/css href=inc/styles.css
?php  include 'inc/dbconnOpen.php' ;

ini_set('error_reporting', E_ALL);
ini_set('display_errors', true);

 $sql = SELECT * FROM `textads` WHERE `expos`  xCount ORDER BY RAND()
LIMIT 3;
$result = mysql_query($sql);

echo 
table class=jobfont width=728 height=90 border=0 align=center
cellpadding=10 bordercolor=#66 background= 'inc/bg.gif' bgcolor=#CC
tr
td
table width=690 height=50 border=0 align=center cellpadding=5
tr;

while ($row = mysql_fetch_array($result)) {
echo 
td  class=col align=center
width=33%{$row['title']}br{$row['blurb']}br
A HREF='{$row['href']}'{$row['href']}/a/td;
//Add to exposure count
$views = $row['xCount'] + 1;
mysql_query(UPDATE `textads` SET `xCount` = '{$views}' WHERE `ID` =
'{$row['ID']}');
}

echo  /tr
/table/td/tr/table;

?


Re: [PHP] Php and CSS where to put it

2009-01-12 Thread Stephen

Terion Miller wrote:

I have this code and the css seems to not work in IE at all, do I need to
put it somewhere different on the page maybe?

link rel=stylesheet type=text/css href=inc/styles.css
?php  include 'inc/dbconnOpen.php' ;

  

I don't see the html headers. Nor a body.

Get that fixed and see what happens.

Stephen


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php and CSS where to put it

2009-01-12 Thread VamVan
-- link rel=stylesheet type=text/css href=inc/styles.css

link rel=stylesheet type=text/css href=inc/styles.css should be
placed in between head/head

Thanks,
V


[PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Alain Roger
Hi,

is there a way how a PHP class can attach JS (javascript) and CSS documents
to current web page in which the class is instanced ?
till now i used an echo which write a script/script code into
current document.
in this javascript, i used to have a createElement function to attache
C\other CSS or JS file.

it's not so clean and maybe a better possibility exists. Thanks to let me
know.

-- 
Alain
---
Windows XP x64 SP2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008


Re: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Ashley Sheridan
On Sun, 2008-11-30 at 14:23 +0100, Alain Roger wrote:
 Hi,
 
 is there a way how a PHP class can attach JS (javascript) and CSS documents
 to current web page in which the class is instanced ?
 till now i used an echo which write a script/script code into
 current document.
 in this javascript, i used to have a createElement function to attache
 C\other CSS or JS file.
 
 it's not so clean and maybe a better possibility exists. Thanks to let me
 know.
 
Can you not just write all of the CSS/Javascript that you need right
from the get-go in the same place you're writing out your Javascript
now?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Alain Roger
In fact my class has for purpose to be used in several projects and
therefore, to write the css/js files from the web page using the class would
be a mistake in the way that could not be redistributed without missing
those files.

On Sun, Nov 30, 2008 at 2:55 PM, Ashley Sheridan
[EMAIL PROTECTED]wrote:

 On Sun, 2008-11-30 at 14:23 +0100, Alain Roger wrote:
  Hi,
 
  is there a way how a PHP class can attach JS (javascript) and CSS
 documents
  to current web page in which the class is instanced ?
  till now i used an echo which write a script/script code into
  current document.
  in this javascript, i used to have a createElement function to attache
  C\other CSS or JS file.
 
  it's not so clean and maybe a better possibility exists. Thanks to let me
  know.
 
 Can you not just write all of the CSS/Javascript that you need right
 from the get-go in the same place you're writing out your Javascript
 now?


 Ash
 www.ashleysheridan.co.uk




-- 
Alain
---
Windows XP x64 SP2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008


Re: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Ashley Sheridan
On Sun, 2008-11-30 at 14:55 +0100, Alain Roger wrote:
 In fact my class has for purpose to be used in several projects and
 therefore, to write the css/js files from the web page using the class
 would be a mistake in the way that could not be redistributed without
 missing those files.
 
 On Sun, Nov 30, 2008 at 2:55 PM, Ashley Sheridan
 [EMAIL PROTECTED] wrote:
 On Sun, 2008-11-30 at 14:23 +0100, Alain Roger wrote:
  Hi,
 
  is there a way how a PHP class can attach JS (javascript)
 and CSS documents
  to current web page in which the class is instanced ?
  till now i used an echo which write a script/script
 code into
  current document.
  in this javascript, i used to have a createElement function
 to attache
  C\other CSS or JS file.
 
  it's not so clean and maybe a better possibility exists.
 Thanks to let me
  know.
 
 
 Can you not just write all of the CSS/Javascript that you need
 right
 from the get-go in the same place you're writing out your
 Javascript
 now?
 
 
 Ash
 www.ashleysheridan.co.uk
 
 
 
 
 -- 
 Alain
 ---
 Windows XP x64 SP2
 PostgreSQL 8.3.5 / MS SQL server 2005
 Apache 2.2.10
 PHP 5.2.6
 C# 2005-2008
I'm not sure I follow you then. You say you want your class to be able
to include those files, then you say that you don't want to.

Have you considered having PHP check for the existence of the files
you're trying to include before outputting the HTML that includes them?

Also, if you are outputting Javascript code that then uses a
createElement to include more code, how does the Javascript know it can
include the files if they don't exist for every installation?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Alain Roger

 
  Can you not just write all of the CSS/Javascript that you need
  right
  from the get-go in the same place you're writing out your
  Javascript
  now?
 
 
 I'm not sure I follow you then. You say you want your class to be able
 to include those files, then you say that you don't want to.

 Have you considered having PHP check for the existence of the files
 you're trying to include before outputting the HTML that includes them?

 Also, if you are outputting Javascript code that then uses a
 createElement to include more code, how does the Javascript know it can
 include the files if they don't exist for every installation?


so we for sure misunderstood eachother :-)
let's say i have an index.php page in which i create an instance of my class
CTable.
to do that i need to include the CTable.php file into my index.php (till now
no problem)
for that : include_once 'Class/CTable.php';

in the CTable.php file i have my class definition and implementation as
following:
class CTable
{
  blah blah...
}

my CTable class has a Render function which will write html code into the
current index.php page.
within this code should be written some javascript command as also some css
classnames.

till now no problem.

the problem is that in this code (that write my class) into index.php there
are some javascrip command and css classnames, which are linked to external
(in the Class directory) files CTable.js and CTable.css.
those 2 files should be loaded by the class CTable itself...and this is what
i do using echo and createElement.
it works well but it is not clean from my point of view...that's why i was
looking for another solution...more... let say professional.

A.


Re: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Ashley Sheridan
On Sun, 2008-11-30 at 15:08 +0100, Alain Roger wrote:
 
  
   Can you not just write all of the CSS/Javascript that you need
   right
   from the get-go in the same place you're writing out your
   Javascript
   now?
  
  
  I'm not sure I follow you then. You say you want your class to be able
  to include those files, then you say that you don't want to.
 
  Have you considered having PHP check for the existence of the files
  you're trying to include before outputting the HTML that includes them?
 
  Also, if you are outputting Javascript code that then uses a
  createElement to include more code, how does the Javascript know it can
  include the files if they don't exist for every installation?
 
 
 so we for sure misunderstood eachother :-)
 let's say i have an index.php page in which i create an instance of my class
 CTable.
 to do that i need to include the CTable.php file into my index.php (till now
 no problem)
 for that : include_once 'Class/CTable.php';
 
 in the CTable.php file i have my class definition and implementation as
 following:
 class CTable
 {
   blah blah...
 }
 
 my CTable class has a Render function which will write html code into the
 current index.php page.
 within this code should be written some javascript command as also some css
 classnames.
 
 till now no problem.
 
 the problem is that in this code (that write my class) into index.php there
 are some javascrip command and css classnames, which are linked to external
 (in the Class directory) files CTable.js and CTable.css.
 those 2 files should be loaded by the class CTable itself...and this is what
 i do using echo and createElement.
 it works well but it is not clean from my point of view...that's why i was
 looking for another solution...more... let say professional.
 
 A.
I still don't see the problem then with having some output that looks
like this:

print EOS
script language=javascript type=text/javascript
href=CTable.js/script
link rel=stylesheet type=text/css href=CTable.css/
EOS;

(there should be 4 lines of code there, but line-breaks crept in!)


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Alain Roger
you're right if you want to write them directly in the index.php.
but in my case i want the class to do it by itself.

On Sun, Nov 30, 2008 at 3:49 PM, Ashley Sheridan
[EMAIL PROTECTED]wrote:

 On Sun, 2008-11-30 at 15:08 +0100, Alain Roger wrote:
  
   
Can you not just write all of the CSS/Javascript that you
 need
right
from the get-go in the same place you're writing out your
Javascript
now?
   
   
   I'm not sure I follow you then. You say you want your class to be able
   to include those files, then you say that you don't want to.
  
   Have you considered having PHP check for the existence of the files
   you're trying to include before outputting the HTML that includes them?
  
   Also, if you are outputting Javascript code that then uses a
   createElement to include more code, how does the Javascript know it can
   include the files if they don't exist for every installation?
  
  
  so we for sure misunderstood eachother :-)
  let's say i have an index.php page in which i create an instance of my
 class
  CTable.
  to do that i need to include the CTable.php file into my index.php (till
 now
  no problem)
  for that : include_once 'Class/CTable.php';
 
  in the CTable.php file i have my class definition and implementation as
  following:
  class CTable
  {
blah blah...
  }
 
  my CTable class has a Render function which will write html code into the
  current index.php page.
  within this code should be written some javascript command as also some
 css
  classnames.
 
  till now no problem.
 
  the problem is that in this code (that write my class) into index.php
 there
  are some javascrip command and css classnames, which are linked to
 external
  (in the Class directory) files CTable.js and CTable.css.
  those 2 files should be loaded by the class CTable itself...and this is
 what
  i do using echo and createElement.
  it works well but it is not clean from my point of view...that's why i
 was
  looking for another solution...more... let say professional.
 
  A.
 I still don't see the problem then with having some output that looks
 like this:

 print EOS
 script language=javascript type=text/javascript
 href=CTable.js/script
 link rel=stylesheet type=text/css href=CTable.css/
 EOS;

 (there should be 4 lines of code there, but line-breaks crept in!)


 Ash
 www.ashleysheridan.co.uk




-- 
Alain
---
Windows XP x64 SP2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008


RE: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Alex Chamberlain
Have you considered using some type of templating system, which can use
class_exists??

Alex

No virus found in this outgoing message. Scanned by AVG Free 8.0
Checked by AVG - http://www.avg.com 
Version: 8.0.176 / Virus Database: 270.9.11/1820 - Release Date: 29/11/2008
18:52


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP attaching css and JS files to current page

2008-11-30 Thread Eric Butera
On Sun, Nov 30, 2008 at 8:23 AM, Alain Roger [EMAIL PROTECTED] wrote:
 Hi,

 is there a way how a PHP class can attach JS (javascript) and CSS documents
 to current web page in which the class is instanced ?
 till now i used an echo which write a script/script code into
 current document.
 in this javascript, i used to have a createElement function to attache
 C\other CSS or JS file.

 it's not so clean and maybe a better possibility exists. Thanks to let me
 know.

 --
 Alain
 ---
 Windows XP x64 SP2
 PostgreSQL 8.3.5 / MS SQL server 2005
 Apache 2.2.10
 PHP 5.2.6
 C# 2005-2008


I've created a few helper classes that I use on projects for this
problem.  What I do is have a directory that I put css and js files
into.  Then I have a main page class that has various sub-classes
for things like css  javascript.  Inside of a controller or view if I
have some code that needs to include a js/css file all they have to do
is something like this:

$page = page::getInstance();
$page-css-add('css.css')-add('css2.css');
$page-js-add('file.js')-add('file2.js')

By calling the add() methods page maps to that the specific js and css
directories.

Then in my main site wrapper template I call upon page again to render
out any css/js files that had been included.  This way my design has
no idea of what js/css that needs to be included and anywhere along
the execution path of my code I can add css/js.

This also allows for some speed increases in page load since you can
get your css included in the header while delaying script includes
until way down in the body.  This prevents browsers from blocking
while compiling your scripts and the user sees something a lot faster.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP/Dreamweaver CSS issue

2006-04-04 Thread Jay Blanchard
[snip]
I am trying to modularize a Web Page using one of Dremweaver's CSSes.

It works in Firefox but it falls about in IE.

Is IE at fault or the modularization?
[/snip]

Since it is a CSS issue it is likely IE. I will refer you to a CSS
mailing list at css-d@lists.css-discuss.org since this is not a PHP
question. They will want more information than you provided here, such
as an example or link to the page that doesn't work.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP/Dreamweaver CSS issue

2006-04-03 Thread The Doctor
I am trying to modularize a Web Page using one of Dremweaver's CSSes.

It works in Firefox but it falls about in IE.

Is IE at fault or the modularization?

-- 
Member - Liberal International  
This is [EMAIL PROTECTED]   Ici [EMAIL PROTECTED]
God Queen and country! Beware Anti-Christ rising!
Canada's New CONservatives - Same old Tory.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP/Dreamweaver CSS issue

2006-04-03 Thread Peter Hoskin

Lack of information means no answer for you.

More to the point, this is a CSS question... not a PHP one. There is a 
difference.


The Doctor wrote:

I am trying to modularize a Web Page using one of Dremweaver's CSSes.

It works in Firefox but it falls about in IE.

Is IE at fault or the modularization?

  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php and CSS

2004-06-14 Thread Bruno Santos
Hello all.

Im deleloping some PHP pages for school work, and now, im trying to put 
the pages nice, with some colors and images, etc...

I found a problem regarding CSS and PHP
The same page, with html extension, it works fine, but when the page 
becames with php extension, the CSS just dont work..

Someone has any idea why this is happening ??
Cheers
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php and CSS

2004-06-14 Thread Robert Sossomon
Bruno,

Drop some code our way, it's just a guessing game for me without it.

Robert

-Original Message-
From: Bruno Santos [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 3:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php and CSS


Hello all.



Im deleloping some PHP pages for school work, and now, im trying to put 
the pages nice, with some colors and images, etc...

I found a problem regarding CSS and PHP

The same page, with html extension, it works fine, but when the page 
becames with php extension, the CSS just dont work..

Someone has any idea why this is happening ??


Cheers

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php and CSS

2004-06-14 Thread Bruno Santos
Robert Sossomon wrote:
Bruno,
Drop some code our way, it's just a guessing game for me without it.
Robert
-Original Message-
From: Bruno Santos [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 3:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php and CSS

Hello all.

Im deleloping some PHP pages for school work, and now, im trying to put 
the pages nice, with some colors and images, etc...

I found a problem regarding CSS and PHP
The same page, with html extension, it works fine, but when the page 
becames with php extension, the CSS just dont work..

Someone has any idea why this is happening ??
Cheers
Well, here is it:
?php
require ('funcoes.php');
/*
Página de Ajuda. Apartir desta pagina, acede-se a ajuda
que e pedida pelo utilizador.
Os ficheiros de ajuda estao numa pasta chamada help, e sao txt.
*/
?
html
headtitleAjuda/title
LINK rel=StyleSheet type=text/css href=ajuda.css
/head
body
?php
	if (isset ($_GET['idhlp'])) {
		//abrir o ficheiro
		$fileName = HELP.'/'.$_GET['idhlp'].'.txt';
	
		$fp = fopen ($fileName,'r'); //abrir ficheiro de ajuda
		
		/*
		$contents = fread ($fp, filesize ($fileName));
		fclose ($fp); */
	
		//por questoes de seguranca, vamos retirar as tags html do ficheiro
		//$contents = strip_tags ($contents);
		//imprimir o html
			
		$titulo = fgets ($fp,1024);
		echo 'table widht=100%';
		echo 'tr';
			echo 'td class=titulo'.$titulo.'/td';
		echo '/tr';
		echo 'trtd';
		while (!feof($fp)) {
			$buffer = fgets ($fp,1024);
			echo $buffer;
		}
		echo '/td/tr';
		echo 'trtdinput type=button value=fechar 
onclick=window.close()';
		echo '/table';
	}
	else {
	Header(Location: index.php);
	}
	echo '/body/html';
?

has some coments in Portuguese, but, the essential is the first lines. 
I've always done this way, and always has work... till now... =:(

Cheers
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php and CSS

2004-06-14 Thread Robert Sossomon

-Original Message-
From: Bruno Santos [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 4:04 PM
To: Robert Sossomon
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] php and CSS


Robert Sossomon wrote:
 Bruno,
 
 Drop some code our way, it's just a guessing game for me without it.
 
 Robert
 
 -Original Message-
 From: Bruno Santos [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 14, 2004 3:28 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php and CSS
 
 
 Hello all.
 
 
 
 Im deleloping some PHP pages for school work, and now, im trying to 
 put
 the pages nice, with some colors and images, etc...
 
 I found a problem regarding CSS and PHP
 
 The same page, with html extension, it works fine, but when the page
 becames with php extension, the CSS just dont work..
 
 Someone has any idea why this is happening ??
 
 
 Cheers
 

Well, here is it:

?php
require ('funcoes.php');
/*
Página de Ajuda. Apartir desta pagina, acede-se a ajuda
que e pedida pelo utilizador.
Os ficheiros de ajuda estao numa pasta chamada help, e
sao txt.
*/
?
html
headtitleAjuda/title
LINK rel=StyleSheet type=text/css href=ajuda.css
/head
body  
?php

if (isset ($_GET['idhlp'])) {
//abrir o ficheiro
$fileName = HELP.'/'.$_GET['idhlp'].'.txt';

$fp = fopen ($fileName,'r'); //abrir ficheiro de ajuda

/*
$contents = fread ($fp, filesize ($fileName));
fclose ($fp); */

//por questoes de seguranca, vamos retirar as tags html
do ficheiro
//$contents = strip_tags ($contents);
//imprimir o html

$titulo = fgets ($fp,1024);
echo 'table widht=100%';
echo 'tr';
echo 'td class=titulo'.$titulo.'/td';
echo '/tr';
echo 'trtd';
while (!feof($fp)) {
$buffer = fgets ($fp,1024);
echo $buffer;
}
echo '/td/tr';
echo 'trtdinput type=button value=fechar 
onclick=window.close()';
echo '/table';
}
else {
Header(Location: index.php);
}
echo '/body/html';
?

has some coments in Portuguese, but, the essential is the first lines. 
I've always done this way, and always has work... till now... =:(

Cheers

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php and CSS level 2

2004-03-20 Thread Andy B
was just wondering if php will work inside a CSS level 2 style sheet?? for example:

?php ?
style type=text/css
?php
if(!empty($name)){ ?
input#name {
display: none }
?php } else { ?
input#name {
font-family: Arial, serif;
font-size: 12pt;
color: blue;
background-color: transparent;
. }
?php } ?

/*rest of style sheet */
/style

if this will work i was wondering 2 things:

1. how would i have to set it up to work right with the style sheet with php in it to 
work as a seperate file from the html file
and
2. how would i set the style sheet up to work inside the original html/php file that 
contained the original html code...





[PHP] PHP, HTML, CSS and a lot of problems

2003-11-17 Thread Bjrn Berg
I have written a short script in PHP that parses an HTML template and replaces Blocks (looks-like special HTML Tags) with information fetched from a Mysql database.

The problem I have is that the HTML template includes several Javascripts and CSS definitions, looks like that:

link rel=stylesheet type=text/css href=default.css
style type=text/css@import url(default.css);/style
I do not understand why the browser cannot interpret it after it is parsed through the PHP script. A link relation to a favicon works without problems and is displayed in the browser URL.

Does anybody know how to get it running?

Regards,
Björn
--
Die größte aller Schwächen ist, zu fürchten,
schwach zu erscheinen. (Jacques Benigne Bossuet)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP, HTML, CSS and a lot of problems

2003-11-17 Thread David T-G
Björn --

...and then Björn Berg said...
% 
% I have written a short script in PHP that parses an HTML template and 
% replaces Blocks (looks-like special HTML Tags) with information fetched 
% from a Mysql database.

Sounds neat.


% 
% The problem I have is that the HTML template includes several Javascripts 
% and CSS definitions, looks like that:
% 
% link rel=stylesheet type=text/css href=default.css
% style type=text/css@import url(default.css);/style

Seems straightforward enough.


% 
% I do not understand why the browser cannot interpret it after it is parsed 

Well, how does it look?


% through the PHP script. A link relation to a favicon works without problems 
% and is displayed in the browser URL.
% 
% Does anybody know how to get it running?

Not until you show us some code and some before-and-after.  We're not
mind readers, you know :-)


% 
% Regards,
% Björn


HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] PHP, HTML, CSS and a lot of problems

2003-11-17 Thread Bjrn Berg
David T-G wrote:

% through the PHP script. A link relation to a favicon works without problems 
% and is displayed in the browser URL.
% 
% Does anybody know how to get it running?

Not until you show us some code and some before-and-after.  We're not
mind readers, you know :-)
 

Yes you are right. But mind readers would do things quite more easier 
*fg*. So I send the script and the abbrevitiated output to this ML.
The script is attached and the source output from browser comes here:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/transitional.dtd;
html
head
titleanubisnet / Products / dBASE Reader/title
meta name=author content=Bjoern Berg, [EMAIL PROTECTED]
meta name=description content=anubisnet is a free group of developers and contributors, who develop portable
software for Linux, Windows and MacOS and most other operating systems. Our goal is to keep the source code as 
platform and operating system independent as possible.
meta name=keywords content=Freeware,download,Linux,Windows,Mac,RISC,CISC,Intel,dbase,visual
dbase,dbf,dbase III,dbase 3,Borland Database Engine,dbase konvertierung,dbase.com,dBASE Plus,dBASE
SE,dQuery,Rapid Application Development,dB2K,Oracle,Microsoft SQL Server,IBM DB2,anubisnet	
link rel=shortcut icon href=http://anubisnet.sf.net/pics/favicon.ico;
!-- new style definition --
link rel=stylesheet type=text/css href=default.css
style type=text/css@import url(default.css);/style
!-- JavaScripts --
script language=javascript src=interactive_img.js
/script
/head
body

[snipped]

Regards,
Björn
--
Die größte aller Schwächen ist, zu fürchten,
schwach zu erscheinen. (Jacques Benigne Bossuet)


showsite.php
Description: Zip archive
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP with CSS

2002-06-30 Thread Bruce Karstedt

Quick question?

Is their anything in Apache or PHP that would keep styles from working. Both
external (CSS) and inline styles are ignored.

Environment :

Win XP Pro
Apache 2.0.39
PHP 4.2.1

Writing  Debugging on Homesite 4.0.1

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP with CSS

2002-06-30 Thread Martin Towell

if in-line styles aren't working (and you can see them when you do a view
source) then it's nothing to do with apache.

(unless there's a header() command I don't know about that stops them from
working...)

Martin

-Original Message-
From: Bruce Karstedt [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 2:32 PM
To: PHP - General List (E-mail)
Subject: [PHP] PHP with CSS


Quick question?

Is their anything in Apache or PHP that would keep styles from working. Both
external (CSS) and inline styles are ignored.

Environment :

Win XP Pro
Apache 2.0.39
PHP 4.2.1

Writing  Debugging on Homesite 4.0.1

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP with CSS

2002-06-30 Thread Peter

Bruce...

there is nothing stopping it from working unless they are turned off in the browser's 
settings... just be mindful that CSS works slightly differently in netscape to ie..

-Original Message-
From: Bruce Karstedt [mailto:[EMAIL PROTECTED]]
Sent: Monday, 1 July 2002 2:32 PM
To: PHP - General List (E-mail)
Subject: [PHP] PHP with CSS


Quick question?

Is their anything in Apache or PHP that would keep styles from working. Both
external (CSS) and inline styles are ignored.

Environment :

Win XP Pro
Apache 2.0.39
PHP 4.2.1

Writing  Debugging on Homesite 4.0.1

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP with CSS

2002-06-30 Thread Bruce Karstedt

Checking view source was the first thing I thought of. The inline code
appears OK, style sheets, I only see the link of course.

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 30, 2002 11:31 PM
To: '[EMAIL PROTECTED]'; PHP - General List (E-mail)
Subject: RE: [PHP] PHP with CSS
Importance: Low


if in-line styles aren't working (and you can see them when you do a view
source) then it's nothing to do with apache.

(unless there's a header() command I don't know about that stops them from
working...)

Martin

-Original Message-
From: Bruce Karstedt [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 2:32 PM
To: PHP - General List (E-mail)
Subject: [PHP] PHP with CSS


Quick question?

Is their anything in Apache or PHP that would keep styles from working. Both
external (CSS) and inline styles are ignored.

Environment :

Win XP Pro
Apache 2.0.39
PHP 4.2.1

Writing  Debugging on Homesite 4.0.1

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP with CSS

2002-06-30 Thread Martin Towell

1. when you say the link, you're talking about the link tag right?
if so, are you sure your syntax is correct - this tag is something I
keep stuffing up
(using src instead of href, forgetting rel=stylesheet [is this
required?], setting type=text/stylesheet instead of type=text/css)

2. is the style sheet file accessable from the web

can't think of anything else that could be wrong

-Original Message-
From: Bruce Karstedt [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 3:17 PM
To: 'Martin Towell'; 'PHP - General List (E-mail)'
Subject: RE: [PHP] PHP with CSS


Checking view source was the first thing I thought of. The inline code
appears OK, style sheets, I only see the link of course.

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 30, 2002 11:31 PM
To: '[EMAIL PROTECTED]'; PHP - General List (E-mail)
Subject: RE: [PHP] PHP with CSS
Importance: Low


if in-line styles aren't working (and you can see them when you do a view
source) then it's nothing to do with apache.

(unless there's a header() command I don't know about that stops them from
working...)

Martin

-Original Message-
From: Bruce Karstedt [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 2:32 PM
To: PHP - General List (E-mail)
Subject: [PHP] PHP with CSS


Quick question?

Is their anything in Apache or PHP that would keep styles from working. Both
external (CSS) and inline styles are ignored.

Environment :

Win XP Pro
Apache 2.0.39
PHP 4.2.1

Writing  Debugging on Homesite 4.0.1

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php in css not working with IF's

2001-10-05 Thread Jon Farmer

Budweiser

if ( A != 10 or A != 9 )


--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send blank email to [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-04 Thread Jason Dulberg

Should I stick with

if (($site_style!=10)  ($site_style!=9)  ($site_style!=8))

or

if($site_style != ('10' or '9' or '8'))

So here's what I've gathered from the various messages and my current
methods:

- index.php selects $site_style from the db
- header.php is included by index.php (header.php has the css src for
styles.php in it)
- styles.php has the IF's
- I need to put link rel=stylesheet
src=styles.php?site_style=xxBROWSER_PLATFORM=xyz to pass the variables
from the script to the css file
(if possible, I need to get around this as headers are being included with
the css src already in them)
- do not need to use require() in styles.php

Thanks to everyone for all the suggestions!! :)

Jason


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: October 4, 2001 2:09 AM
 To: Maxim Maletsky (PHPBeginner.com)
 Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
 Subject: RE: [PHP] php in css not working with IF's


  Ok. Wll show you with an example:
 
  if (($site_style!==10)  ($site_style!==9)  ($site_style!==8))
  { }
 
  elseif ($site_style==10) {
  }
 
 
  Should simply be
 
   if($site_style != ('10' or '9' or '8')) {}

 Stop confusing the lad.  That obviously won't work.

 -Rasmus




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php in css not working with IF's

2001-10-04 Thread David Robley

On Thu,  4 Oct 2001 16:04, Jason Dulberg wrote:
 Should I stick with

 if (($site_style!=10)  ($site_style!=9)  ($site_style!=8))

 or

 if($site_style != ('10' or '9' or '8'))

As has been pointed out, that latter won't work. What is the range of 
possible values for $site_style? If it is 10 or less, then you could 
simply rephrase the test to

if($site_style  8)

or alternatively, if the range is 0 to more than 10

if( $site_style  8 || $site_style  10 )



-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Ici nous voyons le tour Eiffel! Tom parried.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-04 Thread Jason Dulberg

$site_style ranges from 1 - 11

$site_style 1 - 7,11 use the same css style.
$site_style 8,9 use the same css 
$site_stylye 10 uses different css from them all.

Thanks for your time.

Jason

 -Original Message-
 From: David Robley [mailto:[EMAIL PROTECTED]]
 Sent: October 4, 2001 2:48 AM
 To: Jason Dulberg; Rasmus Lerdorf
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] php in css not working with IF's
 
 
 On Thu,  4 Oct 2001 16:04, Jason Dulberg wrote:
  Should I stick with
 
  if (($site_style!=10)  ($site_style!=9)  ($site_style!=8))
 
  or
 
  if($site_style != ('10' or '9' or '8'))
 
 As has been pointed out, that latter won't work. What is the range of 
 possible values for $site_style? If it is 10 or less, then you could 
 simply rephrase the test to
 
 if($site_style  8)
 
 or alternatively, if the range is 0 to more than 10
 
 if( $site_style  8 || $site_style  10 )
 
 
 
 -- 
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  
 
Ici nous voyons le tour Eiffel! Tom parried.
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-04 Thread Jason Dulberg

I just want to thank everyone who helped me get the css stuff to work. All
of the IF statements are now working properly --- I've certainly learned a
lot from all the messages.

thanks again...
Maxim Maletsky
Rasmus Lerdorf

and all others who responded to my message!

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


 I have a common css file that is being used across several virtual
 hosts. Basically, what I am trying to do is use the same css file even
 though several text colors/sizes need to be changed depending on what
 site/platform its being used on.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg

I have a common css file that is being used across several virtual hosts.
Basically, what I am trying to do is use the same css file even though
several text colors/sizes need to be changed depending on what site/platform
its being used on.

I have my sql query (retrieves $site_style) in the file that includes the
css file and a bunch of IF statements inside the css file itself. The only
problem is that the css is not being generated properly.

For some reason, the IF statements are not being processed correctly/at all.
I can echo the variables through the index.php and the variables are set to
global. Its just that styles.php seems to almost bypass the IF and use the
1st set of variables even though it shouldn't be.

Here's an example from the css (styles.php) - there are about 5 IF
statements in there but here's the basic idea of them all:

?php
//index.php creates platform and site style
require(index.php);

if (($BROWSER_PLATFORM == Win)  (($site_style!==10) ||
($site_style!==9))) {
$pc8=8;
$pc9=9;
$pc10=10;
$pc12=12;
$pc13=13;
$pc14=14;
$text=#ff;
$heading=#2E4471;
}
?

.standard {
font-family:verdana, arial;
font-size: ?=$pc10;?pt;
color:?=$text;?;
}

The call from site style 10
link rel=stylesheet href=/styles.php

If I go to a $site_style 10, it still uses the variables defined within the
example IF statement even though it clearly shouldn't. If I type in the URL
to styles.php from a $site_style 10, it shows the wrong tags.

Is it a problem with my IF statements or is something else going over my
head?

Thanks again for any help - I've been trying to figure this out for days to
no avail...

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php in css not working with IF's

2001-10-03 Thread David Robley

On Thu,  4 Oct 2001 13:49, Jason Dulberg wrote:
 I have a common css file that is being used across several virtual
 hosts. Basically, what I am trying to do is use the same css file even
 though several text colors/sizes need to be changed depending on what
 site/platform its being used on.

 I have my sql query (retrieves $site_style) in the file that includes
 the css file and a bunch of IF statements inside the css file itself.
 The only problem is that the css is not being generated properly.

 For some reason, the IF statements are not being processed correctly/at
 all. I can echo the variables through the index.php and the variables
 are set to global. Its just that styles.php seems to almost bypass the
 IF and use the 1st set of variables even though it shouldn't be.

 Here's an example from the css (styles.php) - there are about 5 IF
 statements in there but here's the basic idea of them all:

 ?php
 //index.php creates platform and site style
 require(index.php);

 if (($BROWSER_PLATFORM == Win)  (($site_style!==10) ||

Any other problems aside, this is not how you do 'Not Equal'.

  $site_style!=10

is correct syntax.

 ($site_style!==9))) {
   $pc8=8;
   $pc9=9;
   $pc10=10;
   $pc12=12;
   $pc13=13;
   $pc14=14;
   $text=#ff;
   $heading=#2E4471;
 }
 ?

 .standard {
 font-family:verdana, arial;
 font-size: ?=$pc10;?pt;
 color:?=$text;?;
 }

 The call from site style 10
 link rel=stylesheet href=/styles.php

 If I go to a $site_style 10, it still uses the variables defined within
 the example IF statement even though it clearly shouldn't. If I type in
 the URL to styles.php from a $site_style 10, it shows the wrong tags.

 Is it a problem with my IF statements or is something else going over
 my head?

 Thanks again for any help - I've been trying to figure this out for
 days to no avail...

 __
 Jason Dulberg
 Extreme MTB
 http://extreme.nas.net

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   The first myth of management is that it exists.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf

 if (($BROWSER_PLATFORM == Win)  (($site_style!==10) ||
 ($site_style!==9))) {

Common logic mistake.

  if ( A != 10 or A != 9 )

Which value of A would make that logic false?

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg

Thank you for your response. I changed my the code to the method that you
suggested. Unfortunately, it still doesn't use the IF's properly.

For instance, if I open a $site_style 10, the IF statement for that is the
following:

elseif (($BROWSER_PLATFORM == Win)  ($site_style==10)) {
$pc8=8;
$pc9=9;
$pc10=10;
$pc12=12;
$pc13=13;
$pc14=14;
$text=#D1BAC6;
$link=#F8CC92;
$heading=#B38B9F;
}

It still reads the first IF statement as I have in the original message
shown below.


Thanks again.

Jason.



  if (($BROWSER_PLATFORM == Win)  (($site_style!==10) ||

 Any other problems aside, this is not how you do 'Not Equal'.

   $site_style!=10

 is correct syntax.

  ($site_style!==9))) {
  $pc8=8;
  $pc9=9;
  $pc10=10;
  $pc12=12;
  $pc13=13;
  $pc14=14;
  $text=#ff;
  $heading=#2E4471;
  }
  ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf

 Any other problems aside, this is not how you do 'Not Equal'.

   $site_style!=10

 is correct syntax.

No, !== is quite valid.  It is the non-equality version of ===

See http://www.php.net/manual/en/language.operators.comparison.php

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg

Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

So I'm assumuming that my IF's are way off base?

This is definitely something that'll be helpful for my other work as well.

Thanks

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: October 4, 2001 12:41 AM
 To: Jason Dulberg
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] php in css not working with IF's
 
 
  if (($BROWSER_PLATFORM == Win)  (($site_style!==10) ||
  ($site_style!==9))) {
 
 Common logic mistake.
 
   if ( A != 10 or A != 9 )
 
 Which value of A would make that logic false?
 
 -Rasmus
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)



Without following your logic I can give an example of how style sheets
on PHPBeginner.com work:


In the page we have 
link rel=stylesheet href=/styles.php

And in the styles.php we have all the possible DB connections, browser
checks by (PHP SNIFF) and so and so on.

You cold even try to call the class this way with Get: 
link rel=stylesheet href=/styles.php?foo=foobar=baz

That will work as well.

But one thing you cannot do is defining variable on index.php hoping
they would become available in styles.php - those are TOTALY separated
processes. Something like if you would have a page with two frames.

So, here's another thing.
The only reason of using external CSS file is to have it automatically
cached by your browser so it loads once per session. By default it will
not. You're gonna need to review your headers, adding cache control to
it.

Hope it gave you an idea.

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 6.19
To: [EMAIL PROTECTED]
Subject: [PHP] php in css not working with IF's


I have a common css file that is being used across several virtual
hosts. Basically, what I am trying to do is use the same css file even
though several text colors/sizes need to be changed depending on what
site/platform its being used on.

I have my sql query (retrieves $site_style) in the file that includes
the css file and a bunch of IF statements inside the css file itself.
The only problem is that the css is not being generated properly.

For some reason, the IF statements are not being processed correctly/at
all. I can echo the variables through the index.php and the variables
are set to global. Its just that styles.php seems to almost bypass the
IF and use the 1st set of variables even though it shouldn't be.

Here's an example from the css (styles.php) - there are about 5 IF
statements in there but here's the basic idea of them all:

?php
//index.php creates platform and site style require(index.php);

if (($BROWSER_PLATFORM == Win)  (($site_style!==10) ||
($site_style!==9))) {
$pc8=8;
$pc9=9;
$pc10=10;
$pc12=12;
$pc13=13;
$pc14=14;
$text=#ff;
$heading=#2E4471;
}
?

.standard {
font-family:verdana, arial;
font-size: ?=$pc10;?pt;
color:?=$text;?;
}

The call from site style 10
link rel=stylesheet href=/styles.php

If I go to a $site_style 10, it still uses the variables defined within
the example IF statement even though it clearly shouldn't. If I type in
the URL to styles.php from a $site_style 10, it shows the wrong tags.

Is it a problem with my IF statements or is something else going over my
head?

Thanks again for any help - I've been trying to figure this out for days
to no avail...

__
Jason Dulberg
Extreme MTB
http://extreme.nas.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf

 Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

But since A cannot be both 9 and 10 at the same time, A will *always* not
be one of them.

It's exactly the same as saying: if (!(A==9 AND A==10))

Obviously A cannot be both 9 and 10 at the same time so the above will be:

  if(!(false))  which is the same as   if(true)

Some people find it helpful to draw Venn diagrams of their boolean logical
expressions.  See http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
for a simple description of those.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jack Dempsey

nice to know demorgan's laws actually show up every now and then ;-)

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 12:58 AM
To: Jason Dulberg
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


 Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

But since A cannot be both 9 and 10 at the same time, A will *always* not
be one of them.

It's exactly the same as saying: if (!(A==9 AND A==10))

Obviously A cannot be both 9 and 10 at the same time so the above will be:

  if(!(false))  which is the same as   if(true)

Some people find it helpful to draw Venn diagrams of their boolean logical
expressions.  See http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
for a simple description of those.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Thanks Rasmus.

The link you provided will become a great resource for PHPBeginner.com

Cheers!

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 6.58
To: Jason Dulberg
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


 Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

But since A cannot be both 9 and 10 at the same time, A will *always*
not be one of them.

It's exactly the same as saying: if (!(A==9 AND A==10))

Obviously A cannot be both 9 and 10 at the same time so the above will
be:

  if(!(false))  which is the same as   if(true)

Some people find it helpful to draw Venn diagrams of their boolean
logical expressions.  See
http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
for a simple description of those.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf

Would make a nice little PHP-GD exercise for someone to build a PHP app
that took a boolean logical expression and produced a Venn diagram.  Maybe
limit it to 3 or less terms to not make your brain explode.

-Rasmus

On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote:

 Thanks Rasmus.

 The link you provided will become a great resource for PHPBeginner.com

 Cheers!

 Maxim Maletsky
 www.PHPBeginner.com


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 6.58
 To: Jason Dulberg
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] php in css not working with IF's


  Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

 But since A cannot be both 9 and 10 at the same time, A will *always*
 not be one of them.

 It's exactly the same as saying: if (!(A==9 AND A==10))

 Obviously A cannot be both 9 and 10 at the same time so the above will
 be:

   if(!(false))  which is the same as   if(true)

 Some people find it helpful to draw Venn diagrams of their boolean
 logical expressions.  See
 http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
 for a simple description of those.

 -Rasmus





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Do you want to do it?
PHPBeginner.com and many other PHP sites would greatly appreciate it,
Rasmus.

Though, NOT and XOR are often unknown to beginners, I noticed it in
their codes.

Anyway, it is a great idea, I think. I see so many neo programmers
confusing with it. Lots of PHP developers are coming from web
development industry where they've often seen few other things but
Macromedia. Obviously it takes them ages to get logical operators as it
is rarely documented for very beginners level. For instance, my
assistants at my previous job were categorically refusing looking onto
manuals trying religiously to understand logicals from raw code samples.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 7.09
To: Maxim Maletsky (PHPBeginner.com)
Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Would make a nice little PHP-GD exercise for someone to build a PHP app
that took a boolean logical expression and produced a Venn diagram.
Maybe limit it to 3 or less terms to not make your brain explode.

-Rasmus

On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote:

 Thanks Rasmus.

 The link you provided will become a great resource for PHPBeginner.com

 Cheers!

 Maxim Maletsky
 www.PHPBeginner.com


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 6.58
 To: Jason Dulberg
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] php in css not working with IF's


  Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

 But since A cannot be both 9 and 10 at the same time, A will *always* 
 not be one of them.

 It's exactly the same as saying: if (!(A==9 AND A==10))

 Obviously A cannot be both 9 and 10 at the same time so the above will
 be:

   if(!(false))  which is the same as   if(true)

 Some people find it helpful to draw Venn diagrams of their boolean 
 logical expressions.  See 
 http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
 for a simple description of those.

 -Rasmus






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Wonderful!

Update as all on your start so we can contribute!

P.S: and happy birthday!
Real-life story: my ex manager asked me once: Dude, I heard you're
leaving office at 2am, are you also coding on your birthdays and
Christmas?

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Jack Dempsey [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 7.34
To: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


i'll start it...will be fun and i've got some coldfusion proponents i'd
love to show it to...a little swamped with work though, and monday's my
21st, so i don't think i'll be doing much coding, but hey, its
opensource, you do a lil, i do a lil, it'll be done in no time...

jack

-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 1:24 AM
To: 'Rasmus Lerdorf'
Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's



Do you want to do it?
PHPBeginner.com and many other PHP sites would greatly appreciate it,
Rasmus.

Though, NOT and XOR are often unknown to beginners, I noticed it in
their codes.

Anyway, it is a great idea, I think. I see so many neo programmers
confusing with it. Lots of PHP developers are coming from web
development industry where they've often seen few other things but
Macromedia. Obviously it takes them ages to get logical operators as it
is rarely documented for very beginners level. For instance, my
assistants at my previous job were categorically refusing looking onto
manuals trying religiously to understand logicals from raw code samples.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: giovedi 4 ottobre 2001 7.09
To: Maxim Maletsky (PHPBeginner.com)
Cc: 'Jason Dulberg'; [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Would make a nice little PHP-GD exercise for someone to build a PHP app
that took a boolean logical expression and produced a Venn diagram.
Maybe limit it to 3 or less terms to not make your brain explode.

-Rasmus

On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote:

 Thanks Rasmus.

 The link you provided will become a great resource for PHPBeginner.com

 Cheers!

 Maxim Maletsky
 www.PHPBeginner.com


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: giovedi 4 ottobre 2001 6.58
 To: Jason Dulberg
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] php in css not working with IF's


  Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9...

 But since A cannot be both 9 and 10 at the same time, A will *always* 
 not be one of them.

 It's exactly the same as saying: if (!(A==9 AND A==10))

 Obviously A cannot be both 9 and 10 at the same time so the above will
 be:

   if(!(false))  which is the same as   if(true)

 Some people find it helpful to draw Venn diagrams of their boolean 
 logical expressions.  See 
 http://www.lib.csub.edu/infocomp/search/boolean/venn.htm
 for a simple description of those.

 -Rasmus






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jason Dulberg

Thanks for sticking with me here and for your examples!!

So basically, I need to use AND instead of OR.

if (($site_style!==10)  ($site_style!==9)  ($site_style!==8)) {
}

elseif ($site_style==10) {
}

hrm... it didn't work.

Sorry for being such a dope about this :(

Jason



 Ok, you are clearly not following along here...  ;)
 
 You have (let $site_style = A for brevity):
 
 if( A!=10 OR A!=9 OR A!=8 )
 
 When A=10 this becomes:
 
 if( 10!=10 OR 10!=9 OR 10!=8 )
  falsetrue true
 
 if( false OR true OR true ) is the same as if (true)
 
 Seriously, try drawing the Venn diagram for your expression.
 
 Or try substituting common english.
 
 if Jason is not 21 or Jason is not 20 or Jason is no 19 let him into the
 cool club.
 
 Say Jason is 21, is he allowed in?  Sure he is, because one of the
 conditions for getting into the cool club is that Jason is not 20.  It
 doesn't matter that one of the other conditions says to not let Jason in.
 If the people writing the rules wanted to force all the conditions to
 apply they would have written:
 
 if Jason is not 21 AND Jason is not 20 AND Jason is not 19, let him into
 the cool club.
 
 -Rasmus
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Jack Dempsey

have you thought about a switch statement? haven't looked at your code, but
that would allow you a default, and then a bunch of cases, etc...

jack

-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 1:43 AM
To: Rasmus Lerdorf
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Thanks for sticking with me here and for your examples!!

So basically, I need to use AND instead of OR.

if (($site_style!==10)  ($site_style!==9)  ($site_style!==8)) {
}

elseif ($site_style==10) {
}

hrm... it didn't work.

Sorry for being such a dope about this :(

Jason



 Ok, you are clearly not following along here...  ;)

 You have (let $site_style = A for brevity):

 if( A!=10 OR A!=9 OR A!=8 )

 When A=10 this becomes:

 if( 10!=10 OR 10!=9 OR 10!=8 )
  falsetrue true

 if( false OR true OR true ) is the same as if (true)

 Seriously, try drawing the Venn diagram for your expression.

 Or try substituting common english.

 if Jason is not 21 or Jason is not 20 or Jason is no 19 let him into the
 cool club.

 Say Jason is 21, is he allowed in?  Sure he is, because one of the
 conditions for getting into the cool club is that Jason is not 20.  It
 doesn't matter that one of the other conditions says to not let Jason in.
 If the people writing the rules wanted to force all the conditions to
 apply they would have written:

 if Jason is not 21 AND Jason is not 20 AND Jason is not 19, let him into
 the cool club.

 -Rasmus



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Ok. Wll show you with an example:

if (($site_style!==10)  ($site_style!==9)  ($site_style!==8))
{ }

elseif ($site_style==10) {
}


Should simply be 

 if($site_style != ('10' or '9' or '8')) {}

Bla bla bla


Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 7.56
To: 'Jason Dulberg'; 'Rasmus Lerdorf'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Jason, are not a dope

As mentioned to you by Rasmus:
just move those !== off the script replacing them with !=


That is what causes your error.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Jason Dulberg [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 4 ottobre 2001 7.43
To: Rasmus Lerdorf
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's


Thanks for sticking with me here and for your examples!!

So basically, I need to use AND instead of OR.

if (($site_style!==10)  ($site_style!==9)  ($site_style!==8))
{ }

elseif ($site_style==10) {
}

hrm... it didn't work.

Sorry for being such a dope about this :(

Jason



 Ok, you are clearly not following along here...  ;)
 
 You have (let $site_style = A for brevity):
 
 if( A!=10 OR A!=9 OR A!=8 )
 
 When A=10 this becomes:
 
 if( 10!=10 OR 10!=9 OR 10!=8 )
  falsetrue true
 
 if( false OR true OR true ) is the same as if (true)
 
 Seriously, try drawing the Venn diagram for your expression.
 
 Or try substituting common english.
 
 if Jason is not 21 or Jason is not 20 or Jason is no 19 let him into
 the cool club.
 
 Say Jason is 21, is he allowed in?  Sure he is, because one of the
 conditions for getting into the cool club is that Jason is not 20.  It

 doesn't matter that one of the other conditions says to not let Jason
 in. If the people writing the rules wanted to force all the conditions

 to apply they would have written:
 
 if Jason is not 21 AND Jason is not 20 AND Jason is not 19, let him
 into the cool club.
 
 -Rasmus
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php in css not working with IF's

2001-10-03 Thread David Robley

On Thu,  4 Oct 2001 15:25, Maxim Maletsky \(PHPBeginner.com\) wrote:
 Jason, are not a dope

 As mentioned to you by Rasmus:
 just move those !== off the script replacing them with !=


 That is what causes your error.


 Maxim Maletsky
 www.PHPBeginner.com

No, that was Rasmus telling _me_ that they are valid! Rasmus told him his 
logic was flawed.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Sorrow looks back, worry looks around, faith looks up.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php in css not working with IF's

2001-10-03 Thread Rasmus Lerdorf

 Ok. Wll show you with an example:

 if (($site_style!==10)  ($site_style!==9)  ($site_style!==8))
 { }

 elseif ($site_style==10) {
 }


 Should simply be

  if($site_style != ('10' or '9' or '8')) {}

Stop confusing the lad.  That obviously won't work.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php in css not working with IF's

2001-10-03 Thread Naintara Jain

Maybe you can try simplifying your logic.

Why don't you avoid nested IFs till later, and keep to simple IFs.
If you want to check for $site_style not equal to 10 and also not equal to 9
then you can say 

($site_style != 10   $site_style != 9)

or even 

!($site_style == 10 ||  $site_style == 9)

then later if you want to check for $site_style == 10 
make a separate IF rather than use a elsif, just for ease of comprehension.

-Naintara



- Original Message - 
From: Jason Dulberg [EMAIL PROTECTED]
To: Rasmus Lerdorf [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 11:12 AM
Subject: RE: [PHP] php in css not working with IF's


Thanks for sticking with me here and for your examples!!

So basically, I need to use AND instead of OR.

if (($site_style!==10)  ($site_style!==9)  ($site_style!==8)) {
}

elseif ($site_style==10) {
}

hrm... it didn't work.

Sorry for being such a dope about this :(

Jason



 Ok, you are clearly not following along here...  ;)
 
 You have (let $site_style = A for brevity):
 
 if( A!=10 OR A!=9 OR A!=8 )
 
 When A=10 this becomes:
 
 if( 10!=10 OR 10!=9 OR 10!=8 )
  falsetrue true
 
 if( false OR true OR true ) is the same as if (true)
 
 Seriously, try drawing the Venn diagram for your expression.
 
 Or try substituting common english.
 
 if Jason is not 21 or Jason is not 20 or Jason is no 19 let him into the
 cool club.
 
 Say Jason is 21, is he allowed in?  Sure he is, because one of the
 conditions for getting into the cool club is that Jason is not 20.  It
 doesn't matter that one of the other conditions says to not let Jason in.
 If the people writing the rules wanted to force all the conditions to
 apply they would have written:
 
 if Jason is not 21 AND Jason is not 20 AND Jason is not 19, let him into
 the cool club.
 
 -Rasmus
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]