almostbob 866 Retired: passive income ROCKS

php and sql/mysql/mssql
an sql/mysql/mssql (depends on your host) database containing the name description actors review image(or link to the image) all the fields you need
the initial list page is generated from the database of names.
Click the link and it populates a php template with the contents of the database fields.

1 database
1 entry page
1 query page
1 template page
=
as many pages as you need, Search engine visible, etc
there may be a script available for download, even if you dont use the scripts they provide insite in how it works and makes the development easier
(there are many that scrape imdb to populate your database, a little nasty)

almostbob 866 Retired: passive income ROCKS

using
SSI server side includes for html
or
PHP a serverside preprocessor
easy
in html the fix is a kludge
not all browsers support iframes
In each html file where the menu is supposed to be

<iframe src='menu.html' frameborder='0'>The menu is in an iframe that your browser does not support, you are stuck on this page forever ha ha ha</iframe>

in the menu.html file

<a href='pagename1.html' target='_top'>page1</a>
<!-- repeated menu for as many as there is all with target='_top' -->

the files should all be properly coded to validate under the schema in use, this is just the clip needed
ssi or php are a single line include on each page

almostbob 866 Retired: passive income ROCKS

Can you comment on code so as I ca understand better

First two, . is the default for current folder, as .. is parent
third one

take the current script name as known to the server and break it at the last / character
substring of the server array, from position 0 to the position of the last /
this gives the documentroot path to the current folder

Stefano Mtangoo commented: Great help Man! -- I'm just starting PHP +3
almostbob 866 Retired: passive income ROCKS
include("./thisfile");
<link rel="stylesheet" type="text/css" media="screen" href="./style.css">
$basedir=substr("$_SERVER['SCRIPT_FILENAME']",0,strripos("$_SERVER['SCRIPT_FILENAME'],"/",0));

just some of the diff ways to find the same thing

almostbob 866 Retired: passive income ROCKS

each included file can be only that part of the html that they need to be
full xhtml for all will give validation errors

<?php
include('doctype.inc.php'); 
echo '<title>'.$pagetitle."</title>";
include('header.inc.php');
include('menu.inc.php');
include("$pagename");
include('footer.inc.php'); ?>

is valid as long as the included files contain the required html (or php to generate the required html obviously) in the required order
there is no requirement for those filenames, that is the code for the dynamic pages of my site
at the end of the day it appears to be a full tree-optimised structure that works well SEO, There is a mod_rewrite rule that displays
mysite.com/folder/file
from
dynamic.php?filename

buddylee17 commented: We must have posted at the exact same time. Good explanation. +4
almostbob 866 Retired: passive income ROCKS

simply No
more complex No, but

No you cant avoid some differences http://www.browsershots.org will show you just how different the views of any page are in the different browser screen OS machine combinations there are
If you code to standards your site will look similar enough to be recognizably yours
but look the same on everything from a 2inch blackberry to a 42inch display, Cant happen

My only thing(pet hate, bitch, etc) no fixed sizes, pixel are for pictures, everything else in % or ems, so that the layout adjusts to screen & window sizes and flows.

Google for good design, not search them, look at Google design, plain simple balnk page that just works. No flash, no music, no 55 images, KIS

almostbob 866 Retired: passive income ROCKS

index.php?directory=G:\xampp\xampp\htdocs\images
I get errors if the directory is not quoted

opendir(G:\xampp\xampp\htdocs\images)
opendir(".")// note the quotes in the original
opendir("G:\xampp\xampp\htdocs\images")

quotes are still important
the variable gets

opendir("$directory") // Note the quotes

and works

every function("string") has to enclose the string in quotes,
include("filename")
fopen("filename")
fclose("filename")

almostbob 866 Retired: passive income ROCKS

I'm coming in to the middle part of this
but whenever I have something that works with a fixed value, that doesnt work with a variable, I left the quotes out
Debugging is fastest if you use the same value of the variable as the original fixed value
index.php?directory=.

check the exact format of the variable
if the original is readdir("."); the replacement variable should be readdir("$directory"); the quotes are still required and dquotes should parse properly

almostbob 866 Retired: passive income ROCKS

NOW() is an sql mysql mssql function not a php fuction in php time() is now
as well as the slightly buggy print code

<?
if ($registerend < time()){
print "Registration has ended";
}else{
print " <a href='/registration/new/register.php?id=".$event['id']."'>Click Here to Register</a>";
} ?>

Its possibly more portable, for more than one event running at close to the same times, to use the event array to hold all the relevant data for each event

if ( $event['registerend'] <time()) {/* code */ }

well I hope you get busy enough to need more than one event running at a time

almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS

two methods

<div style='border:1px solid #000000'>
<a onclick='putithere.innerHTML="moped";'>Mercedes</a><br>
<a onclick='putithere.value="taxi";'>BMW</a></div>
<textarea id='putithere' name='putithere' rows='5' cols='50'>&nbsp;</textarea>

there are probably more

almostbob 866 Retired: passive income ROCKS

google supply google rss newsfeeds,
so I cant see why not
I'm in google and I scrape CBS BBC ninemsn truro daily cape breton daily and amherst daily for relevant articles.
get hits to the news pages refered from google
the rss2html validates ,
the copyrights remain and are in every article
all the bots care about

almostbob 866 Retired: passive income ROCKS

Precisely that, the thumbnail is a preview of yahoo news in feed2html

almostbob 866 Retired: passive income ROCKS

RSSto html php scripts abound
Feed2HTML I use to display amherst & truro News, towns we work
rss feeds are free anyway, you just go to the news source you want, find there rss feed usually labelled with a cute red rss button and plug its address into the builder script

almostbob 866 Retired: passive income ROCKS

follow macneatos post
and
add a blank space equal to the height of the footer to the image, OR
add a colored bar equal to the height of the footer to the image and dont set bground color in css to the footer

almostbob 866 Retired: passive income ROCKS

also good for

.bottomright {bottom:0 right:0 }
.menu {right:0; top:100px; width:15%;}
<body><a name='top'></a><a class='bottomright' href='#top'>&uparr;Top</a>
<div class='menu'> Your menu </div>
<!-- 1000s lines of html code that scrolls the page -->
</body></html>

and assorted stuf with logos copyright notice and anything else you want to stay in one place when the text scrolls around it

almostbob 866 Retired: passive income ROCKS

]float:none or just leave out 'float' for the text divs, they will flow around the image.
IE does not behave as standards dictate, but standard compliant code renders properly in IE (this time)
The easiest way is

<div id=container>
<img style='float:left width:128px height:128px;' src='whatever/it/is.jpg'> <div id="DIV2" style="background:#ccc">Content would go here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a turpis id leo porttitor ullamcorper. Praesent facilisis. Aenean tempus rhoncus est. Sed ut risus et metus condimentum hendrerit. Maecenas vestibulum. Donec tempor lacinia diam. Suspendisse potenti. Sed metus massa, pretium vel, ullamcorper et, interdum a, ante. Sed a augue.</div></div>
almostbob 866 Retired: passive income ROCKS

scuse me, until this showed as new post in my folder I didnt know I hadnt posted the link that went with it
another headslap

should have been
Yes there is
http://www.mjijackson.com/shadowbox/doc/support.html
shadowbox is rather spectacular

almostbob 866 Retired: passive income ROCKS

Yes
but it uses server side processing
known available languages php asp perl python
to parse the .doc file to html, so it is not done in html or css

Edit script states, 'word documents saved in .rtf format'

almostbob 866 Retired: passive income ROCKS

Yes there is.

almostbob 866 Retired: passive income ROCKS

You dont have to reinvent the wheel, its all been done before and available for download, http://www.google.ca/search?hl=en&q=verify+date+javascript&meta=
I have used the one at javascript.internet.com

almostbob 866 Retired: passive income ROCKS
if( $r['whattotal'] == '0' ){ echo "Less";}

? maybe

almostbob 866 Retired: passive income ROCKS

I read it.

The proper unit of measure for resolution-independent text is the point. It is defined as 1/72 inch on the monitor. The em depends on the font chosen, so it is not a constant.

Screen fonts are not supposed to be fixed
Fixed text sizes do not conform to W3 standards for accessibility
for the partly blind, moles, voles, the kid with the coke bottle glasses and me,
If some **expletive deleted** sets a fixed text size the page is unreadable, the base font sent on my screen is 45point, relative dimensions ems or % scale around my base font.
fixed fonts in px or pt are jst a fuzzy grey blob.

If it doesnt look good with a different font size, recode the page and do it right.

The most popular page - Google, css xhtml compliant, Only relative font sizes
this site, better than most, has fixed fonts,
-but we coke-bottle glasses, can click a button and change the basefont, so its visible

If ya dont know, and I hope ya dont find out, it sux,
dont speak.
& please start using relative everythings

almostbob 866 Retired: passive income ROCKS
peter_budo commented: Ah why did you have to destroy game? Students are supposed to investigate, but yes captchas are other option... +14
almostbob 866 Retired: passive income ROCKS

http://www.clickablemaps.com/uk_eire.html
includes how to make other maps as well as the downloads

almostbob 866 Retired: passive income ROCKS

Your right, its me reading the w3 page, height='pixels' thinking it meant you had to put the dim in
pixel is the default
do the browsers work with inline styles < style="height:128px;width:128px" >

almostbob 866 Retired: passive income ROCKS

goto google webmaster tools
read the instructionsthat will tell you what works and what does not, and what SEO really is
follow the instructionslots don't
submit the sitewhen set up properly to google yahoo msn ask
Dont submit the site before following the instructions, it is harder to get re-indexed than it is to get indexed
dont waste time on link exchange services, they mostly have a negative effect, search engines know the source of scripts containing those links and treat them with the contempt paid links deserve
do put your sitename in signature blocks on appropriate (related) forums

dont waste time and effort on SEO sites,
ask the search engine,

incidentally google analytics is spyware (asa are yahoo analytics and msn analytics), it attempt to install a script on the users computer without permission record data and send it to a third party, the classic definition of spyware.
google analytics(et al) is explicitly blocked by Spybot's immunize feature and by all the downloadable Hosts files.If you do not see 10 consecutive views to your home page 2 minutes apart from 24.137.21.111 13:00gmt(me) then the results you get from analytics (et al) are not reliable.
Use serverside logging, if you dont have access to the apache or iis server logs (many inexpensive hosts do not), there are ASP and PHP scripts that run on the server and are not blocked)

almostbob 866 Retired: passive income ROCKS

Why
some wont see it flash is blocked
others will avoid the site because it uses flash
why not shoot yourself in the foot if you want to cripple yourself

almostbob 866 Retired: passive income ROCKS

many browsers discard measurements without a unit <img src="...path.." alt="text if image is missing" height="128px" width="128px" />

almostbob 866 Retired: passive income ROCKS

does the host have a helpscreen with the server names
ours is a cheap host and to avoid phone calls there is a page outside the control panel
that lists

mail.[yoursitenam].com
smtp.[yoursitenam].com
mysqlhost.[yoursitenam].com
ftp.[yoursitenam].com
ssh.[yoursitenam].com
controlpanel.[yoursitenam].com

etc

diafol commented: Thanks for the help +3
almostbob 866 Retired: passive income ROCKS

it may be due to the different document models
this script works on linux macs windows in safari ie firefox,
Its not mine,
the differing dom modelsshow in the first few lines of code

(document.getElementById) ? dom = true : dom = false;
function hideIt() {
if (dom) {document.getElementById("layer1").style.visibility='hidden';}
if (document.layers) {document.layers["layer1"].visibility='hide';} }
function showIt() {
if (dom) {document.getElementById("layer1").style.visibility='visible';}
if (document.layers) {document.layers["layer1"].visibility='show';} }
function placeIt() {
if (dom && !document.all) {document.getElementById("layer1").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1))}
if (document.layers) {document.layers["layer1"].top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1))}
if (document.all) {document.all["layer1"].style.top = document.body.scrollTop + (document.body.clientHeight - (document.body.clientHeight-y1));}
window.setTimeout("placeIt()", 10); }
window.onload=placeIt;
almostbob 866 Retired: passive income ROCKS

Good day to everyone!

I just want anybody to correct my code. The code tells that when i click on the button it will dispay a msg that will confirm if the client really wants to add the information, If yes then he will be redirected to another page, if no then the page that contain the onclink confirm will retain to its current status.

Here is my code pls help:

<input name="" type="submit" OnClick=\&quot;return confirm('Are you sure to submit this payment transaction.?);\&quot;" value="Submit Payment" >

When the client click yes.he/she will will redirected to another page.If no, then the current page will retain its current position.

Pls help.!

Yes
that is what happens, you can test it if you want
make a file success.html with a message 'success' in it
and a test file

<form action='success.html'>
<input type='submit' onclick="return confirm('are you sure');">
</form>

You dont need any other BS functions or the overhead they add

PinoyDev commented: Very helpful.Great solution +1
almostbob 866 Retired: passive income ROCKS

It has been done beofre, so often the easiest way is to google for what you want, then read the script source to see how they did it, and implement something similar

http://www.stadtaus.com/demos/voting_script/voting_image_options_en.php

http://www.google.ca/search?hl=en&q=graphical+poll+script&meta=

almostbob 866 Retired: passive income ROCKS

http://software77.net/geoip-software.htm, not web77 headslap moment

almostbob 866 Retired: passive income ROCKS

Is there a realiable way?

No
Geolocation IP addresses is only as accurate as the last time the dbase being queried was updated
IP2Country updates 2-3 times daily, but its a 'expletive deleted' to install, effective though at web77.com
IP2location daily, but you have to pay for it

almostbob 866 Retired: passive income ROCKS

I have one Map-IP, you'll have to google it
out of the box it only plots the current user, but it easily adjustable

almostbob 866 Retired: passive income ROCKS

This is a script for a paid to click site, where i sell referrals, and i want to sell only those that were active last 48h...

And $lastlogdate is used accross all the script (10 times in admin panel, 5 times in main site)...but if this is better ill have to change it...

One question: Does date(lastlogin) displays hours and minutes too? Cause script has a feature to detect double accounts by last log in time e.g. if ten accounts log in one after another it displays them and i can investigate it further...

BTW i always add +rep for help :)

Datelastlogin if stored as the timestamp, stores all the way to milliseconds (precision +-3milliseconds in sql (I think))

used multiple times in the site, a lot of lookups makes timestamp even more promising,

have you considered session or cookie to store the datetime so you only access the DB once

you just extract the part you need to analyse using php inbuilt date time handling functions
where you use F j, Y - g:i a
you can use date(F j, Y - g:i a, $datelastlogin)
or date_add or date_diff or time
the timestamp is much more versatile
you could update your table layout so the date field is a 10digit numeric instead of text,blob,varchar, or whatever it is now, and gain speed and smaller DB size

Not so much for 3000, but 300000 * 250bytes(blob) smaller is a V.smaller …

almostbob 866 Retired: passive income ROCKS

I've only learned one thing about DB design

store date and time as timestamps its a lot faster to compare numeric timestamps than text date/time stings

almostbob 866 Retired: passive income ROCKS

The only thing to say is,

You don't have to reinvent the wheel

there are hudreds(1000s) premade for download and plugin to your site
Hotscripts: php upload files

DosVdanye

almostbob 866 Retired: passive income ROCKS

to edit the data entry scripts about 2 minutes
to run a table update on live users and inactive users for 3000 members ~1.5 seconds
to do strtotime manipulation on every data entry for 3000 users ( 3million users (plan on growth)) just getting longer every day,
You can kludge it together with spit and wire like the wright brothers plane,
and it will fly,
a little, once, for 300yards
or you can design a plane that will fly
You will have to correct the design eventually, the processing bottleneck creating and comparing timestrings will mess you up.
fix it while the DB is small

Will Gresham commented: Good words, said much better than I managed +1
almostbob 866 Retired: passive income ROCKS

Most database problems are because the designer is trying to store the data in a Human readable form not a machine readable form
the database is for the computer, not for people
store last login

$lastlogdate = time();
UPDATE users SET lastlogdate=time() WHERE username=%S, $nicke

or have the sql update the timestamp as the sql record is being updated not as the php is being processed
no formatting or anything else, you can make it look however you want on the output string without screwing up the storage.
then you can simply find dates by comparing them with

select * where date(lastlogin) = date(now()) /*today*/
select * where date(lastlogin) = date_add(now(), interval -1 day) /*yesterday*/
select * where date(lastlogin) >= date_add(now(), interval -7 day) /*anytime this week*/

update table
change the database design model to store the timestamp, its smaller and faster, and simpler to do a

update table lastlogin = strtotime(lastlogin)

once than mess with string handling it for every entry

almostbob 866 Retired: passive income ROCKS
function go(page) { 
If !(page = "") { 
document.go.view.value = page;  
document.go.action = document.go.action+"&page="+page; 
document.go.submit(); 
}
}

my javascript is rusty, but this should only work if page is set

almostbob 866 Retired: passive income ROCKS
<select name='almost' id='bob' onchange="javascript:return confirm('Are you sure you want to change this setting ?')">
<option>blue</option><option>green</option><option>red</option></select>
<input type='submit' onclick="javascript:return confirm('Have you completed all required fields form will not submit untill complete ?')">

'javascript:return confirm(text query)' works for me in many applications

almostbob 866 Retired: passive income ROCKS

That was abount the most stupid post I have sent

I think I will edit it out
wish there was a delete button

almostbob 866 Retired: passive income ROCKS

inside the for each in array_post loop,
then only table rows for items in the post array will be generated.
no need for 'suppression'
I should have read this post before the other post

if (isset($_POST)){
   foreach($_POST as $k => $v){
      if(is_array($_POST[$k])){
         foreach ($_POST[$k] as $k1 => $v1){
            eval("\$$k" . "[". $k1 . "] = myAddSlashes(\$v1);");
         echo "<tr><td>".$k.":</td><td>".$v."</td></tr><tr><td>".$k1.":</td><td>".$v1."</td></tr>";  
 }
      } else {
         eval("\$$k = myAddSlashes(\$_POST['$k']);");
       echo "<tr><td>".$k.":</td><td>&nbsp;</td></tr>";  
  }
}
}
?>

(sort out the field names I didnt check)
(count the braces, I didnt check whether the echo statement is inside the right loop)
echo &or sprintf dependant on where you're putting the data.

almostbob 866 Retired: passive income ROCKS
if(isset($cycling1)) {echo "<tr>
   <td>Cylcing 1:</td>
   <td>".$cycling1." </td>
</tr>
<tr>
   <td>Cycling Experience 1:</td>
   <td>".$cyclingEx1." </td>
</tr>"; }

if(isset($fasterthanaspeedingbullet1)) {echo "<tr>
   <td>fasterthanaspeedingbullet 1:</td>
   <td>".$fasterthanaspeedingbullet1." </td>
</tr>
<tr>
   <td>fasterthanaspeedingbullet 1:</td>
   <td>".$fasterthanaspeedingbulletEx1."</td>
</tr>"; }

if(isset($leaptallbuildingswithasinglebound1)) {echo "<tr>
   <td>leapingtallbuildingswithasinglebound 1:</td>
   <td>".$leaptallbuildingswithasinglebound1." </td>
</tr>
<tr>
   <td>leaptallbuildingswithasinglebound Experience 1:</td>
   <td>".$leaptallbuildingswithasingleboundEx1."</td>
</tr>"; }

if(isset($morepowerfulthanalocomotive1)) {echo "<tr>
   <td>morepowerfulthanalocomotive 1:</td>
   <td>".$morepowerfulthanalocomotive1." </td>
</tr>
<tr>
   <td>morepowerfulthanalocomotive 1:</td>
   <td>".$morepowerfulthanalocomotiveEX1."</td>
</tr>"; }
almostbob 866 Retired: passive income ROCKS

Try this type of 'goto top' link
the style would be in a styleshweet in a page but this is an example

<a href='#top' style='background: transparent; top: auto; left: auto; bottom: 1px; right: 1px; position: fixed;'> GoTo Top </a>

creates a link that remains in the bottom right corner of the window on resize or scroll and always links to the top of the page.
Its the last line in the include(menu) so appears on every page

almostbob 866 Retired: passive income ROCKS

Sure is
Google for something like 'utube clone script' 'drop in video script'
'video player for my website'
You'll get hundreds of them. Most of which are easy to install, just copy the files to the server, and make a link somewhere on the page to them
that code makes a 4KB file when you paste it in, so its not big (really :))
just daunting to look atit
it loops through the folder and make
<a onclick='videoplayer1.src.="filename";'>filename</a> buttons

if you save that code as 'index.php' in the 'videos' folder, all you need in your web page is

<a href='./videos/'> Play Videos </a>

and it'll work, (if your host supports php, some hosts don't)

not suggesting that its the only way
You could even just put the videos on utube and make a link to them there

almostbob 866 Retired: passive income ROCKS

How have you made the colored bars
Show code

almostbob 866 Retired: passive income ROCKS

Goto the google webmaster tools page
Create a google webmaster account
Read What google actually search FOR when the Bots spider a page
Correct your design to match
create a sitemap
submit to google

Repeat for Yahoo
Ask
MSN
et all