drjohn 56 Posting Pro in Training

You are extracting from two tables without a join condition???
why?

drjohn 56 Posting Pro in Training

"Compact and repair feature in 2007 and 2010 does not fix the file size."

Really??? I just made a very simple little access 2007 database, put some data into it, edited field contents with large copy and pastes, deleted records etc, with saves after every edit, and after each time I ran the compact and repair tool, the file size was reduced.

Now if your database file is large, you may not notice a change in size from say 15,000,490 to 15,000,050 and get the impression its not working as its size could be reported as 15,000kb each time But on my little 400kb db, changes up and down of 10, 20, 50, 100kb were easily spotted.

Also, if you are running the compact and repair every time you edit a single record, then the before edit and after edit and compact repair size can be very very similiar. So you wouldn't see much difference at all. Try running it after enough edits that you can see the file size has increased after a while.

I didn't bother testing it in my access 2013 copy however.

drjohn 56 Posting Pro in Training

It would be a lot easier if you gave a link to the page(s) where it goes wrong. Then we can see it in action, or not of course, without copying and pasting code and images to our own version of your page...

drjohn 56 Posting Pro in Training

Normally you give a form an action - a script to run. The script gets the variables from the form, then does something with them.
<form method="POST" action="">
Yours doesn't. Action is empty.

drjohn 56 Posting Pro in Training

PS I can't be bothered counting through the closing brackets to place echo $count at exactly the right place, so it might be later in your code. Try moving it down one closing bracket at a time yourself if it doesn't appear or appears several times.

drjohn 56 Posting Pro in Training
        if($result->num_rows > 0) {
            $count++;

that says whatever the number of rows, $count now equals one, unless there are no rows, in which case $count is still zero. Then you are doing this.

            $num_length = strlen((int)$count);
            while($row = $result->fetch_assoc()){
                $seen = $row["seen"];
                if($seen == '0'){
                    echo $num_length;
                }

so now $num-length has a value of one (the number of characters in $count, which always has a value of 1 in this loop or zero if there are no rows and the loop is not executed), nothing to do with the number of times $seen is >0
And then you just keep echoing that value of $num-length, which is always one, because it is never incremented inside your loop! And neither is $count incremented.
You are NOT counting anything at all to do with $seen !

Drop the first appearance of $count++, and all your bits about $num-length, then use something like this

             while($row = $result->fetch_assoc()){
                $seen = $row["seen"];
                if($seen == '0'){
                    $count++
                }
                echo $count;

So here you are echoing the count of the number of times $seen is zero, after you have worked through the list of results. You were originally echoing a value every time you had $seen >0, instead of counting them all and echoing the answer.

drjohn 56 Posting Pro in Training

You are not specifying the table to get the data from in the sql you are using. A database and a table within a database are different things.

drjohn 56 Posting Pro in Training

You have a lot of code in a single form. The presence or abscence of the divs has no effect as the fields are all in one form. Any saving is done by the script, usersave.php.
So where are you trying to save the input, in what format (flat file, database?).

drjohn 56 Posting Pro in Training

You would find it very much easier to use an existing free jquery script than writing your own. That way you could test four or five variations with tried and tested scripts.
Then having found one you liked, you could modify it to work differently in your spare time.

drjohn 56 Posting Pro in Training

upload images of the correct size would seem to be the sensible way to work. So use your favourite free image manipulation software and make them smaller.

drjohn 56 Posting Pro in Training

you've answered your own question - just use a mix of <article>, <section>, and <div> tags.

drjohn 56 Posting Pro in Training

You could try inserting a space before and after the $criteria, so sun would be returned but not sunshine.
WHERE field LIKE ' %".$criteria."% ' Order by Appeared asc"
Basically you are discovering that using like in a search is a bit tricky to get perfect results .
If the above code works, it would still have a problem if sun was the first word or only word, so no spaces before or after.
So overall, using RLIKE is possibly a better choice

some examples here http://www.sqlexamples.info/PHP/mysql_rlike.htm

drjohn 56 Posting Pro in Training

You should normalise your database.
create a second table, called groups, with field id and group
id is the persons id, group is the group they belong to.
The table is then created with a joint primary key of id, group
then each row is a unique entry
eg
1,gamer
1, programmer
2,chemist
2, Programmer
2, flying instructor
3, brain surgeon
4, gamer
4, brain surgeon
4, instructor
5, sailing instructor
etc
Having a list of properties in a single field is generally the wrong approach as searching for an item becomes harder, and all "fixes" to search when two or more properties are in the one field are likely to go wrong at some point, as they use LIKE.

drjohn 56 Posting Pro in Training

So apart from placing an advert for that web company of this forum, what do they have to do with learning to design a web site???
Nothing.

drjohn 56 Posting Pro in Training

Quick solution.

<div class="footerBox">Your text link code here</div>

Style the div to

.footerBox{float:left; width:200px;)

Make ten such divs, one with each text link in it, .
You might need to adjust padding or make them a little bit narrower.
But it will work. Just play with the numbers to get what you want.
You might need to add an extra class to just the first such box to stop it catching on the content above it

.clearfix{clear:both}

So the first div would become

<div class="footerBox clearfix">your first link text here</div>

While the other nine would be as in the first example. This would give you two lines of five divs, each with one link in it.

Try putting your styles in an external stylesheet, it makes life easier and gives a more consistent appeareance.

Also, the links in the footer / siteInfo div all look like this ./about.php
The leading ./ is not necessary. You use that to move up a folder when you use sub-folders to keep related content together. And it should be ../filename anyway if it was in a higher folder.

NEVER use :nbsp; to pad out things to get a particular layout, it will never work okay in other browsers (other browsers being not the one you are using, which ever one you start with)
This is NOT an IE or Edge problem it is simply not the way to work, ever. It's …

drjohn 56 Posting Pro in Training

1 - do this step first
2 - do this bit second
3 - do this step next

. buy onions
. buy potatoes
. buy milk
. buy steak

first is an ordered list, second is unordered list

drjohn 56 Posting Pro in Training

Perhaps you could avoid telling users the name of the back-up folder and the file name, as well as restricting access to that folder. And place an index.html file in the folder with nothing in it, or saying something like silly like a link to the home page, so users cant see a file listing for the folder.

savedlema commented: Thank you drjohn for that trick! +2
drjohn 56 Posting Pro in Training

You have several css files, all containing just a couple of lines. Make a single css file with all these rules in it. You can split the file into sections using comments. Multiple css files means the browser has to ask the server for each one separately, and each one then comes back as a single packet. but they could all fit in one small file requirinng one file request and still one packet.

Also your multiple css files don't exactly have meaningful names do they...

drjohn 56 Posting Pro in Training

http://en.wikipedia.org/wiki/Comet_%28programming_language%29

http://cs.brown.edu/people/pvh/CometHome/Welcome.html

"Comet is an object-oriented language featuring both a constraint-based local search engine, a constraint-programming solver, and mathematical programming solvers."

(I used google to find these, as I've never heard of it. You could have tried that yourself...)

Then there's this:

http://www.priint.com/eu_en/en/priint-suite/priint-comet-plugins.html

or this

https://pythonhosted.org/Sijax/comet.html

or even

http://www.xajax-project.org/developer/q_no/Comet/comet.php

One word is not really enough to find out what this comet is.

drjohn 56 Posting Pro in Training

Get hold of the free shopping cart OpenCart.
Install it on a server with PHP and MySQL

It's easy to use and much much more reliable than building your own cart!

Alternatively, create a set of html pages for your products, and read up on mal's Ecommerce, where they run the cart for you, for free (you can pay if you wish to), and the buy now buttons are simple html links. I've had three or four clients us mal's e, it's reliable and trusted.

drjohn 56 Posting Pro in Training

Try telling your boss that getting a total beginner to design a web site is not a good idea and not cost effective, as you will spend a long time learning things and make many mistakes. It is very much cheaper to hire someone who knows how to build a site than spend months trying it yourself and failing badly. Your SEo knowledge will be none existant for example, so even if you get a site built, it is extrememly likely that you will have the wrong tags in most places and thus your on-page SEO will be extrememly poor while a professional can do it without haveing to think while building the pages.

drjohn 56 Posting Pro in Training

It would be a lot easier if you gave us a url so we can see what is happening and play with it there, without having to create our own copy of your page.

gentlemedia commented: second that +4
drjohn 56 Posting Pro in Training

PHP variables etc do not show up in a file named something.html, unless you go through all the things they mention above. Which is not actually the right way to work.

The correct way is to name your file as a .php file, and of course to connect to your database and retrieve the info needed using a query, then assign the returned data to variables. Or if you are reusing a form, start with the form named as a .php file.

Then all this playing with .htaccess becomes totally unnecessary.

drjohn 56 Posting Pro in Training

An id is meant to be a unique identifier. You can't have two unique identifiers on the same span, or same anything.
You can use multiple classes however - .user, .Maxi, .John, etc. But you don't give any styles for your Maxi, John, Henry etc styles. So without them, there will be no visible change.

It's just possible that the browser is trying to apply the styles for the last id you use, and in each case there are no styles for that id.

drjohn 56 Posting Pro in Training

yup. leaching, hot-linking, and some other names too. depends on control panel designer's choice of name.

drjohn 56 Posting Pro in Training

The control panel for some web sites can include an option to prevent leaching - letting another site display your images on their site and pretending they are their images. Look through your control panel and if you have such an option, switch it on. See if that helps by checking your web stats on a daily basis.

drjohn 56 Posting Pro in Training

There is no need to have the span in the li. It serves no purpose. The style for the link in the li will do whatever you need.

You also don't need your menusub and sub-menu styles either. You can apply styles via the combinations of ul li a and ul li ul li a. It's a mistake to add extra classes when the combination of ul, li and a can b identified uniquely by giving the ul a class or id . No need to give the ul one class, the li another and the a another class too.

drjohn 56 Posting Pro in Training

So that users with smart phones or small tablets will get an easier to use version of the page layout and not need to keep zooming in and out to get at bits of it. Links should also then be easier to click on as well.

drjohn 56 Posting Pro in Training

I've used opencart a few times. Straighforward to use.
Free too.

drjohn 56 Posting Pro in Training
drjohn 56 Posting Pro in Training

I think there are some jquery modules that do that. not sure if it's permanant or only looks that way in the browser.

Pushing the image through php might let you do that with a bit of coding. think I've seen that demoed somewhere.

drjohn 56 Posting Pro in Training

Remember that blinking text was done as a joke by Netscape to demonstrate that html could do some strange things. It was NEVER intended to be used, and is a bit amateurish. It's probably been removed from your browser's parsing engine to improve the quality of websites everywhere.

drjohn 56 Posting Pro in Training

With IN , the value must match exactly an item of those listed in the list.

With LIKE, the value only has to match part of the value in the field in question.

So, sky fails for being IN (skyblue, skype, skylight, moonlight, darkblue, darksky)

but like sky% matches skyblue, skype, and skylight, and anything else in the field being tested if it starts with sky followed by zero or more characters, but does not match darksky, as sky% means the value must start with sky.

Like %sky matches darksky only from that set above

Like %sky% matches sky and any word with sky as part of it, whether there are characters before or after the sky.

drjohn 56 Posting Pro in Training

A bit vague.

Without seeing what might be in a few notices, and not knowing how many would be displayed at once, this is tricky to answer. You could use a table in one set of conditions, or a set of divs in another set of conditions. Which includes where is this data coming from - a database, or manually entered into the page.

drjohn 56 Posting Pro in Training

ALSO
You say you have one table called invoices and one called products, joined via the common product_id.

Which suggests one invoice will be for one product, and every product ordered, even if they are ordered at the same time, will have a separate invoice. That's not how things work in real life.

When I order several times, they are all listed in the one invoice, each on a separate line, which lists product name and number bought, sometimes item unit cost, as well as total cost. Think about that and consider changing your database design. Cos it's wrong, based on what you say.

I don't do people's homework for them, but I am willing to help when they try to do it and need pointing in the correct direction. (This is a standard homework problem from your brief description, we've all done this one at some point in time ;-) )

drjohn 56 Posting Pro in Training

Line 5 of your code is a join, using the "where x=y" syntax.
The syntax used doesn't matter, it's a join.

But you then exclusivley use the info from a single table!

Why don't you show us this invoice table and product table as well, and then write out what you actually want to display.

ALSO why on earth have you got two tables, school and school_info ??? There is no reason to split the data like that, all the data in school_info is functionally dependant on the school_id, the primary key of the school table, unless a school has more than one address, or more than one badge. There should only be one table, school , with all the fields of the two tables in it.

Follow standard normalisation rules or your entity relationship diagram. There is an entity called school with a set of attributes which there is no need to split in two and create a second entity, school_info - you might as well stick person-in-charge in school_info and badge_name in school, it would make no difference. And no sense either.

Your database design is flawed, and will force you to do unnecessary joins like this, complicating the code and thus making errors more likely.

drjohn 56 Posting Pro in Training

How can we work out the problem without being able to see the web page???

drjohn 56 Posting Pro in Training

The human brain.

Seriously, there is no "best software". Everyone will simply recommend the software that they use. So here goes.

I use NotePad++, which is used by many, many professionals.

I tried Blue Griffon recently and thought it was good.
I tried Brackets, and thought it was good, but I did something wrong when I installed it and haven't had a chance to re-install and then read how it is supposed to be used.

It's much easier to list really bad software:
Serif Web
Frontpage
ANY software that says "no need to learn programming just drag and drop".
ANY software that is a word processor or desktop publisher with a Save As html feature.

Some people will tell you that dreamweaver is brilliant, others will tell you that it produces really bad code, but the bad code is produced by people who use dreamweaver but don't know anything about web design or code, so use it very, very wrongly.

You can use any program the wrong way and produce code.

No software can make up for a lack of knowledge and a lack of skill and imagination.

Hence, the human brain it the best tool to use.

HarBeK commented: Agree 100% +0
drjohn 56 Posting Pro in Training

Content - why else would I visit a web site?

drjohn 56 Posting Pro in Training

Wrap another div around all three.
Give it a width in a suitbale percentage value.
Style it margin:auto;
Style the divs inside to have a width of about 33% .

drjohn 56 Posting Pro in Training

Nested tables for layout??!!
It's not 1996 any longer - the world has moved on.

Wrap each table of data in a div and give it a width that matches the table's width.

Style each table to float:left.

You might need to add a clear:both to the next item below the tables.

drjohn 56 Posting Pro in Training

Did your homework get a good grade after these guys helped you?

drjohn 56 Posting Pro in Training

You shouldn't be mixing an h3 inside a ul !
The code is really bad, and likely to give unpredictable results in different browsers.
The divs you have inside the li should almost certainly be spans.
If you put every part inside a set of <li>s then used classes to style each part, it would properly.

drjohn 56 Posting Pro in Training

google tutorial creating pdf with php.

drjohn 56 Posting Pro in Training

yes.

drjohn 56 Posting Pro in Training

You could try copying the files to another folder, then recreating the tables but leaving them empty, so that MySQL "knows" they exist.
Then copy the other files back over the new ones. You might be able to get at your content that way. And you have nothing to loose by trying this.

drjohn 56 Posting Pro in Training

Try not having the html tags and the head tags! Browsers are amazingly versatile, and display more than just html.

Plain text can be shown also.

But WHY???
What's the point of your blank file? If it's index.htm and intended to prevent people knowing what is in a folder's file listing, okay. But what other reason would you make a blank html file for?

drjohn 56 Posting Pro in Training

Is the parent file also called something.php or is it something.htm ? Needs to be the former, not the latter.

drjohn 56 Posting Pro in Training

Several content management systems, such as wordpress and joomla have modules you can use to mark pages as only available to subscribers (and to provide some pages marked as free to view that contain a free section from some of your content, so users can see if it is worth paying to get at your content).

Some of these modules / plugins are free as well. Just like Wordpress and joomla.

Install one, get members to pay a subscription, and put most of your content on the subscribers only pages.

Simples.

Have you never seen this done on a professional blog before? A pay to learn site?

drjohn 56 Posting Pro in Training

The starting opint:
Product has a many to many relationship to attribbute, so we make an link entity

product --<productattribute>--attribute

product is one to many to productattribute
Attribute is one to many to productattribute

There are likely to be several fields that every product has in common, such as a name, manufacturer, stock level, weight, and the like, which would go in the product table itself. The productattribute table servers to handle all the other attributes that are only in some products - frequency range, volume control, rack size, battery powered, and so on. And the product's pid links with the attribute's aid (which will be the joint natural primary key in the productattribute table, ie both its columns form the key) to link through to the attribute in question.

Here's another example - a person has children. Do you invent the fields child1, child2, child3, child4, child5, child6, and thus fail if someone has seven childern, and have lots of blanks if they have none, and have emmense problems trying to find everyone who has a child called john (and your query has to query child1, child2, chld3, child4, child5, child 6.

person--<thekids>--kidsname solves it easily. And querying for all the johns is too.