almostbob 866 Retired: passive income ROCKS

Coffee, @wreckship, please throw me a muffin

almostbob 866 Retired: passive income ROCKS

for the purpose of the OP selecting on non-unique columns
In my mind the op selects a customer and then is displayed all the devices for that customer
at this time the sql selects all customers and displays duplicates in the dropdown
as there must be later processing to select the devices for this customer it is redundant and bandwidth and processor hog to select and display all
perhaps $sql = 'select distinct customer from device order by customer'; may help,
its faster by a factor of 10 than group by and
displays every customer :once:

consider also, redesigning the DB to normalise it
proper indexing, unique keys between tables, reduces error

almostbob 866 Retired: passive income ROCKS

It is a PEBKAC error,
a conceptual problem

this is an input form,
to display data there must be some code somewhere to
get the data from the DB
parse it to readable html
output to browser

that code would usually be found in the file referred by the action of the form, or in the file that file refers to
not in the input file

input
process
display

can't display in the code shown, as the post is not made yet

If you have copy n pasted the source from a functioning site, you are out of luck, serverside code does not get sent to the browser, only the parsed html

almostbob 866 Retired: passive income ROCKS

@matrixdevuk
If they were called "Smith & Smith & Smith" each of those ampersands would appear as the beginning of another variable

my paranoia comes out and always plan for the worst case you can never be sure what someone will enter as text

matrixdevuk commented: Yeah; never thought about that. :P +1 for thinking about WCS. +4
almostbob 866 Retired: passive income ROCKS

@diafol
from the code supplied the DB is not normalised, there does not seem to be a unique id so they are selecting by text representation of the customer name

almostbob 866 Retired: passive income ROCKS

@matrixdevuk

str_replace() changes the submitted value and ;
would need to be reprocessed at the server and ;
does not fix the many proscribed characters that may be in the data and ;
would screw up if the name contained '_' a valid character

urlencode() does not change the submitted value, and fixes other characters not allowed in the posted data, permitted in text fields
eg ><[]{}/\,+;&

value with spaces : urlencodes to ;
value%20with%20spaces : and arrives at the server as ;
value with spaces

almostbob 866 Retired: passive income ROCKS

urlencode the value

echo "<option value=".urlencode($thevalue).">";
echo  $thevalue;  
echo "</option>";
almostbob 866 Retired: passive income ROCKS

what database
what language
what have you attempted
mind reading is not among the skills of many of the gurus

almostbob 866 Retired: passive income ROCKS

$_POST is available
a superglobal, it is not affected by the register_globals directive
perhaps the error is elsewhere in your code

almostbob 866 Retired: passive income ROCKS
do not turn off warnings, fix the code

fix1:
<?php if(isset($_POST['Du'])) {echo "<strong>Duree du sejour:</strong>" .$_POST["Du"];} ?>
replaces 150-156
Its always better to check the right variable, submit does not ensure a value was set to Du

fix2:
assign a default value selected='selected' to one radio button option

almostbob 866 Retired: passive income ROCKS

This is an online VOLUNTEER forum not your private help service
You cannot demand responses

RTFM : read the f_cking manual

The complaint proceedures for ad services are clearly described in the agreements
Read the agreements
follow the proceedures
contact the service providers
make the complaint
click trackers retain IP addresses
If the provider determines the complaint is real they will refund the fees and block those addresses

Go away and do the job you pretend to be competent in

almostbob 866 Retired: passive income ROCKS

this is an online forum
not an on-demand support system, you cannot demand responses

Contact Bing, and Google, make your complaint
They will examine the clicks, and when it is determined they all come from the same group of IP you will be refunded and those IP blocked

almostbob 866 Retired: passive income ROCKS

does not work as expected on any display but yours

scrolling through a huge blank column on my laptop?? which just happens to be 1 pixel too short to display any div onscreen,

almostbob 866 Retired: passive income ROCKS

Our content is written in house,
specific to a course; or many
specific to a mine; or many
specific to a region; or many
multiple overlaps of region, mine, and course
oversight authorities of each region, mine, and college, with multiple overlap of jurisdiction
multiples of OHS RTA EPA DoE for a single document
There is no room for error, wordsRus, is not practical
There are few applications where copywriting is less applicable, the client/member/student/jurist/legislator using a website has access to all the tech tools to verify accuracy.
The content has to be perfect, it has to be yours
It has proven, tertiary education, extractive industry, and legislation, to be more effective, and more cost effective, to have the authors of the web content be the lecturers

almostbob 866 Retired: passive income ROCKS

There is no error in that code
the w3c validator has quirks, and limitations
Validate by URI. there are errors in the rendered page,
Validate by file upload. those errors vanish: the scripts are not rendered, only examined

google are not code compliant
this element <ins class="adsbygoogle"></ins>
is populated with the dirtiest code ever mis-written to make it small and still function

it is a miracle of miniature mayhem

Google don't feel the need, it just has to work. Who is gonna tell em they can't?

Errors found while checking this document as HTML5!
28 Errors, 4 warning(s)
https://www.google.com/

a name, an input box, 2 buttons: 28 errors
billions of hits, a few bytes saved on every hit, lots of $data saved

almostbob 866 Retired: passive income ROCKS

ALL google products show w3c tester errors
NONE of the sripts are code compliant, they all contain entities not defined by w3c standards
This does not mean the code is bad
google have not escape coded all the
?1=this&2=that&3=the_other that the javascriipts require, as
&#63;1=this&#38;2=that&#38;3=the_other because they get too bloody big

guess ~2 million hits a minute, 40byte less per hit, is a big drop in server load

almostbob 866 Retired: passive income ROCKS

then look at or before line 14 in the file, that only you can see, because you failed that small step that says "Show the people I want to fix my error, the error"
^^ attempted humour ^^ << failed dismally
repeated using different phrasing "Post the code with the error" at least the first ~20 lines

Instructions in case you don't know how
Open the file F:\xampp\htdocs\lfs\site_globalfn.php
Copy it
reply
click code in the reply toolbar
paste the code
click Insert code snippet
type this is the code I referred in my question
Click Submit your Reply

an array or sql likely has a spelling error : array['gld'] is referenced instead of array['gold'] etc
shi_ happens,
is often easy for others to find,
impossible to find yourself,
expect to see the correct name, so see the correct name.

almostbob 866 Retired: passive income ROCKS

close the thread, edit/delete the OP
The code is viral/malware NSIS:InstMonetizer-AU

almostbob 866 Retired: passive income ROCKS

what is the complete error message, what you have provided has been edited: useless

almostbob 866 Retired: passive income ROCKS

Its a great obfuscation
I'll keep the idea
Its obviously not yours
The author took great effort to stop thieves
It worked, stopped you, you must be ^ ^

die('thief');

There are segments in the binary that ping my malware programs, what is this which you are trying to steal

almostbob 866 Retired: passive income ROCKS

You didn't think to write, in the original question,
that you were f_ing with a functional system with some 'hack',
(badly) coded by some f_wit, to hide your referer.
the hack f_s up the system,
get the fix from the f_wit that wrote the hack, or,
remove the hack

there is one reason to hide the referer; malice. are you? :)

edit: read the source: badly written?;bohze moi,
so much wrong
there are vb anonymizers, that do work, try another

almostbob 866 Retired: passive income ROCKS

a somewhat backwards approach maybe, to goto the example page and continue from there
current link to a particualar attachment may be
<a href='http://shneler.com/vb/attachment.php?attachmentid=2063&d=1380201538'>something to download</a>

different link
<a href='http://shneler.com/vb5test?attachmentid=2063&d=1380201538'>something to download</a>

and in /vb5test/index.php in the <head> somewhere

<?php 
if(isset($_GET['attachmentid'])) { 
echo "<meta http-equiv='refresh' content='5; url=/vb/attachment.php?attachmentid=$_GET['attachmentid']&d=$_GET['d']'>"; 
} ?>
almostbob 866 Retired: passive income ROCKS

no type='text/css' or type='text/javascript' in html5

external stylesheets do not have <style> or </style> they just contain css

.container1 - .container4 are identical, all .container? divs = .container
classes can be re-used;

left out required keyword solid, in topcontainer and box

.box is fixed size, all other elements are relative,
padding of 5em, and 1em
5em top+left+right+bottom + 1em top+left+right+bottom
12 em in both horizontal and vertical dimensions

given a standard plasma display 267pixel/inch on my laptop, tablet, or phone
an em for me is 1/6 inch, so I don't have to use reading glasses
12 em is 2 inch,
included padding is 2 inches high and wide
.box is 1.12 inch wide and .75 inch high

99.9999999999% (everybody except you)
the .container elements will NOT nest inside .box, all elements should be relative dimensioned; em rem %

.box {width:300px;height:200px;padding:10px;border:4px red solid;margin:5px;}
.TopContainer {border:12px green solid;padding:5em;position:relative;}
.Container {border:4px solid black;padding:1em;}

Not sure what is intended by position:relative; in .topcontainer, there are no offsets set so it does nothing
if there is no requirement for .box to be small

  .box {padding:10px;border:4px red solid;margin:5px;}

and if you put some content, in any of the divs,
well just try it

<!DOCTYPE html>
<html>
 <link rel="stylesheet" href="divReference.css">
 <body>
body<div class="box">
   body<div class="TopContainer">
      topcontainer<div class="Container">
      content1</div>
      <div class="Container">
      content2</div>
      <div class="Container">
      content3</div>
      <div class="Container">
      content4</div>
   </div>
 </div> </body> 
</html>

with fixed size .box NOTHING fits

almostbob 866 Retired: passive income ROCKS

Its not urgent to anyone for as long as there is no evidence of some attempt at working it out.
where is the webcam
where is the db
what is the db structure you have worked out
generally: what have you attempted

coder gets paid heaps for urgent coding jobs
but everybody here will help you work it out gratis

beginners hints
images can be stored in the filesystem with a link stored in the db
ajax: jquery can upload the files

I had good results tweaking this added a few lines to the script to be able to view all the images in the folder

worth a look?

almostbob 866 Retired: passive income ROCKS

You need to find a different, better, online resource
one that is more complete in its references
it can be straightforward, without leaving out important stuff, like

Check for XAMPP or WAMPServer. Both packages install a full stack.

If it does not link to the most effective resources, it is NOT an effective resource to learn from

almostbob 866 Retired: passive income ROCKS

Chef brought shepherds pie,
By the time we go back to Canada, I am goin to be so damn fat

almostbob 866 Retired: passive income ROCKS

1 minute,
I take about 30 seconds to read question, featured reply, and the first 2-3 general answers
when SEOing; the time for user retention, the display of useful content is settled at around 8 seconds

I know nothing about C++,

I went to the C++ forum:
opened a question at random,
read the question,
googled code syntax,
read three replies, from the op and a guru
and began to understand the code,
the OP made an update as 4th reply . . .
but
then the countdown timer pinged:1 minute

If I were just looking for an answer, I would not reach a minute, I'd be gone to try it out in about 30s

almostbob 866 Retired: passive income ROCKS

1 What if the USER wants to buy two: can't be done if you click programmatically

2 Paypal terms of service: Paypal get upset at a site that bypasses required user confirmation

ANY dispute, you lose

almostbob 866 Retired: passive income ROCKS

Experience, prevents you making bad choices
Experience, comes from making bad choices
Every "don't do that" is a "don't make the same mistakes as me" post
Please, don't make the same mistakes as me.
I don't really mind looking stupid asking dumb-as-a-stump questions: Stupid, I have plenty of practice at.

almostbob 866 Retired: passive income ROCKS

Thinking again of the Q&A :edit:fromat << ha ha I can't spell <<:/edit: format
Perhaps,for those referred by SE, some ,
"did this answer solve your problem?,
do you need to ask another question?"
[checkbox/input/somethng] that directs them to register and then returns them to the same forum ask a new question page

almostbob 866 Retired: passive income ROCKS

Google webmaster tools, register and read "google101 how google crawls the web"

Many seo package mentiod that to index 2nd tier links they will make thousands or wiki links, blog comments, and social media share to those 2nd tier links.

the items in those seo packages are blacklisted

Reality: Google have a search monopoly; nobody else matters
Google make the rules: Google say no

temporary gain breaking Google rules, is not worth total loss being delisted

almostbob 866 Retired: passive income ROCKS

IF the site is well constructed and well indexed, the casual user will be directed by the SE to the page that answers the question, one page: success, not bounce: failure

Reduced bounce rate; the need to access second or subsequent pages, bad design or bad SEindexing, the casual user has to browse to find the answer
Bounce is not always a sign of failure, in a Q&A setting it is a sign of success

In Daniweb the most appropriate answers, however chosen, appear immediately below the question, even if they are on page 3 by date and time,

1 page; success

members, and those who become interested, will always read through multiple pages

almostbob 866 Retired: passive income ROCKS

edit: Damn, beaten to it,

have you checked C:\xampp\htdocs\sandbox\config.php on line 22 for an unexpected ':'

almostbob 866 Retired: passive income ROCKS

adding to minitauros answer above
text can be:
blank space, carriage return, line feed, crap code added by poor editors
the last can be hard to find, the editor may not display stuff it adds

almostbob 866 Retired: passive income ROCKS

ip addresses are assigned by the ISP and are not permanent.
ISP change them often to make it more difficult for home users to host
User logs in laptop: at home, coffee shop, McD, Library, mall, 1 ip each; and they all change next month
my house 4ip; 1 fixed and 3 change next month every month
phone: driving, 5 different ip during the session,

almostbob 866 Retired: passive income ROCKS

not yet

almostbob 866 Retired: passive income ROCKS

wordpress, you will be able to take over admin and run the site after a bit of self education.
a custom php script, will pretty much tie you to this developer.

My signature, passive income rocks,
I am being paid for the continued use of software written beginning in 1979
That is a great situation for a developer, unreasonable for a customer.
The customer initially envisaged a 5 year span, and thought licensing would be cheaper than purchase

WordPress is free.

almostbob 866 Retired: passive income ROCKS

an hour or more a day
Helping someone, who helps someone else, et al, how to live forever

almostbob 866 Retired: passive income ROCKS

beef Wellington, brussel sprouts, steamed garlic potato, fresh beans,
great coffee
I love my chefs
edit: chefs, house is catered, make anything you want, love consultiing work

almostbob 866 Retired: passive income ROCKS

to make its appearance balance with the 8

almostbob 866 Retired: passive income ROCKS

Really lucky here, football ; nothing,
get the ads, they're a blast
nobody watches boring, the networks don't play it

almostbob 866 Retired: passive income ROCKS

<table> is currently outside this code scrap; it should not be
at line 22

if($result == nul) {echo '<table style="display:none;">';} else {echo '<table>';}

have not confirmed syntax, nul, empty, 0, "", depends on returned data format

jquery is a hell of an added burden to hide 1 element, server code reduces page size

almostbob 866 Retired: passive income ROCKS

Last night I saw a hypnotist, brilliant, until .. ..

He hypnotised 7 men, then he dropped a big mic stand on his foot and yelled
F__K ME!
what happened next will haunt me for the rest of my life

ddanbe commented: Brillant! +0
almostbob 866 Retired: passive income ROCKS

login_portal, is currently html, <?php ?> missing, { I thought I was funny
then;
close the brace if (@$_POST['submit']) { echo "enter";}
@ switches off error reporting for the current command, not a good thing till production ready

<?php 
echo "test";
if ($_POST['submit']) { echo "enter"; } 
?>

a code highlighting editor, notepad replacement, like [not ad] notepad++ notepad2 [/not ad] will show incomplete braces, missing closures, while you type and make debugging a bit easier

  1. not affilited in any way with a notepad replacement
  2. no } after "funny"
  3. strange what makes some people laugh
almostbob 866 Retired: passive income ROCKS

A husband and his wife went to the Doctor to discuss a problem. The Doctor took the husband in first.
The husband was a bit embarrassed and told the Doctor he had trouble getting an erection with his wife and she was getting frustrated.
He checked his blood pressure and other things, and finally told him he would see his wife now.
He took her to another cubicle and told her to completely disrobe. Then he told her to turn all the way around slowly.
She did as instructed.
He then told her to turn all the way around in the other direction.
Then he said - OK you can get dressed now, I will talk to your husband.

Then the Doctor went into the other office and told the husband - You can relax. There is nothing wrong with you.
I couldn't get an erection either!!

almostbob 866 Retired: passive income ROCKS

leave the form as it is
validate in the form handler, serverside
let the scumbags think they have bypassed the checks and balances and they will give up, thinking their crap has gone through

ajax:

  • anything containing javascript, can be recoded by the user;
  • is not for form submission or validation,
  • is for one-way page updates server->user in response to user triggers
almostbob 866 Retired: passive income ROCKS

Asked Chef for a surprise dinner
Great big burger and fries, havent had one for ages,
course not, usually have what I ask for, and I am boring
had to smoosh it to fit it in my mouth
have to get random food more often, she's making staff meals now, chicken curry smells good, too full to even taste

almostbob 866 Retired: passive income ROCKS

do your own effing homework
RTFM

almostbob 866 Retired: passive income ROCKS

If you renamed at localhost and ftp-ed the files, the old files are still there
ccheck your ftp
1, yes
2, no
space is %20 in uri

almostbob 866 Retired: passive income ROCKS

1, no : Google webmaster tools, Bing Webmaster tools, nothing else

2, the number of visitors : who leave after 1 page view ∴ implying something is wrong with design or content
( or they got what they needed on the first page )

3, count single page sessions : not an accurate measure if the site is well designed, well SEIndexed,

information contained on a single page,
linked by search engines,
will show as a bounce, when it was a success
.