almostbob 866 Retired: passive income ROCKS

if stored clear in the database and transmitted in clear between the pc and the server its not a password its an invitaion to packet sniffers

hash: Md5 sha or otherwise (md5 serverside | md5 clientside) the password and verification of the password on the pc at account setup, and transmit & store the hash in the password column
hash the entry password on the pc and send the hash for verification
nobody knows what the password is, sniffers can't read the password

Users will continually make errors in this 4th char 3rd char crap
even if you ask for their name as a password people will count characters wrong

almostbob 866 Retired: passive income ROCKS

just began reading this thread,
the cut n paste scripts are out of date ,
use deprecated code
"check for IE4 NS4 "
ie is at 8
Nestscape is a dodo, its extinct
replace the scripts
problems solved
<script language='javascript'> should be <script type='text/javascript'>

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

when the file ends and the buffer is flushed
the result is the error noted in the op
the echo statements are before the redirect,
remove the echo and the code works
ergo error is the echo statements

almostbob 866 Retired: passive income ROCKS

do not store separate date and time
store a single unix timestamp or sql datetime (both of which can output date, time, or date and time

then just
select max(dategps.datetime)

almostbob 866 Retired: passive income ROCKS

there can be no output to the browser before redirects
remove the echo statements at 18 19
those statements are useless
the two possible outcomes of the upload are covered by the if statement at 26

almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS
<?php
/* this file is called with url parameters ?firstname=Jon&lastname=Rama&gender=male
full_name is a concatenation of firstname lastname */
$full_name=$firstname.'_'.$lastname;
$file = $full_name.'.php';
if (file_exists($file)) { die("$file already exists"); }
$text="<table width='100%'><tr><td align='center'><b><h1 class='title_list'>$firstname $lastname</h1></td></tr><tr><td>$firstname is a $gender.</td></tr></table>";
$fp = fopen($file, "x");
fputs ($fp, $text);
fclose($fp);// Close the file.
echo $file.' created'; ?>

If the data comes from an sql table the rows can be stepped through
If the data comes from a form the $_post array can be mined for data

almostbob 866 Retired: passive income ROCKS

"remainder " is referred to as modulus and modulus operator is %
you should be able to code it from this short sample or read through the link above

if( variable % 2 = 0 ) { // do something along the lines of document.write
almostbob 866 Retired: passive income ROCKS

Unlimited? bandwidth diskspace,
unlimited is syonymic for infinite,
not really possible but in
scaleable hosting
second vote for rackspace

on price try theplanet

almostbob 866 Retired: passive income ROCKS

""For the DATE type, the comparisons are performed aginst raw binary data as an integer would be""

comparisons are performed as an integer would be
not
data is stored as an integer would be

I have tried both smallint timestamp and SQL date format

select by date
select by time
select by time and date
about 5% difference
add ORDER by date clause about 12%
dump the data
timestamp is smaller

almostbob 866 Retired: passive income ROCKS
  1. many people think a database should be read by people
  2. a type 'exists' does not make it a default, useful, recommended, acceptable etc
  3. sql is structured language: 'date' comes before 'smallint' by alpohabet, no other reason
  4. developer's choice to select data types, database will work with text, slowly, but it will 'work', optimal design :: the database operates without having to work at it
almostbob 866 Retired: passive income ROCKS

try

SELECT a.airport_code AS airportcode, a.airport_name as airport, u.usr_id as userid, u.usr_fname as firstname, u.usr_lname as lastname, u.usr_email as email,u.usr_airline as airline, u.usr_airline_iatacode as iata, t.title as title from users u left join userairportservices uas on uas.usr_id_users = u.usr_id left join airport a on a.airport_id = uas.airport_id_airport left join title t on t.title_id = u.usr_title where airportcode = '%s' order by airport asc, $apcode
almostbob 866 Retired: passive income ROCKS

IE6 .png support is problematic
http://support.microsoft.com/kb/294714
png came after IE6 development

almostbob 866 Retired: passive income ROCKS

autoloading stuff in php or other server language is easy
one file in the folder
and auto thumbnails and display and slideshow with fade

http://panmental.de/public/programming_projects/Slideshow%20script%20in%20PHP/

almostbob 866 Retired: passive income ROCKS

That was the 'jump out and bite me' error
:)

almostbob 866 Retired: passive income ROCKS

http://www.php.net/mysql_num_rows
mysql_num_rows()
Retrieves the number of rows from a result set.
This command is only valid for statements like SELECT or SHOW that return an actual result set.
To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query,
use mysql_affected_rows().

just the wrong mysql function

almostbob 866 Retired: passive income ROCKS

splash page

<body onload='window.open("urltoopenForums");window.location="urltoopenMainpage";' '>

splash page with timeout

<body onload='setTimeout("window.open(\"urltoopenForums\");window.location=\"urltoopenMainpage\";",5000);' >

splash page button

<input type='button' onclick='window.open("urltoopenForums");window.location="urltoopenMainpage";' value='click'>
almostbob 866 Retired: passive income ROCKS

apache Mod_gzip mod_deflate will compress on the fly if enabled in apache or php headers
and browser accept headers are there

best speed tweak has been,
given that transparent.gif is a 1*1px transparent.gif image

<!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>
<title>HTML Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="your,keywords,here" />
<meta name="Description" content="." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<img src='fastimage.gif' id='img1' width='320' height='200' alt='image you want to display fast text'>
<!--- bla bla bla all the stuff that you want to display fast -->
<img src='transparent.gif' id='img1' width='320' height='200' alt='image1 that is not really urgent text'>
<!--- bla bla bla all the stuff that you want to display fast -->
<img src='transparent.gif' id='img2' width='320' height='200' alt='image2 that is not really urgent text'>
<!--- bla bla bla all the stuff that you want to display fast -->
<img src='transparent.gif' id='img3' width='320' height='200' alt='image3 that is not really urgent text'>
<!--- bla bla bla all the stuff that you want to display fast -->
<script type='text/javascript'>
document.getElementById('img1').src='realimage1.href';
document.getElementById('img2').src='realimage2.href';
document.getElementById('img3').src='realimage3.href';
</body>
</html>

the page loads and functions, then javascript loads images in the background and replaces blank transparent images
Images Known to be required in subsequent pages can be background loaded, while user reads this page, giving the impression that pages load faster than they really do, …

almostbob 866 Retired: passive income ROCKS

After you have ardav's recommended

look at how "they" do almost what I want for keys and hints to write one that does Exactly What I Want

"they"::: are dozens- hundreds of form handling scripts for download at various php script repository sites, never exactly what you want, but they provide hints

Get Beginning PHP first

almostbob 866 Retired: passive income ROCKS

In partial explanantion of the conflict/dichotomy between date() and the sql date column
the date format for php asp unix ,( timestamp format in sql represented by the sql now() function) is a 10 digit numeric representing the time in seconds from 1 1 1970, the single column stores date and time,
earlier this year it was 1234567890 oclick <= oclick computer time :)

text represented dates are not a good idea

the database is not human readable, it is meant to be a machine construct for efficient processing of data
a text date field and a text time field to store the same amount of useful data is very much larger around 25 bytes, not a lot on one row, a lot in 1 million rows
there is extra processing in converting text dates to numeric so that sql can operate on them, for every record, every time a selection is made
it is much less processor intensive(select is just < 1234567890 >1234565809 automaticallly by php asp sql from human readable input), much less storage to store the date in a timestamp
and convert the output of reports as eg.

echo date('d m y H:m',$date);

human readable data input
stored as machine readable timestamp,
output as human readable text

almostbob 866 Retired: passive income ROCKS
<?php
$dropdown_data = explode(",", $row_rsAppare['Item_Dark_Colors']);
echo '<select name="DarkColor" id ="DarkColor>';
echo '<option selected="selected" value="">Choose Color</option>';
foreach($dropdown_data as $value) { 
echo '<option value="'.$value.'">'.$value.'</option>'; 
}
echo '</select>';
?>
almostbob 866 Retired: passive income ROCKS

1 comes before 2
11 (one one) also comes before 2
like the personal information this IS sort by alphabet order of the field name

130 questions number
001 002 003... 009 010 011... 055 056 057... 128 129 130

without knowing which form processor script,
or without viewing the code,
no-one will be able to tell you what flag to turn off or if the sort can be turned off
you could use a consistent form labelling schema

almostbob 866 Retired: passive income ROCKS

streaming media in
windows media is asf/wmv format

almostbob 866 Retired: passive income ROCKS

using DevPHP on home and thumbdrive, just because the same software runs on home and on a thumbdrive
have a wamp installation, to crash proof the software after the idea is (almost) working, to overload the database, code injection
some code from script sites
original claendar classes
and the Google code labs & APIs

almostbob 866 Retired: passive income ROCKS

definitely the easiest to code

almostbob 866 Retired: passive income ROCKS

ok thnks but i have a question. will it work for mac users?

is there some script i can put in the webpage to make the video viewable to like the person looking at my site IN windows media player...

that part I can do,
and there is a WMP for Mac that downloadable from the included link in the script
BUT
There is no way to stream media into "whatever their media player is" sorry the codes are extremely different
the video formats are extremly different
streaming media in
windows media is asf/wmv format.
quicktime .mov
realmedia .ram

almostbob 866 Retired: passive income ROCKS

page rank,
on quality of your page
on keyword density in page text,
keyword in meta tags
completion of code: alt title meta header descriptons
accessibility of your pages
number of inbound links(**times qualilty factor of inbound links**)
divided by outbound links
times a scaling constant to bring all ranks to between 0-10

If you have more back links you get a higher ranking
If you have backlinks from a higher ranked source page, the links may be valued as many links from less valuable sites
sites are downgraded for being link farms, and may have a negative effect
there is a large discussion on googles algorithms, all of which is somewhat guesswork, coz google dont tell anyone exactly what they are.

good code
good content
good links
& good luck,
and a bunch of other things that google yahoo bing havent told anyone about yet

( get a google webmaster account and follow the instructions)
website directories are link farms. effect <= 0

almostbob 866 Retired: passive income ROCKS
<script type="text/javascript">
<!--//
function shrink(){
 document.getElementById("MediaPlayer1").style.width=384;
 document.getElementById("MediaPlayer1").style.height=300;
}
function enLarge(){
 document.getElementById("MediaPlayer1").style.width=480;
 document.getElementById("MediaPlayer1").style.height=402;
}
 //-->
</script>
<button onclick="enLarge()">large</button>
<button onclick="shrink()">small</button>
<a href="http://www.microsoft.com/windows/windowsmedia/player/download/"><img alt="Get Windows Media Player" src="http://www.microsoft.com/windows/windowsmedia/images/logos/getwm/mp11_88x31_static.gif" width="88" height="31" border="0"></A><br>
<object id="MediaPlayer1" width=384 height=300 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="fileName" value="your FILE"><!-- FULL PATH TO YOUR FILE -->
<param name="showControls" value="true">
<param name="PlayCount" value="0">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="YOUR FILE" name="MediaPlayer1" width=360 height=260 autostart=true><!-- FULL PATH TO YOUR FILE -->
</embed>
</object>

http://www.microsoft.com/windows/windowsmedia/howto/articles/adsolutions2.aspx

almostbob 866 Retired: passive income ROCKS

Use google 101
the guidelines on the webmaster site to get your site indexed properly, before there are any backlinks from other sites
http://www.google.com/webmasters/tools/

an xml sitemap to submit to google
http://www.auditmypc.com/web-master-tools.asp

I have 300 pages of my (somewhat parochial small business) site in google index
we get sitelinks
we out google rank our province's big3 in this business,

by following the instructions, and they work in Yahoo Bing Ask

hope it helps

hope the Optimisers did it right,
and you get organic growth from good links planted over the last months
there are :
good results;
fast results;
but there are no good fast results

VBG

almostbob 866 Retired: passive income ROCKS

what website
what are you in competition with
are you good enough to compete ( does your site reach out and grab attention in the first 8 seconds )are you unique, original, funny, sexy or controversial
is the site fast, malware free, and correct

no matter the advertising,
nobody will return if the site and its, premise, reason for existence, is not functional or attractive
the actions taken, unless the places where the links and fake blog entries are added are relevant will have a negative effect, on potential users and SE

SEO optimizes Your site for search returns, none of the described actions is particularly useful
dumping fake links in other sites, faking blogs, gets the site blacklisted
getting back into google is much harder than getting into google

stick the site in the website reviews forum, and get ideas on anything that needs to be changed

use the W3C validators http://jigsaw.w3.org/css-validator/ CSS http://validator.w3.org/ HTML
to make sure the code wont crash
check the page for speed issues http://www.websiteoptimization.com/services/analyze/
run it through http://www.browsershots.org to see if it actually works in other people's browsers

and hope for a large portion of luck
so - good luck

almostbob 866 Retired: passive income ROCKS

easy fix, dont use flash

there is nothing in that flash menu that can't be done smaller faster simpler in css

almostbob 866 Retired: passive income ROCKS

I think you should try Norwegian, or worse: Finnish.

Texts translated like this can be read if you're struggling hard to get the meaning, but the language is simply horrible. Too many expressions change completely when you translate to another language. Now remember, English, French, Italian, Spanish and Greek have many similarities. When you come to other language groups it's a very different matter.

I didnt realise its so different
then a site wide approach might be better
the translated pages in folder structure the same as the primary language structure but with a language code in the root folder name

english
-francais
-suomi
-norsk
-dansk

php link that will work most of the time from the root language to other but not back again

<a href="/francais<?php echo $_SERVER['PHP_SELF']; ?>">page en francais</a>
almostbob 866 Retired: passive income ROCKS
select * ( Concat(string1,' ',string2) as searchme )  from table where searchme like "$search"

text string single space between the columns else you get

BrownCow which wont match brown cow

almostbob 866 Retired: passive income ROCKS

What they said ^up there^

http://validator.w3.org/check?uri=http%3A%2F%2Fminorityrecruitonline.com%2Fcollege%2Fdefault.aspx&charset=%28detect+automatically%29&doctype=Inline&group=0

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fminorityrecruitonline.com%2Fcollege%2Fdefault.aspx&profile=css21&usermedium=all&warning=1&lang=en

xhtml is particular <element1><element2></element2></element1> works <element1><element2></element1></element2> fails
Fix your code and the display errors will likely vanish

and redesign your page, its 619,569bytes and takes way too long to download, 8 seconds is all you get,
92KB of javascript ?
44 images 377KB ?
Some recommendations to remove the bloat, http://analyze.websiteoptimization.com/wso?url=http://minorityrecruitonline.com/college/default.aspx& (there is a captcha)

almostbob 866 Retired: passive income ROCKS

but u need give us more light to how this works

No, actually I don't

read the FAQ on the Host

almostbob 866 Retired: passive income ROCKS

for the languages I speak, its close, the grammar and sentence structure changes between French Engllish and Greek to much as I write, and much more grammatically correct than I would use at the neighborhood,
For languages I don't speak it is better.
page output is generated from database and is time date and user dependent
Even fully multilingual people cannot directly translate all the detail of Language to another Language

almostbob 866 Retired: passive income ROCKS
<?php /*input */ 
$ptime=time();
$insert = msql_query("insert into table ($column1,$column2,$column3,$column4,$ptime)");
if (!$insert) {  die("query failed: " . msql_error()); }
/* ouput */
$startdate = strtotime($startdate);
$enddate = strtotime($enddate);
$report = msql_query("select from table * where ptime > %s and ptime < %s, $startdate, $enddate");
if (!$report) {  die("query failed: " . msql_error()); }
while($row = mysql_fetch_array($ouput)) {
echo "$row['column1']  $row['column2'] $row['column3'] $row['column4'] ".date('D M Y H:m',$row['ptime'])."<br />";  }
?>

text date/times in the report generating form are set to timestamp in report processing
this sql select from table * where ptime > %s and ptime < %s, $startdate, $enddate is very much less processor intensive than working on a text string, it just looks for a number greater than X and less than Y

almostbob 866 Retired: passive income ROCKS

If you cant understand the math, then you won't develop a suitable algorithm to create the rank either

bad translation
page rank = sum of all inbound links as (stability factor times number of inbound (links times rank of inbound linking page) / outbound links ) as variation in page rank approaches zero

postscript : i can calculate the math, because my calculator includes sigma functions, I cant write the math

almostbob 866 Retired: passive income ROCKS

translated files to a sytematic naiming system,
for static files I used index(2letterstandardlanguagecode).html something like indexes (spanish) idexfr (french) indexde (german)

<a href='indexfr.html' title='La traduction est automatique, confirment svp les details essentiels dans la version Anglaise originale'>en Fran&ccedil;ais</a>
<a href='indexes.html' title='La traducción es automática, confirma por favor los detalles esenciales en la versión Inglesa originale' >En espa&ntilde;ol</a>

Nowadays google translate api do all the work for me, just a tiny google gadget in menu.php -- shows in every page, and translates to 52 languages

almostbob 866 Retired: passive income ROCKS

extra suggestion is to get a code highlighting editor like notepad++ notepad2, or if the IDE you are using supports code highlighting turn it on
wrong code, missing quotes, too many quotes, unclosed pairs, out of sequence pairs will be highlighted
line 34 <a><td></a></td> shows as left in my editor will break


edit didn need the code to post too?

almostbob 866 Retired: passive income ROCKS

<img src="images/bg.jpg" name="mainimage" width="419" height="282"> Should be

<img src="images/bg.jpg" id="mainimage" width="419" height="282">

and as previously written by mathewmaxwell

function changeImage(filename)
{
document.getElementById("mainimage").src=filename;
}

<element name= . is not formally deprecated, it just does not work

almostbob 866 Retired: passive income ROCKS
<?php 
//$_SESSION["name"] = "Test Admin";
$content = $_POST["content"];
//prepare data
//array should have description , heading , contents, creator 
//$array_values function name insertdata
$values['description'] = $_POST["content"];
$values['heading'] = $_POST["heading"];
$values['contents'] = $_POST["contents"];
//this will include currently loggen in user
$values['creator'] = "Test Admin" ;//$_SESSION["name"];
//database call
require("/includes/inc.database.php");
$db = new Connectdb();
$conn = $db->connect();
$data = $db->retrievedata($conn, 'articles');
if ($db->insertdata($conn, $values)){ header('Location:/site/view.php'); }
else { header('Location:/site/editor.php'); }
?>

more than this seems unneccessary,
the user has two distinct results for two possible query states, view the entered data or forced to re-enter it
**edit
the redirect to the editor page should populate the values of this $_post array to the appropriate input fields. so the user can see what else has to be entered/altered else { header("Location:/site/editor.php?content=$_POST['content']&heading=$_POST['heading']&contents=$_POST['contents']"); } ignoring the insecurity of url parameters, its a thought process at this time

almostbob 866 Retired: passive income ROCKS

No dude(dudess?)
store the 10 digit timestamp in the database
convert to text on output
Mysql does not care what it looks like and it is faster smaller and simpler for mysql to process the numeric to search for records between 1 January and 1 March
the returned $time function is much larger than 10bytes
that function would be better in the script used output data to be human readable in reports
Store $ptime
$ptime 1234568888
$stime Monday 13 Feb 2009 10:55am

almostbob 866 Retired: passive income ROCKS

http://www.google.com/technology/pigeonrank.html

just for fun, Googles April 1 approach

almostbob 866 Retired: passive income ROCKS

The alert box stops subsequent processing
comment out the alert box as it is in the prior script and it will work
or place the alert box after the function and it will work

almostbob 866 Retired: passive income ROCKS

Dont format the date time in the database
text formatted dates are for humans to read, sql is not human does not need any of that and it makes the processing slower
sql Date, php date, unix timestamp, are all a single 10byte numeric that stores complete date and time
formatting is done for human readability on output
example <?php echo date('DMY h:m',$timestamp} ?> selecting a timestamp renage from num1 to num2 is much faster - less processing than searching text dates for dates between x and 1
sql now() will input the date and time of the update as the update is processing
php date() is now

1253454900 (10bytes)
or
September 20 2009, 1:55pm (25bytes)

not much on 1 row, very much on a million rows

select * from table where date > 1234567890 and date < 1234568890
is much faster than precessing text dates
processing script languages have strtotime() (or an identical function) built in, you dont even have to do any text to time conversions on range select fields

text date time: not good

Will Gresham commented: +1 +2
almostbob 866 Retired: passive income ROCKS

wamp Windows Apache Mysql Php http://www.wampserver.com/en/ everything just works

or a phpIDE - devphp http://devphp.sourceforge.net/
there are many other, probably even better, IDE I use this one it has a very small footprint

almostbob 866 Retired: passive income ROCKS

without even a database, used this code when analysing small sites

stats.php

<?php //stats.php
// Get the user stats.
$getdate = date( 'd-m-Y, H:i:s' );// Get the date time, trhis is a human readable (me) so did not use timestamp.
$user_ip = $_SERVER['REMOTE_ADDR'];// Get the users IP.
$user_browser = $_SERVER['HTTP_USER_AGENT']; // Get the browser type.
$referer = $_SERVER['HTTP_REFERER']; // Get the refering page.
$file = $_SERVER['PHP_SELF']; //get the currentfilename
// Look for the text file and open it for writting.
$file = "pathto/logfile.csv";// define the text file, named as .csv because excell will open csv and be sortable.
$fp = fopen($file, "a+");//open the text file for writing.
fputs ($fp, "$user_ip,$getdate, $referer, $file, $user\n"); // Write the user stats into the text file.
fclose($fp);// Close the text file.
?>

logfile.csv has to exist and be chmod to be writeable by the php user.
in the files you wish to trace

<?php include('pathto/stats.php'); ?>
almostbob 866 Retired: passive income ROCKS

http://www.websiteoptimization.com/services/analyze/ may help you work out what to do to to speed it up