almostbob 866 Retired: passive income ROCKS

a:visited { color: 333;} vs a:visited { color:#333;} There are four ways to declare color in css

  1. As a standard color name P {color: green}
  2. As a hexadecimal value P {color: #333333} // note the hash
  3. As an RGB percentage P {color: rgb(70%, 0%, 30%)}
  4. As a decimal value from 0 to 255 P {color: rgb(170, 0, 100)}

none of them are just numeric, in lines 11-22

ref:http://www.devx.com/projectcool/Article/19851

tasteypaste commented: Very concise and helpful. +0
almostbob 866 Retired: passive income ROCKS

the page is not complete, for cutnpaste simplicity i Know, so these may be considered doh questions but,,
Is there a DTD declared as the first line of the file, without a dtd the file is html2 and most styling will not work
Are all those multiple stylesheets inside <style></style> there is one there incomplete, I assume copy/paste issues but have to ask a:visited is defined twice is the code shown, is it defined also in the linked stylesheet, the results may not be as you expect because only the last definition of any element actually does anything

<link href="../soundoff.css" rel="stylesheet" type="text/css" />
<style type='text/css'><!--
.titleText { font-size:36px; font-weight:bold; text-align:center; }
.fontSize { font-size:12px; font-weight:bold; text-align:center; }
.textAlignCent { text-align:center; }
.textFont { color:#CC0000; text-align:center; font-size:18px; }
.firstLine { line-height:13px; text-align:left; vertical-align:top; }
.leftAlign { text-align:left; vertical-align:top; line-height:14pt; }
.topMiddle { text-align:center; vertical-align:top; }
a:link { color:#333333; } //no hash in original code will be ignored
a:visited { color:#666; } // will be ignored because of later declaration
a:visited { color:#333333; } //no hash in original code will be ignored
a:hover { color:#333333; } //no hash in original code will be ignored
a:active { color:#333333; } //no hash in original code will be ignored
#search { position:absolute; width:400; height:20; z-index:2; } /* 400what 20what dimension are important, position:absolutel requires a position as top: left:, top: right:, bottom: left:, bottom: right:, pairs or top: right: bottom: left: */
--></style>

incorrect code puts browsers in unpredictable quirks mode

almostbob 866 Retired: passive income ROCKS
<html><head>
<script type='text/javascript'>
<!--
function imgclick(image) { 
document.getElementById('bigimg').src="imagelibrary/"+image+'big.jpg';
document.getElementById('linkimg').href="/root/path/"+image+".html"; 
}
-->
</script>
</head><body>
<img src="imagelibrary/dazzlethumb.jpg" onclick="imgclick('dazzle');" border="5"  />
<img src="imagelibrary/gunshotthumb.jpg" onclick="imgclick('gunshot');" border="5" />
<img src="imagelibrary/searoomthumb.jpg" onclick="imgclick('searoom');" border="5" />
<img src="imagelibrary/smokethumb.jpg" onclick="imgclick('smoke');" border="5" />
<br>
<a href='#' id='linkimg'><img src="imagelibrary/dazzlebig.jpg" id="bigimg" width="320" border="0" /></a>
</body>
<script type="text/javascript">
<!--
image1 = new Image();
image1.src = "imagelibrary/dazzlebig.jpg";
image2 = new Image();
image2.src = "imagelibrary/gunshotbig.jpg";
image3 = new Image();
image3.src = "imagelibrary/searoombig.jpg";
image4 = new Image();
image4.src = "imagelibrary/smokebig.jpg";
-->
</script>
</html>

the initial javsacript makes the requested links and image changes
the second javascript between </body> and </html> preloads the larger images to tif after the page is loaded and functioning without displaying any, gives an apparent speed increase over images in a div with display:none, load time is not changed, but the page becomes functional before all the images are loaded

the link href makes the assumption that /root/path will be repaced by the right path and that the filename convention established with thumb-big has been continued to the html filename

almostbob 866 Retired: passive income ROCKS

its a SQueezeBox(css/javascript) menu, very similar effects can be done in straight css,

This is a poor menu implementation, squeezebox supports dynamic sizing by default and they should have used it, if you reduce the window to a part screen, the entire active part of the menu, pushes offscreen right and is invisible.
on a scale of 0-10 this implementation is maybe 2
potential to do much more in your implementation of the same freeware
just about any 'vertical drop down css menu's could be used to make this menu,
without flash or java, the flash on the site is just the scroller down the side

almostbob 866 Retired: passive income ROCKS

Its a paid service, you require access to a mobile phone provider's system, which you pay for, and they provide a script to access
all the 'free' services are merely an advertiser's choice of method to keep you on their pages long enough to see their ads
contact a local mobile provider to arrange service

almostbob 866 Retired: passive income ROCKS
function highlight(word) {document.getElementById (word).bgColor="blue";}

you will also require another javascript and an onmouseout() to reset the background or in short order everything will be blue
css is smaller faster and works when javascript is disabled for security reasons

.hl {background:#ffffff; }
.hl:hover { background:#0000ff; }
<span> this does not highlight on mouseover</span>
<span class='hl'> this does highlight on mouseover</span>
almostbob 866 Retired: passive income ROCKS

actually the table data does not require this precision, only the output data does
given the table column is returned as $row['price'] at line 26 in the original

$format_number = number_format($row['price'], 2, '.', ''); /* orignal number, 2 dec, dot sepaarated, nothing between thousands */
echo "<td>$".$format_number."</td>";

or

echo "<td>$".number_format($row['price'], 2, '.', '')."</td>";

php.net reference

almostbob 866 Retired: passive income ROCKS

how is the date stored, if stored using a date object or a timestamp its a piece of cake
if its stored using text dates, punch out your dbase designer

almostbob 866 Retired: passive income ROCKS

its is better regardless of browser to use ems and %, the page will work and appear very similar in every standard compliant(1), and almost standard compliant browser(2)
from Opera mini(1) and Blackberry(2) handheld devices
to Opera(1) Firefox(1+++) all the LIinux browsers(1) and IE(miserable 2)

If shrink the window from fullscreen to half, any part of the content pushes offscreen right, fail
Joe the plumber: comparing two sites puts them in paned windows side by side,
siteA content reflows and remains in the window
siteB content stays put and flows offscreen
Joe goes to site A,

CEO of BigCorpInc, in aircraft, executive busymode, checks out site on PDA SiteA works, BigCorp places order with siteA for 1Million widgets

SiteB product massacres siteA product, doesnt matter, nobody buys it

second approach maybe,,
DanWeb, in small windows pushes offscreen right, doesnt matter coz CsGal put the BS on the right and content on the left where it stays on screen,

almostbob 866 Retired: passive income ROCKS

an em has no direct relationship to a pixel, the relationship given so many times in old, very outdated, publications is based on a 96dpi crt monitor, current monitors 176dpi and higher, so there are a hell of a lot more px in the screen, and in an em
an em is entirely a relative dimension, the size of the W or M in the current basefont, the basefont set by the user to the user's preference. Which means that fonts set in em are device/window/resolution independent so a much better choice than px, which on a hi res monitor 10px = 1.38mm = 0.08inch hi, invisible
Dimensions in em and % are current best practice in screen layout, pt in print, px solely for images

almostbob 866 Retired: passive income ROCKS

Do not meta refresh any part of the site

easy, done

almostbob 866 Retired: passive income ROCKS
#content { position:absolute;  top:auto; left:15px; right:130px;  bottom:15px; background-color:#00CC00; font-family: Arial, Helvetica, Tahoma, sans-serif; }
almostbob 866 Retired: passive income ROCKS
<img id='bigimage' src='image3.jpg' width=x height=y>
<a onclick="document.getElementById('bigimage').src='image1.jpg';">Image1</a>
<a onclick="document.getElementById('bigimage').src='image2.jpg';">Image2</a>
almostbob 866 Retired: passive income ROCKS

run the select twice, do nothing with the first result
fgetcsv gets the next line each time it is called

almostbob 866 Retired: passive income ROCKS

Thankyou Cwarn23, just came back to find the footprints where I stepped in it, have been repaired
/* bla bla bla */ :(

almostbob 866 Retired: passive income ROCKS

while loops until a fail occurs, looping on the same line does not fail

<?php if (($handle = fopen("test.csv", "r")) !== FALSE)  {
 $data = fgetcsv($handle, 1000, ",")  
 echo "$data[3] ,  $data[10]" /* bla bla bla bla */ ;
 fclose($handle);
} 
else echo 'failure opening data file'; ?>
almostbob 866 Retired: passive income ROCKS

IF you are selecting a single record, then have an input form somewhere thay you can input the information you are searching on with the same field names and order as your csv file
then when you step through the file

if(isset(search[0])) {if (data[0]=search[0]) {echo "hello $data[3] , In reply to your $data[10] ";} }
if(isset(search[1])) {if (data[1]=search[1]) {echo "hello $data[3] , In reply to your $data[10] ";} }
//etc

with apologies for really crappy code sample, its has been ages since I thought about it, its so much easier without thinking

almostbob 866 Retired: passive income ROCKS

you have an an array $data made up of a single record row
you know the elements in the array $data[0] to data[10]

echo "hello $data[3] , In reply to your $data[10] we can /* bla bla bla bla */";

CSV handling is not elegant in finding a particular row, except by stepping through, it is not a random accessible database
have always fwritten the last row number to another file on fputcsv
selecting a single line, first, last, or any by line number, is a piece of cake
the code example in your prior post shows stepping through the record lines by 1 row $row, and $row++

almostbob 866 Retired: passive income ROCKS

When using csv files you should be using CSV operators
fgetcsv() see also fputcsv()

dont use a fork to serve soup

almostbob 866 Retired: passive income ROCKS
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
<head>
<link href="table.css" rel="stylesheet" type="text/css" media="screen" >
</head>
<body>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
</table>
</body>
</html>

should function
whitespace and indenting are not required for production code and should be removed
often 40-50% of the filesize downloaded to the user browser is whitespace
Its ok as an aid to developer, but a code highlighting notepad is better.

almostbob 866 Retired: passive income ROCKS

with no dtd you are limited to html2
self closed elements (end in /> ) are xhtml ONLY
the declaration of your css wil lbe ignored

if you make the firstline of the html file a dtd for html 4 (strict or transitional) or xhtml (strict or transitional) you will be able to properly use external css files <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> sample html4 Transitional DTD
course notes are never complete

daviddoria commented: Thanks almostbob +3
almostbob 866 Retired: passive income ROCKS

post the code,
including the css
that you are using

we dont do homework, nobody is going to look it up, fix it, and post it for you
but we do show the bugs in what you have tried

almostbob 866 Retired: passive income ROCKS

all of the questions you have asked are answered in the MySQL user guide sections
in the appropriate server side language for the site host,

at mysql reference sections http://dev.mysql.com/doc/ for the version to be used
from theses sites you will get absolutely accurate answers, code samples and instructions
cmon back and post a question if the code you develop has a specific bug

perhaps start with a CMS, prewritten to accomplish what you look for

henpecked1 commented: almostbob's guidance was accurate and gave me exactly what I needed. +3
almostbob 866 Retired: passive income ROCKS

perl scripts are always invoked as a result of some request, until then they just sit on the server doing 0 nada nothing
traditionally perl script gets data posted or getted to it from a html form, runs on the server and returns a html page to say its done.
the code given, sends the data to the perl script by post or get and ajax similarly could/would handle any returned data

almostbob 866 Retired: passive income ROCKS
<table width="100%">
<tr>
<td>Content</td>
<td width='*'>More Content</td>
</tr>
</table>
samarudge commented: Usefull stuff =) +2
almostbob 866 Retired: passive income ROCKS

make life easier on yourself (may not be the problem but make life easier)
dont use mixed case filenames

'This' is exclusive to 'this'

almostbob 866 Retired: passive income ROCKS

when you get the code sorted out for the css rollover, the FIRST rollover for each image will appear very slowly, as the file is not downloaded from the server until that time
this can really mess up your page appearance
javascript to preload the images can be added to the foot of the page after the </body> tag and before </html> to preload the images, it wont display anything and degrades gracefully(does nothing) if javascript is disabled on the user browser. but speeds the apparent load time of the page as the images load after the page is fully active, but usually before the user has a chance to mouseover something

</body><script type="text/javascript">
//<![CDATA[
<!-- 
image1 = new Image();
image1.src = "http://pics.mysite.com/rollover1.jpg";
image2 = new Image();
image2.src = "http://pics.mysite.com/rollover2.jpg";
//-->
//]]>
</script></html>

this script loads rollover1 and rollover2 which are then in the cache to be accessed without load delays

almostbob 866 Retired: passive income ROCKS

I've tried editing my query as per you instructions and ended up with the following:

$sql4 ="SELECT Company.Link, Company.Address, Company.TelOther, Company.HomeTel, Company.Area, Company.Classification, Company.Class2, Company.Class3, Promotions.CompanyName, Promotions.PName, Promotions.PDescription, Promotions.Monday, Promotions.Tuesday, Promotions.Wednesday, Promotions.Thursday, Promotions.Friday, Promotions.Saturday, Promotions.Sunday, date_format(Promotions.StartDate, '%d/%m/%Y'), Promotions.EndDate, Promotions.PromoID
FROM Company INNER JOIN Promotions
ON Company.Name=Promotions.CompanyName WHERE Promotions.EndDate IS NULL AND '".$q."' >= Promotions.StartDate AND Company.Classification = '".$p."' ORDER BY Promotions.StartDate ASC";

It's now showing an unexpected T-Variable error.

Any thoughts?

Cheers.

in the php for the output, not the sql query, sql requires only column names

almostbob 866 Retired: passive income ROCKS

Yes,
its the most common improvement from "my first web page" to "my second web page"
in .php .asp .shtml (server side language extensions to html) you can <?php include('menu.php'); ?> (example)
the only thing you have to do is determine what server language your hosting package supports and use that language
my site has 1600+ pages, & 2 included files that actually do all the 'grunt work'
head.php that is all the doctypes css scritps
menu.php that is the menu, sidebar and footers
the average page looks like

<?php include('/head.php');
include('/menu.php'); ?>
content bla bla bla
</body></html>

menus on all pages can be altered easily and all pages retain the same look and feel all the time

almostbob 866 Retired: passive income ROCKS

The options are not in alphabtical order,
keypress M is selecting items in the order they are coded
html, can't spell.

almostbob 866 Retired: passive income ROCKS

They wouldnt lie about that, (ability to run local) too easy to check, would solve all the problems that could possibly imagine, with a live cd/dvd you can upload the html files to a server from the dvd when needed or run locally

almostbob 866 Retired: passive income ROCKS

not sure about xamp's protocols and parameters, that would have to be looked up in the manual for xamp, or whatever runtime program is found that can display
but for many programs, the program can be called with a parameter of a filename that opens the file
This link to nusphere.com is a product I have used before

almostbob 866 Retired: passive income ROCKS

most includes require server processing, different to what is available on a browser,
if you burn the thumbdrive version (noinstall portable or a bunch of other names) of the ide that the development is done in onto the dvd as well, no problems, the ide will support the incl;udes

almostbob 866 Retired: passive income ROCKS

Yes, that is the foundation behind many websites
php asp shtml all have the ability to do server includes, all you need to do is find which of the above your server supports, and you can include the menu with a single statement, and it doesnt need to be a full html file, it just needs the menu, all the headers footers etc are predifined in the file doing the include, in php (files end with .php)it is <?php include('menufilename'); ?> at the point the menu is to sit
it is hugely easier than editing a multitude of separate menus

I have over 1600 pages on my site, but it really is 4 include files and a database, none of the viewable pages actually exist until you view them

almostbob 866 Retired: passive income ROCKS

gues you all have the same homework assignment
http://www.daniweb.com/forums/thread257925.html

almostbob 866 Retired: passive income ROCKS

op has searched for a literal 1 (number) not for a true boolean

almostbob 866 Retired: passive income ROCKS
<?php if($login_successful == "1") { echo "<a href='http://www.icselect.com/login.php?logout=1'> Logout</a>"; }
else { echo "<a href='http://www.icselect.com/login.php'> Login</a>"; } ?>

no quotes around variable name, quotes indicate quoted text.
xxxxxbla bla bla <> 1
text is never equal to one

almostbob 866 Retired: passive income ROCKS

I emailed the contact us link and asked them
file extensions are a clue

almostbob 866 Retired: passive income ROCKS

coldfusion

almostbob 866 Retired: passive income ROCKS

show the existing css,

almostbob 866 Retired: passive income ROCKS

UTF-8 is the first time I have seen 'new' stuff that didnt actively kill 'old' stuff
its a good idea, it works

it must have been an accident

almostbob 866 Retired: passive income ROCKS

UTF-8 etc have multibyte character encoding
characters above the 128 us ascii set get 2 bytes, 3 bytes (up to 6 bytes) to represent them
makes it backwards compatible with non-utf8 applications, which display garbage, but ascii garbage and dont crash
strlen() appears to be ascii byte counting
here is an explanation in wikipedia
that result is proper, displayed value is XXX characters, for each character that is 2byte encoded you get XXX+1

diafol commented: Thanks - spot on as usual +5
almostbob 866 Retired: passive income ROCKS

you went from no doctype, to xhtml
no doctype = html 2, no support for anything, lucky if it works
xhtml, support for everything, very strict declarations and positioning required
noted several times in several dozens of threads for heaps of questions xhtml requires all elements to be closed, either as <element></element> or <element /> for singletons
as well as just shoving 'something' in the noted errors it may be a reasonable thing to read up on what effect adding the 'something' may have.
As well as the w3c validators use W3Schools the companion instruction site,
topics matchup very well with the error messages generated by the validators, and you will save yourself the same set of hassles with further developments

-aside- Congrats,
try question learn succeed repeat
is much cooler than [whine]"I dunno what to do somebody else do it for me".[/whine]

when posting code wrap it in

[code]

[/code] or [code=css] [/code] or [code=php] [/code] or [code=javascript] [/code] etc tags, gives the highlight to keywords and structures, and makes it easier for those reviewing, and on occassion has been known to jump out the screen and scream at the OP look at me, Im misspelled, making the fix very apparent <--attempt humor, lame, had to shoot it

almostbob 866 Retired: passive income ROCKS

my version of the javascript

<script type='text/javascript'>
function boxTicker(formName, boxId){ 
var box = eval("document.getElementById(boxId)");
if (box.checked == false){ box.checked = true;
alert("Ticked!");
}
}</script>

getelementbyid is a singleton (there can only be a single element with 'id', no parent dom elements but document are required, you could function boxTicker(boxId){ } in this method onclick works(dunno why), onchange would be better, else you may submit a potentially blank form

almostbob 866 Retired: passive income ROCKS

Textboxes dont respond well to onclick
onchange onfocus onblur are the methods more commonly used
I would try the same <input> with the javascript attached to 'onfocus'

almostbob 866 Retired: passive income ROCKS

Oh i haven't noticed that.! i only have '}'...sorry,.

why people get POed,
get a code highlighting editor, and debug your own stuff before you ask
'I tried this and found that and dunno what to do next'
will get more help than
'I know its right'
when everybody else can see it isnt

almostbob 866 Retired: passive income ROCKS

Any effort by the op would discover mismatched braces
Screwem, do their own damn homework

almostbob 866 Retired: passive income ROCKS

its a function of keyboard layout
not everyone uses EN-us keyboards
the keyboard mapping for other languages, even other subsets of EN, changes the location of keys, and may move non-standard (in the active language character set) characters to 'third' function positions
dlannetts answer may be expanded to, 'this is where it mostly is, but look everywhere'

almostbob 866 Retired: passive income ROCKS
$sql=mysql_query("Select * from students where voted=1 group by department order by course");
$sql=mysql_query("Select * from students where voted=1 group by course order by department");
$sql=mysql_query("Select * from students where voted=1 course=%s group by department order by name", $session['course']);

combinations of group by order by produce widely different and often interesting results
the last one, is unchecked, I always messup replaceable parameters in mysql please check the format at a reputable instruction site
%s is replaced by the content of $session

almostbob 866 Retired: passive income ROCKS

Bingo

pdf is a proprietary format,
and there is a known problem with firefox, there is a solution,
http://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox
you can put the target back

>87% of potential users(those not using firefox + those who have patched firefox) will see the pdf as intended

**edit** If i were alert, that would have been the first question
IE bugs make news
FF bugs make fixes