you have to put the formatting in, something like
echo "'";
$str = file("sheet5.txt");
foreach($str as $line){ echo nl2br($line)."','"; }
you have to put the formatting in, something like
echo "'";
$str = file("sheet5.txt");
foreach($str as $line){ echo nl2br($line)."','"; }
the reply says it is not finished code,
it is a scrap of sql as a thought pattern, it would have to be properly setup in php mysql handling
the code that updates last_login login_count is_loggedin (and any other) should be in whichever file logs the user in, code for monitoring whether login is current has to be in EVERY page, so usually put it a menu include() file
the usual thing is a routine in the script that logs pages, keeps note of logged in users movements, that timesout other sessions if inactive for (preset time),
one method, excusing inline style, poor practice <div style='top:auto;right:auto;bottom:0;left:auto;position:fixed;'>footer</div>
So no way to do it is provided. There are two things you can't reliably do on a web page:
of course we will pretend not to notice the footer at the bottom of this page. ↓ . Grins
if answered, will be answered in this forum,
but I think I will likely ignore you
if you want a secure service, PAY SOMEONE,
nobody is here at your service
nobody has asked for any identifying passwords, just the code that you cannot fix
dont go to a volunteer board tell the posters you think they are criminal,
and demand help
you can expect nobody to bother with you
show the complete code
including the mod_rewrite code from the .htaccess file in
[code=php] code [/code] for php [code=apache] code [/code] for .htaccess
tags
too much time passed cant add to the prior post,
could you style the scroll bars appropriately for the page design,
if you are stuck with the layout extant
various features of the scroll bar can be styled readily
could be styled for this page to something closer to page colors
or style the bar to background color and just leave the end arrows as click points
this link has a simple to follow, with pictures, instruction set
... and users depart, in droves, because navigation does not work the way they want. Users expect certain features and functions, or they leave.
the client in this case needs to be shown that the text will flow offscreen, be unreadable, unreachable, and be a perfect enticement for potential customers of the client to go to the opposition. the ability to hide the scroll bar is not at issue, everybody can hide any part of the page and window.
stupidity of hiding the scroll bar is.
recode the page pictured,
so that the scrollbar is to the right of the fixed element,
or post the code and let somebody competent (excluding self) show a quick fix
something like
<body><img style='right:0;top:60px:left:auto;bottom:0;width:200px;position:fixed;float:right;' src='image.jpg'><div>as much text as you want</div>
puts the scroll bar to the right of the image not between text and image, can only assume the page is coded with tables to get that (poor) effect
yes I know the css should be in .css file but who cares its a sample
full code is required,to give any reasoned answer
table columns, last_login login_number
add to your php login script
update members set last_login=now() where user=$user
update members set login_number=login_number+1 where user=$user
code sample only, not checked, (laptop in public wifi, no notes)
once the timestamp is set then you can use php sql datetime functions to find any users who havent/haved in within any timespan
Or
create another table for visits keyed to the userid
part of a very much larger .htaccess file, .htaccess==goldmine
AddHandler server-parsed .html
Options +Includes
<Files .htaccess>
order allow,deny
deny from all
</Files>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !www.mysite.com [NC]
RewriteRule \.(jpe?g|gif|bmp|png|wmv|asf)$ /images/nohotlink.jpg [F,NC]
ErrorDocument 404 /notfound.php
ErrorDocument 401 /needpassword.php
ErrorDocument 500 /noserver.php
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 2 days"
ExpiresByType image/gif "access plus 60 days"
ExpiresByType image/jpg "access plus 60 days"
ExpiresByType image/png "access plus 60 days"
ExpiresByType application/x-javascript "access plus 60 days"
ExpiresByType text/css "access plus 60 days"
ExpiresByType image/x-icon "access plus 360 days"
</IfModule>
in order::
allows includes in html
stops outsiders reading .htaccess
blocks most image thieves
custom errormessage handlers
puts a default date on filetypes for spiders and browser cache
.htaccess server parsed files adds neglible time to serving the file, the file is only read once, not twice as previously noted, .htaccess acts on apache web server layers, well below the html is served
but why? not show shtml as shtml, or modernize it at least to php or asp, all users are accustomed to seeing filetypes other than html, no web site is static any more
for only 150 pages,
thousands of php pages from database on each site and is less server load (more importantly far less disk space) than the static pages were,
new information loaded by AJAX that may only require 25 bytes, not 25KB for a new static pageanyhow small kudos for trying to …
an Ajax refesh is exactly NOT what you described
Ajax polls the server and relads the returned data file into the the same position, but it is a file transfer, there is no magic appearing data, it has to come from somewhere
$fileNum does not need to be dquoted,
in double quotes the php parser will search text, for variables
all of these work
$path = "img$fileNum";
$path = "img".$fileNum;
$path = 'img'.$fileNum;
putting the variable inside quotes is slower (infinitessimally) than leaving it outside where it belongs, above line3 (single quoted text) is fastest, the php parser does not waste time looking for variables where none exist.
May not matter for 1 image, may matter for many images
I still have a punch, to cut the second read/write notch when flippling 5 1/4 inch floppies in an appleIIe
Damn, I am old
why close open php at all? it just adds execution time, doesnt make the code easier to read, no care has been taken with clean code
<body><button id='pause' value='continue' onclick='document.getElementById("pause").style.display="none";document.getelementById("content").style.display="block";'>
<div id='content' style='display:none;'> rest of page </div></body></html>
??
having a better understanding of the problem,, still no solution, more thoughts that again may not be appropriate
Is it possible on the source/script generating the .csv file to have it create sequential files each consisting of a subset of records
eg, id 0-999; 1000-1999; ...... x000-x999
and process 10(example) smaller files to keep execution time below timeout for each iteration of the scriptupload.csv :: contains a single line to tell the script how many files there are in the data set so the script knows how to handle
upload0001.csv
upload0002.csv
upload0003.csvwould give a simple way to jump to a known record
why would you send 42000 lines if you want 1
the script that creates the csv file for upload, could it be smart enough to check for modified data,
then import all the lines of the much smaller file
I think I am suggesting a proceedural change to the data collection
database has a crc column
on update from remote, the list of id and crc are compared to local versions and only updated lines sent
may not be possible, thought process not any actual code
add column is_supervisor to the employee database default to no/false
I have a solution,
offended, screw em
Does Porn count ?
investigate the html <label> tag, will make your input forms more user friendly, by providing the stardard clickable-text that activates the radio button
<script type='text/javascript'>
function show(sec) {
document.getElementById('sec0').style.display='none';
document.getElementById('sec1').style.display='none';
document.getElementById('sec2').style.display='none';
document.getElementById('sec3').style.display='none';
document.getElementById(sec).style.display='block';
} </script>
Section:<br>
|<input type='radio' name='section' id='section1' value='section1' onclick="show('sec1');"><label for='section1'> Section 1</label>|
|<input type='radio' name='section' id='section2' value='section2' onclick="show('sec2');"><label for='section2'> Section 2</label>|
|<input type='radio' name='section' id='section3' value='section3' onclick="show('sec3');"><label for='section3'> Section 3</label>|
<div id='sec0'>| Reason |</div>
<div id='sec1' style='display:none;'>
|<input type='radio' name='reason' value='reason1' id='reason1'>
<label for='reason1'>reason 1</label>|
|<input type='radio' name='reason' value='reason2' id='reason2'>
<label for='reason2'>reason 2</label>|
|<input type='radio' name='reason' value='reason3' id='reason3'><label for='reason3'> reason 3</label>|
</div>
<div id='sec2' style='display:none;'>
|<input type='radio' name='reason' value='reason4' id='reason4'><label for='reason4'>reason 4</label>|
|<input type='radio' name='reason' value='reason5' id='reason5'><label for='reason5'>reason 5</label>|
</div>
<div id='sec3' style='display:none;'>
|<input type='radio' name='reason' value='reason6' id='reason6'><label for='reason6'>reason 6</label>|
|<input type='radio' name='reason' value='reason7' id='reason7'><label for='reason7'>reason 7</label>|
|<input type='radio' name='reason' value='reason999' id='reason999'><label for='reason999'>reason 999</label>|
</div>
all the radio buttons can have the same name, as only groups of them are shown
the IDs give the <label> tag something to anchor to
complete code required for one of the mavens to be able to point and fix, those three lines are not enough
omelette with cheese and coffee
lefthand righthand, not knowing what the other is doing,
at least they began the VM
till its up the only thing you can do is verify that the additional files work in themselves,
dos v'danye
that means the .js files on your server are not stored on your localhost development system, severely messes up if the two are not identical
If you have ftp access you should download all the server html css js files to the development system, images etc dont matter,
if you dont have the localhost complete, every alteration will have to be individually uploaded to the host to be tested
that is a pain, and total snafu can result
IF the localhost is complete development is a snap, you can make any changes you like without killing the server
javascript menus dont work where javascript is disabled for security (large %age getting larger everyday)
css menus work everywhere
alt and title attributes are a required part of the html specs
the page will operate if you remove them from your image tags, if there is nothing in 'alt="alttext"' it does not display an empty box, but
and its generally a bad idea,
better is to ensure the displayed data is correct and helpful
<link rel='stylesheet' href='http://www.cpi.com/interior.css' type='text/css' media='screen'>
yes, not having the pages on the server location pointed by the base href will cause problems
you can comment out the base statement during development on the localhost, and re-enable it before uploading to the server, to make sure the rest of the links work
<!-- <base href='etc'> -->
<!-- commented out for development -->
hoping that the menu is a php/asp/shtml include so you only have to do any alterations once for all files
code ? to make sure, but,
<base> the href that relative urls start from, easiest fix is kill the base and set the proper url to the menu include
assuming that the error is line 38
It means that $row includes unescaped control characters that interfere with php
the database contents should
be sanitised before being added
checked on update
checked on extraction to prevent erroneous data and to prevent deliberate sql_injection
user registration validation
image/file upload
image validation ( coyright obscenity ) <= this part probably cant be automated
display uploads, appropriately saled
;;seems a bit like photobucket
look on google or in phpscripts.com or other script repository for a photobucket clone script
that will give you the basic method, generally the scripts you source are pretty badly written, they work, not work well
once you have the concept tighten it, recode for efficiency security and to get the scaling into the homepage
reread My post, it states Designers code is correct and states the reason.
there is no statement that your code is wrong
that your second code sample is different, confirms the first sample is not appropriate for this task
single quotes are better for straight text, the php interpreter does not waste time looking for variables so they execute faster
however dQuoted text and variables is simpler , more intuitive, to read and lay out than:: open close variable open close variable open close variable open close;
with single quoted text
designer's solution is correct, for more than one reason, importantly,,
php will parse dQuoted text for variables and replace them with the value echo "i want $breakfast";
will render as I want BACON
single quotes wil not parse the variables and of course,,,
WoNt WoRk
It is not a drop down, or a popup, it is a layer in the page something like
<script type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(layer) {
if (dom) {document.getElementById(layer).style.visibility='hidden';}
if (document.layers) {document.layers[layer].visibility='hide';} }
function showIt() {
if (dom) {document.getElementById(layer).style.visibility='visible';}
if (document.layers) {document.layers[layer].visibility='show';} }
--></script>
<button onClick="showIt('layerm1');">Important Information</button>
<div id="layerm1" style="width:50%; visibility:hidden; padding:10px; margin:10px; background:#ececec; border: 1px solid;">
bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla
<button onClick="hideIt('layerm1');">Close</button></div>
multiple elements can be hidden/shown run on the one script just change the attribute in the buttons
the buttons can be <a href="javascript:showIt('layerm1');">s or any element that suppports onclick, I just like buttons
the hidden divs can be styled for position etc
useful. anyways how about if you want to click a link and it will be shown on the same page and in on a specific table? is tha possible?
something like using the onclick event to change the innerhtml of the table cell
may work, but I dont use tables for layout so am out of touch
Given <a name='linkname'></a>
is the target
on the same page <a href='#linkname'>goto linkname</a>
on another local page <a href='../relativefolder/page#linkname'>goto linkname</a>
cross site page <a href='http://www.thatsite.com/page#linkname'>goto linkname</a>
the target does not have to be an <a>anchor, any named element can be the target, the actual target is the name not the element itself
ditto evstevemd
any editor with code highlighting would throw an exception at the code errors, that is, change display colors where the code is not correct., makes simple omissions easy to spot
Notepad++
notepad2
just about any decent IDE
@media print { .dontprint { display:none; } }
@media screen { .dontshow { display:none; } }
then anything you wish not to print, at the 'dontprint' class to
eg
<span> inline </span>
<div class='header'>menu stuff</div>
<!-- becomes -->
<div class='header dontprint'>menu stuff</div>
I like dontprint, its a descriptive name
css @media types allow you to customize appearance for the output, so youcan ..
<div class='header dontprint'>menu stuff</div>
<div class='header dontshow'>alternate header for printed page Wow, cool</div>
:)
in css you can
@media screen { /* loads of css to define appearance */ }
@media print { /* loads of different css to redefine appearance on papaer */ }
On screen I have a logo that floats at the bottom corner of the screen and includes a goto top link,
on paper a logo that is fixed at the corner of the page and includes copyright and printed contactus
still the op hasnt noticed, THERE IS NO EQUAL SIGN IN THE NAME OF THE INPUTS THAT ARENT BEING POSTED
THIS IS A HTML SCREWUP NOT A PHP SCREWUP
yours WRONG <input type="text" name"CardHolderName"
correct <input type='text' name='CardHolderName'
??
yours <input type="text" name"CardHolderName"
mine <input type='text' name='CardHolderName'
??
you can use a motorcyle to deliver a houseload of bricks, two or three at a time,
a truck delivers the bricks, they arrive less damaged, faster, and use less fuel to do it.
can <> should
possible <> best
<table>s and <div>s have their strengths, it is difficult to have sortable divs, POC to have sortable tables
save the date in a timestamp, not some human-centric text date format,
php date(); mysql now(); work
on query if($date+(30*24*60*60) < date()) { /* kill the upgrade level */}
thought process only very obviously not valid code
cron:noun; approximately the server equivalent of windows task scheduler
dont suppose you might consider posting the problem code, for examination
considerations... musings...
mod_gzip = GOLD
eg script.js => 20KB,, script.js.php has 3 extra lines and is 4.2KB
<?php header ('content-type: text/javascript');
ob_start("ob_gzhandler"); ?>
/*huge amount of javascript*/
<?php ob_flush(); ?>
<script type='text/javascript' src='script.js.php'></script>
just thoughts
did you even bother to look at the sample link?
adding to urtrivedi's answer
if you want the sort to be alterable on the page, output the sorted query data,
and
there are many javascripts that perform live table sorts onclick of the header field, http://javascript.internet.com/forms/sort-data-table.html is one
CloudNine,
Errors & error messages (if any) will depend on changes to server php versions, and will come when/if your host updates the version of php on the server, always without advising anybody before making the change.
If you are aware of the possibility of error, and the likely cause(s), when/if the error occurs, the solution is already known, and you can remove that semicolon, or switch to heredoc syntax
file it, under JustInCase
incidentally some code is much messier than that
time constraints to 'get it working' and make it prettier later
later always comes much later (never) after someone paying the bills has asked for yet another urgent change
form follows function, or a good landing is any you can walk away from
dos v'danye
shineha's picked it
inputs require a name, value pair to get any output
'id' is used to reference the tag in the dom, for javascript, but not on form submission
no name, no value <select class=frmBg size="1" name='wheel model' id="wheel model">
a html instruction page on the <select> tag (w)(sh)ould tell you this requirement,
unfortunately its always about last in the instructions :P
sinmple <input> its about the first thing in the instructions
dos v'danye
like it, v.clean (no wasted 'anything')
margins, padding, doesnt work
try position relative to/from something fixed (in this example the bottom of my-login-bar)
something to try
my-login-bar is set for dimensions and position, elements inside my-login-bar can be set relative to my-login-bar
.logoutimage { top:auto;bottom:3px;left:3px;right:auto;}
.loggingout { top:auto;bottom:3px;left:auto;right:3px}
one is set relative to left bottom, the other set realtive to right bottom
to align the items just change anything not set "auto" and shift em round