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

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

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

Yes there is.

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

? maybe

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

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
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

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
the same thing, bold <b> this text</b> in a string</p>
the same thing, bold {\b this text} in a string \par

to accomplish the same thing, bold this text in a string
to display rtf codes in html you have to use something to parse the rtf escape codes to html tags
you already use nl2br which creates <br> tags for (#0d;#0a; pairs) or (\n) in the file
there is a class rtf2html, have no idea how good it is or how $.
or you could google search or search sourceforge

write a parser to search each line and replace each {\code{space} with <code> and each } with </lastcode>
and \code{space} with <code>
but, the opening of each enhanced block could be on a preceeding $line so you have to drop the 'open' codes in a temp array until they are closed. I experimented with simple search replace and got bogged, way better if someone has already done it

almostbob 866 Retired: passive income ROCKS

without coding the sql this is a thought process only
create a table in the database temp_bans.
with colums for username logintimestamp failurecount banned

on login {
if temp_bans.username AND banned AND timestamp+20minutes > timenow die( you are banned until ($timestamp+20minutes))
if login fail {
if not temp_bans.username { create temp_bans.username }
update temp_bans.username increment falurecount timestamp
if failurecount=5 {update temp_bans.username (banned=yes failurecount=0)}
}
if login succeeds {delete temp_bans.username}
}
with a little thought this is only a single sql query, not up to thought at the moment

almostbob 866 Retired: passive income ROCKS

show the code you are using, and the file structure of the text file

almostbob 866 Retired: passive income ROCKS

Security through obscurity
you cant be totally secure but you can be obscure
can use a password in the form that isnt called 'password' to stall sniffers
encrypt the password entered and only send the encryption to be compared with the encryption stored on the server. thats ideal use for javascript onSubmit(some md5/crypt script)
Ya do the same on your newuser script so when the user creates themselves the password is never sent, only its encryption.
many sites say 'we cant recover your password, but we can reset it', and make you reset your password again when they send you a string
but you cant validate in the browser, else you would have to download a large amount of secure information to every user, some of whom may be malicious

almostbob 866 Retired: passive income ROCKS

yes, the javascript filename is referenced in the html in clear <script language="javascript" type="text/javascript" src="http://www.-mysite-.com/script.js"></script> anyone typing that src into a browser can read the javascript
validation is done securely on the server. php or Ajax -javascript+php- are possible approaches.
google ajax validation
javascript is good for confirming the form of the password, before it is validated, a javascript searching for blank saves ajax calls to the server
google javascript validation
but unless you are https: connected the password and files are in clear between user and server anyway.
md5 hash the password in the browser and compare the hash value with the a stored hash on the server, harder, but not impossible to crack.
but, unless your are making a
Mad
Industrial
Scientists
Taking
A
Killing
Edge,
secret site,
how secure does the password need to be

almostbob 866 Retired: passive income ROCKS
$search_query = "SELECT clientid, additionalownerid, additionalpropertyid, officeref, title, firstname, lastname, email1, email2, tel, mobile, identification1, identification2 from clients WHERE clientid = clientid "; 
if($clientid != ''){ $search_query .= " and clients.clientid = '$clientid' "; }
if($officeref != ''){ $search_query .= " and clients.officeref like '%$officeref%' "; } 
if($title != ''){ $search_query .= " and clients.title like '%$title%' "; } 
if($firstname != '' ){ $search_query .= " and clients.firstname like '%$firstname%' "; }
/* 
etcetera 
*/
$search_query .= " order by lastname";

the conditional where clauses (if statemenst) were not in WHERE , they were part of ORDER BY by the order they were processed

almostbob 866 Retired: passive income ROCKS
AND b.date  BETWEEN CURdate( )  AND  DATE_ADD(CURDATE(), INTERVAL +9 DAY)
almostbob 866 Retired: passive income ROCKS

Google (asp slideshow) is your friend
the actual getting off your proverbial to find the one that is appropriate of the 1.5 million responses I leave to you.
Nothing, ever, has to be manually updated, thats why server languages exist

almostbob 866 Retired: passive income ROCKS

-onFocus onBlur
onfocus onblur are lower case keywords in xhtml

At least now I am certain, my javascript is terrible,

please what does setting the field blank if it is blank on mouseover mouseout accomplish

almostbob 866 Retired: passive income ROCKS

javascript statements end in ' ; '
strict means you have to complete your javascripts,

<input type="text" name="keyword" class="text" size="12" maxlength="30" value="" onFocus=" if (value == '') {value='';}" onBlur="if (value == '') {value='';}" /></td>

not sure if it isnt supposed to be

<input type="text" name="keyword" class="text" size="12" maxlength="30" value="" onFocus=" if (self.value== '') {self.value='';}" onBlur="if (self.value == '') {self.value='';}" /></td>

coz I dont write strict, still in html 4.01 trans,
or is it

<input type="text" name="keyword" class="text" size="12" maxlength="30" value="" onFocus="JAVASCRIPT:if (self.value== '') {self.value='';}" onBlur="JAVASCRIPT:if (self.value == '') {self.value='';}" /></td>

I have no idea
my javascript sux, incidentally so must yours,
else why 'If this field is blank set this field to blank' (twice)

target='_self' forms take action='self' w3.org-forms
self is redundant,
can be written as action='<?php echo $_SERVER['PHP_SELF']; ?>' (in php) and is equally redundant <form action=""> will get it back here

almostbob 866 Retired: passive income ROCKS

both else statements are redundant
else
blue = blue

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

Get
notepad++
notepad2
vedit,
any editor that shows syntax highlighting
they show proceedural/syntax errors very well, the text is the 'wrong' color for keywords if any required punctuation, or structures are missing.
from the point where the missing item is,
so it is easy to locate

almostbob 866 Retired: passive income ROCKS

test Just the update file
on your local server run the update.php against a blank(empty) b12.txt and examine the stored data,
then against an edit of the edited file
using the modified $text = stripslashes($_POST['update']);$text = stripslashes($_POST['update']); if that works the bug is elsewhere,

it should work
and the bug should be elsewhere

almostbob 866 Retired: passive income ROCKS
$text = stripslashes($_POST['update']);

Sorry Ardav, in between reading the post and answering

almostbob 866 Retired: passive income ROCKS

does a javascript submit refresh the page?

I ask, I dont use javascript much
'selected' is written by the server
if a javascript submit does not refresh the page selected will not be written,
I think..?

almostbob 866 Retired: passive income ROCKS

google for google webmaster tools
get a webmaster account
read the webmaster helpscreens
optimize your design according to the rules posted
submit your site for indexing
dont use any SEO sites till after you read the google info,
there are some link exchanges that get you delisted

almostbob 866 Retired: passive income ROCKS
echo "<meta name=\"description\" content=\"".$row{'Name'}." - ". substr($row['Description'],0,strpos($row['Description'],' ',150)) ."\">\n";

I think that this will break the string at the first whitespace after 150 characters

anyone seen the fingers crossed icon :)

almostbob 866 Retired: passive income ROCKS

Is the re-write in .htaccess means even I type page.php?id=3&t=456 it all redirects to a certain url like "page/3/456"?

ya some thing like that...
it depends on our rewriting rule...

in this particular case noob,
the rule loads the file in the ?id=3&t=456 but makes the url display as page/3/456 so that the user and searchbots see a nice tree structure of files in folders that may not exist, but work like they do.
the site may be stored in database table 'alpha' and not have more than index.php in a root folder, at extreme.

almostbob 866 Retired: passive income ROCKS
echo ("
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">

the first dquote in the style declaration ends the text in the echo statement, then there is no semicolon, variable, dot, or other structure php understands so there is an error
replace the dquotes in <style type="text/css"> with single quotes or escape them.
and check the rest of the script <p class="style1" .
These would show up (like above) if you had an editor with syntax highlighting, as do unclosed braces <div>without</div> etc
i use a notepad replacement(google) for that reason

almostbob 866 Retired: passive income ROCKS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- @(#) $Id$ -->
<head>
 <style>
 .left {width:15%; left:0; top:0; position:fixed;}
 .right {width:7%; right:0; bottom:0; position:fixed;}
 .middle {width:74%; margin-left:17%; margin-right:9%;}
 </style>
 <title>HTML demo Template</title>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
 <meta name="Generator" content="almostbob" /> <!--Humor-->
 <meta name="Keywords" content="your,keywords,here" />
 <meta name="Description" content="." />
 <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<body>
<div class='left'> left<br>left<br>left<br>left<br>left<br>left<br>
left<br>left<br>left<br>left<br>left<br>left<br>left<br>left<br>
left<br>left<br>left<br>left<br></div>
<div class='right'>right<br>right<br>right<br>right<br>right<br>right
<br>right<br>right<br>right<br>right<br>
right<br>right<br>right<br>right<br>right<br>right<br></div>
<div class='middle'> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> 
middle middle<br> middle middle<br> middle middle<br> middle middle<br> middle middle<br>
</body>
</html>

css positioning of the divs or in your case images styled similarly makes it quite easy
the two divs left and right are set at top and bottom of window, because ya can, positioning is easy to modify

almostbob 866 Retired: passive income ROCKS

may be present but not enabled for this folder
if the commerce package is 'theirs' the host may not want any rewrite of the urls to 'break' the shopping cart (thought process only not suggesting any impropriety)
can only ask the provider
too many possibilities to examine via thread posts

almostbob 866 Retired: passive income ROCKS

have you determined that mod_rewrite is enabled in your server
500 Internal server error often means the module is not compiled in

Shanti C commented: Thank You .... +3
almostbob 866 Retired: passive income ROCKS

And
validate the form on submit,
and if any field fails validation
you send the form back for correction/resubmit

almostbob 866 Retired: passive income ROCKS

Why not echo $username and see what is being posted

<?php
if isset($username) {echo $username; }
If (isset($_POST['username']))
 { echo $username."was posted";
 echo "Username Entered"."<br />"; }
Else  { echo $username."was posted";
 echo "Username Not entered"."<br />"; }
?>
almostbob 866 Retired: passive income ROCKS

<button name="name" value="submit" type="submit"><img src="image" alt="alt"></button> creates a form submit that does not care about its own xy loaction

almostbob 866 Retired: passive income ROCKS
<table rules='all' border='0'>
<tr><td>X<td>&nbsp;<td>&nbsp;
<tr><td>&nbsp;<td>X<td>&nbsp;
<tr><td>O<td>O<td>X
</table>

theres no need for anything fancy, table has a rules property that does what you ask

almostbob 866 Retired: passive income ROCKS

When you place your web page online, EVERYONE has access to your source code.

sematic error (pedantic error :) )
everyone has access to the output
perl and php means that they dont see the source code, I get paid for that

almostbob 866 Retired: passive income ROCKS

and/or update the table with a last_visit column and do the same exist check to post the current timestamp to last_visit

query = mysql_query(sprintf("select id from visitordetails where ip='%s';", $_SERVER["REMOTE_ADDR"])); 
list($id) = mysql_fetch_row($query); 
if (strlen($id))  { 
if (!mysql_query(sprintf("UPDATE visitordetails SET visitcount = visitcount + 1, lastvisit='%s' WHERE ip ='%s';" ,$timestamp, $_SERVER["REMOTE_ADDR"])));
{ return false; } 
return true;
almostbob 866 Retired: passive income ROCKS

or install the geoip library
and map the locations from the ip and crate a googlemap mashup of the ip locations

almostbob 866 Retired: passive income ROCKS

Dont format the date until you pull the data out of the database
its much quicker to update the table or perform compares when later reporting if the data is timestamp

and

<?php
$timestamp = time();
$timeout = $timestamp - 1500;
//Insert User
$insert = mysql_query("INSERT INTO TG_whos_online (timestamp, ip, file) VALUES('$timestamp','".$_SERVER['REMOTE_ADDR']."','".$_SERVER['PHP_SELF']."')") or die("Error in who's online insert query!");
//Delete Users
$delete = mysql_query("DELETE FROM TG_whos_online WHERE timestamp<$timeout") or die("Error in who's online delete query!");
//Fetch Users Online
$result = mysql_query("SELECT DISTINCT ip FROM TG_whos_online") or die("Error in who's online result query!");
$users = mysql_num_rows($result);
//Show Who's Online
if($users == 1) {
print("<span>$users Person Online. &nbsp;</span>\n");
} else {
print("<span>$users People Online. &nbsp;</span>\n");
}
?>
/*
This is the database creation SQL. You will need to create this table in your MySQL database.
*/ 
 
 CREATE TABLE `TG_whos_online` (
  `id` bigint(20) NOT NULL auto_increment,
  `timestamp` int(15) NOT NULL default '0',
  `ip` varchar(40) NOT NULL default '',
  `file` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `ip` (`ip`),
  KEY `file` (`file`),
  KEY `timestamp` (`timestamp`)
) TYPE=MyISAM;

add a visitcount column to the database

$query = mysql_query(sprintf("select id from visitordetails where ip='%s';", $_SERVER["REMOTE_ADDR"]));
	list($id) = mysql_fetch_row($query);
	if (strlen($id)) 
		{
		if (!mysql_query(sprintf("UPDATE visitordetails SET visitcount = visitcount + 1 WHERE ip ='%s';", $_SERVER["REMOTE_ADDR"])));
		{	
		return false;
		}
		return true; 
		}

and/or update the table with a last_visit column and do the same exist check to post the current timestamp to last_visit

almostbob 866 Retired: passive income ROCKS

code samples at
http://javascript.internet.com/forms/
www.dhtmlgoodies.com/index.html?page=calendarScripts
http://webscripts.softpedia.com/downloadTag/calendar+script
http://www.dynamicdrive.com/dynamicindex7/

probably Hotscripts
script dungeon

many script repositories have calendar scripts that fill form fields for you
The better ones use hidden/shown layer dhtml calendars instead of popups, popups can be blocked by browsers

almostbob 866 Retired: passive income ROCKS

Where is the HOSTS file?

All about Hosts files, and a very good one
http://mvps.org/winhelp2002/hosts.htm

almostbob 866 Retired: passive income ROCKS

there is always something more, to do,
not always practical, but always something
a thumb drive with a bunch of portable apps on it, for recovery and antivirus, can clean the pc when I do something really stupid (1-3/month) the infection in the host pc cant block the scanner or its update, the pc does not know of the software on the flash drive
Avast
MWAB
CClean -not as a registry cleaner, snake oil
super anti-spyware
1-2-3 Spy Free
all have thumb drive versions
ant-spyware programs are good to have in multiples, as the update delay and detection ability varies, each can find things the others might miss

almostbob 866 Retired: passive income ROCKS

How about a URL? What you posted is not a complete page, and may not appear the same as on your page (if anyone takes the trouble to copy it to a file).

of course its not a complete page,
its a code scrap
a css demonstration
tabulated layout without a table
If a person cant be bothered copy and paste, then *expletive deleted *
access to my source code ? I get paid for that