drjohn 56 Posting Pro in Training

Build a common basic page with your menu, header and footer in place, save it, then use that as the starting point for each new page, just altering the content and saving under a new name. You are imagining that many sites have a new page open within the home page, they are just being consistent in their page design, repeating the same header and footer and menu on every page.

drjohn 56 Posting Pro in Training

www.sarairannejad.com

WHICH version of IE is giving you problems? Looks the same to me in FF, Chrome, and IE9

PS Hiding your navigation and requiring a click to reveal it is not user friendly. You're asking the user to think and many can't do that.

drjohn 56 Posting Pro in Training

For Sanchixx's moving div

don't use position:fixed, put a wrapper div around the entire content, with a suitable width, and then your div or anything else will not move. Rememeber that not everyone has a big screen nor does everyone work with the browser full screen, so think carefully about the width of your wrapper div - make is as small as practical, so accomodate a many users as possible.

for Sanchixx's div resizing

as you have a width defined for #space3, it should NOT resize when the browser's viewport size is changed. Using min-width and max-width WOULD make it resizable within the chosen limts of min and max.

drjohn 56 Posting Pro in Training

If the only people who will see the results from the database are your dad and partner, then putting it on line presents an unnecessary risk of exposing customer details. If yo uhave to ask, you probably don't have enough experience yet to make it secure.

If it is just a database for them to track their business, put it on a computer at their place of business. If you wish to practice building a web database system, then get usbwebserver, which is a zero configuration server set-up so developers can build and test their dataabse before putting it on line. Then you can build them a system that the rest of the world can't see or hack into. It's how I build and test online databases before putting them on line.

drjohn 56 Posting Pro in Training

run it through http://validator.w3.org/

trace the errors it mentions about div tags not being closed. (using an editor like notepad++ will show you when divs etc are not closed by color-coding things the wrong way)

Oh, and it's broken at all viewport sizes I played with.

drjohn 56 Posting Pro in Training

with eleven style sheets, where do we start???

drjohn 56 Posting Pro in Training

write a series of queries, each one runing one after the other, on a separate line. Run these queries vai a script of a remote access database manager such as heidiSQL.

drjohn 56 Posting Pro in Training

Define the number of changes you will accept before you start charging more for the extra work.
Don't work for free!

drjohn 56 Posting Pro in Training

this is a database problem.
how good are your mysql / php skills

drjohn 56 Posting Pro in Training

Semantics.
Using <ol> implies that the order in which the items appear is important, using <ul> says the order doesn't matter.
You'd use an <ol> for something like the installation instructions for a bit of software (the order the steps are done in matters), while a <ul> suits a shopping list.

As everyone else uses <ul>, correctly, for a menu, why do something that clearly is not being used correctly?
Do you use a large font, bold and <p> for your headers, or do you use <h1> , <h2>, etc??? It's the same idea of using tags correctly..

drjohn 56 Posting Pro in Training

that's not an ordered list! use <ul> instead.

drjohn 56 Posting Pro in Training

You could always show us your site and point out the bit that isn't working properly for you...

drjohn 56 Posting Pro in Training

Your menu is broken in firefox.

I tried to edit the css, and then noticed that you have 34 stylesheets!!!!!
That is totally ridiculous.

I changed some of the values in the menu css file, but it had no effect, and is probably being overridden by something in the other 33 files or the embedded styles.

drjohn 56 Posting Pro in Training

google for "son of suckerfish" or for "superfish", the former is a very VERY small bit of javascritp, 12 lines if I rememebr correctly, which makes css based drop downs or flyout menus work in IE. No need at all to write your own javascript. Superfish is jQuery code that adds a few extra options that son of suckerfish didn't have. It uses the fish part of its name as a tribute to the original code.

drjohn 56 Posting Pro in Training

Start by exporting your data out of your excel spreadsheet!
People are talking sometimes about importing the excel spreadsheet which is NOT a csv file (csv doesn't need to be comma delimited incidentally, tabs are quite acceptable)

so use Save as and select the file type of tab delimited text file, then use

LOAD DATA LOCAL INFILE '/your_file.txt'
INTO TABLE your_table

I always use tab delimted rather than comma delimited because my data can have a comma in it and that caused problems the very first time I tried this (the data extract I was sent also had no '...' around the data - that might also have solved the problem I had, but I'm happy with tab delimited, so I stick with it). I've never had to specify the delimiter at all. I do this once every week to two tables, and it has worked okay for about four or five years now. I do have to give the full path to the file starting at c:...

I use HeidiSQL so I can connect to a remote database easily. One client is with a web host who does not include phpMyAdmin for "security reasons", which means I'd have to install it and set up any security it needs. Using a desktop application for remote access solves this as it by-passes the problem of a web page which might be found by others.

drjohn 56 Posting Pro in Training

or read up on the son of suckerfish, or superfish menus.

they are reliable and widely used systems.

drjohn 56 Posting Pro in Training

Are you using a slider you wrote yourself, or one you found on the internet?
There are many reliable jQuery sliders which are free to use, as well as some for sale.

try one of these
http://vandelaydesign.com/blog/web-development/jquery-image-galleries/

or these
http://webdesign14.com/30-best-jquery-lightbox-plugins/

drjohn 56 Posting Pro in Training

Remember that for the update to work, you need a unique identifier for the row to be updated. This could even be a hidden field containing the row's primary key, if you see no reason to display the pk to the user.

drjohn 56 Posting Pro in Training

As above.

The ER is where you discover your entities and hence your db tables (I always find this MUCH faster than collecting all attributes and formally normalising them via rules). The ER, as far as I'm concerned, is always the first important step in creating the database. The ER will also help show up where linking tables are needed when you spot many to many relationships (although they would show up in any formal normalisation of course).

The DFD (whch I always hated creating and usually avoid in all my own personal projects) shows the work processes that a user will go through, and shows where you will need to add/update/delete data in the database, where you will need forms and processes/scripts to handle the form data.

And as stated above, you and your team need to sit down and decide on entitiy/table names, and edit the two diagrams to match.

Also, there is usually no definitive dfd, but almost always one definitive ER.
So you can't tell when a dfd is wrong, but you can tell when an ER is wrong.

drjohn 56 Posting Pro in Training

When you float items, say an image or div, the next item below it, if another image or div, can catch on to the lower edge and get stuck, sort of bumping into it instead of going past it; or as mentioned above, in the case of text it can wrap round the object then below it once all the space to the side is filled with text.

clear effectively says do the equivalent of start a "guarenteed new line" below the lowest edge of the floated object. The clear: left or clear: right bit means only do this to things floated left or right respectively. clear: both means which ever float there is, clear it, get underneath it.

drjohn 56 Posting Pro in Training

I think that this bit

<li><a href='index.php?action=manage'>Manage</a></li></li>
</ul>";

should be

<li><a href='index.php?action=manage'>Manage</a></li>
</ul>
</li>
";

i.e. close the nested ul inside the li containing it

drjohn 56 Posting Pro in Training

MySQL>Data>dbname

at least that's where it is in my installation of usbwebserver on my windows laptops.

copy the folder with the database name and paste in new location. Test this first of course.
There are three files per table in the database: .frm = table definition; .MYD = table data; .MYI = table index/indices

OR do a databse dump (or a total export if you have something like phpMyAdmin or HeidiSQL) This produces plain text files which are a set of sql queries which will rebuild the entire database when run.

drjohn 56 Posting Pro in Training

It's perfectly normal to work that way.
That's one of the main uses of an include file

drjohn 56 Posting Pro in Training

The browser plug-in should show a pdf option bar on the pdf itself (bottom, centre) when the mouse is over it, and that includes a print option. Not all browsers do this however. Chrome does, and allows printing from the normal print menu, as does IE9 and IE8. Firefox shows the pdf menu but my copy didn't want to open the browser print option.

drjohn 56 Posting Pro in Training

This has been the standard problem for ALL job searchers in all professions for as long as I can remember. It is not a problem that just applies to computer science. The best answer is usually to be top of the class and go for a career where a degree in any subject gets you in - ie one not requiring your topic specific degree; or take a lower level temporary job to gain the magical experience. An alternative is to have done a temporary summer job, so you have gained some experience while still a student.

Apart from those suggestions, I have no idea how anyone gets their first job when they all require experience.

drjohn 56 Posting Pro in Training

You have totally misunderstood the purpose of the file you gave a link to!
It is an SQLite database administration tool!
It is NOT a script to process a form!!!

drjohn 56 Posting Pro in Training

IE6 is used by 1% of users world wide - so you can ignore any problems there unless your site is getting many thousands of uniques per day.

i have no idea why your javascript is not working in Firefox.

drjohn 56 Posting Pro in Training

why make life difficult?
one form, one file, one other file called to do the submit (and validation)
second form, second file, second other file called to validate and submit.

This is SOOOO much simpler, safer and easier to write and troubleshoot than a more complex system, which you've just said you can't understand, so probably can't troubleshoot for errors!
KISS rules.

And if you can't write simple code, why look for a more complex solution???

drjohn 56 Posting Pro in Training

Use some browser specific code, and then to get your css3 to work in earlier versions of IE, use http://css3pie.com/.

google on cross-browser css shadows / corners, whatever other effect you want for the browser specific code to use.

for example

-webkit-box-shadow: 4px 4px 4px #ccc;
   -moz-box-shadow: 4px 4px 4px #ccc;
        box-shadow: 4px 4px 4px #ccc;

-webkit-border-radius: 10px;
   -moz-border-radius: 10px;
        border-radius: 10px;


behavior: url(PIE.htc);
drjohn 56 Posting Pro in Training

There's no sign of a doctype in your html, and a lack of a doctype always triggers quirks mode, which is a different model in different browsers.
http://www.alistapart.com/articles/doctype/
and choose the HTML 4.01 Strict (or Transitional). Ignore the XHTML, as many browsers convert it back to html, so you gain nothing from using it - it's an evolutionary dead-end in web design.

drjohn 56 Posting Pro in Training

margin:0; might help.

as would using <ul> and <li> and <div> and not tables for layout.

drjohn 56 Posting Pro in Training

You must learn HTML and CSS before ever touching PHP, SQL and JavaScript, which is NOT out of date, it is used for lots of things, especially in the case of jQuery, which is a library of useful code that reduces the effort to do many things. And many developers show off by making their jQuery scripts freely available.

If you can't use HTML and CSS, you are wasting your time trying to learn PHP, etc. Because web pages are written in HTML, and styled by CSS. PHP is often used to extract data from a database and to write the results, usually using loops, into some html which you have written, or to esend emails, run calculations etc. Javascript, and especially jQuery, give lots of special effects to impress people with.

But if you have no html, no css, there is no point in learning the other languages first. Their job is to enhance the html.

drjohn 56 Posting Pro in Training

Can you give the proper full url to the test page.

On going to the link
http://ocklaw.com/new/about/
a few things struck me.

This may come as a surprise to you, but my screen may not be the same size as yours, and my browser isn't running full screen. So the text on the right sits over the links on the left. It gets sorted when I drag the browser window wider, over onto part of my second screen. So stop designing with your browser full screen, and test things at smaller screen / viewport sizes than you use. Because the page breaks in smaller viewports than 1400px width.

Next, the code published above and on that page where the link takes us has some obvious errors in it.

First you have some links that are not in an ordered list and then you have some that are meant to be in an ordered list - we can see the <li> and </li> tags. What we can't see is the <ul> and </ul> tags...

Next your footer is stuck over on the right of the screen, caught on the edge of one of the other divs.

You need to add clear:both; to the #footer-container to stop that happening.

Next there is a paragraph which is empty and has a border of a dotted red line. Why?
This should be the border-bottom of the h4 tag that the header Client sits …

drjohn 56 Posting Pro in Training

First, STOP using position:absolute as that sets the position to be in a fixed place on the screen. So centering just will not work!

And as for using an area map - well I have serious doubts about anything like that to create links. It is an extremely old-fashioned way to work. Almost everyone uses an unordered list to make their menu.


Anyway.
Add a wrapper div around all your code between the opening and closing body tags, like this
<body>
<div id="wrapper">

all the other stuff you have on the page

</div>
</body>

Then in your css, set a suitable width for the div, and set margin:auto;

Using text-align:center with center the text, which is a bad idea except for a one line header, but I am guessing that you want your content to be centered, such as in the sites in my signature below. Have a look at them and resize your browser window.

I don't think it will work with position:absolute however, so you'll have to recode your stuff the way the rest of the web design world works.

drjohn 56 Posting Pro in Training

I suspect you are trying to break your normalised table, and if you store data in the format you are suggesting, querying the table would become trickier. In your example above, all the As are in data1, all the Bs in data2, all the Cs in data3. But somehow I don't think you can absolutely guarentee that. So if the A for id 27 and several others was in data2, and the A for id 125 and several others was in data2 while for id 250 the a was in data2, you would have to write a query that inspected every column to find all the rows containing an A.

This style of data storage is not recommended.

drjohn 56 Posting Pro in Training

try adding overflow:auto to the outer div

drjohn 56 Posting Pro in Training

html is not programming, programming concepts do not apply to html

the concept of macros does not exist.

But if you create php pages, php being a programming language, you can use include files to write common parts of your page, and on editing a file file affect all your pages. The include file writes the same bit of html for you each time.

drjohn 56 Posting Pro in Training

And how can we help you???
With no sample page to examine what can we suggest?

Upload your page somewhere that we can examine it.
But just to get things rolling - have you bothered to declare a doctype?

drjohn 56 Posting Pro in Training

Then you don't have the correct set of relationships! You can't have the correct foreign keys between the players, club and nations. Because I made sure that the test data set I used DID have each club linked to a nation and each player linked to a club, and I got back exactly the correct rows that I expected.

So, write down a set of club and nation data and match the foreign keys so that a link is correctly established. Then add a couple of players with foreign keys that link them to an existing club and nation.
OR
You could print out each table's contents and scrutinise then to make sure there is any data to be returned. Change a few bits to match existing clubs and nations in your player team.

Although eventually you are going to have to fix the wrongly normalised tables (and then your queries) as at present you can only have one club per nation, as I said earlier. Working with badly designed tables just doesn't help.

naeemnur commented: Sir, you are my hero! +1
drjohn 56 Posting Pro in Training
drjohn 56 Posting Pro in Training

better to use 960px width in the above code, to allow for all browser chrome and get it away from the very edges of the browser.

The two div answer above is wrong and unnecessary. The outer div (#page) doesn't do anything at all!

drjohn 56 Posting Pro in Training

This query works.

SELECT a.id as club_id,
a.fr_name as club_name,
b.id as nation_id,
b.fr_name as nation_name,
c.id as player_id,
c.fr_fname as player_name
FROM fr_clubs as a
INNER JOIN fr_nations as b ON a.id = b.club_id
INNER JOIN fr_players as c ON b.id = c.nation_id;

I made your database, entered some date, ran the query ON THE DATABASE, not using the php in any way at all. I entered via phpmyadmin, on my test server, and got back the correct number of rows with the correct data in place.

As I said...Always check your queries directly on the database without using your application, web site, php or anything else that stands between the query going in and the data coming out.

So now you know that somewhere in your php you have an error in creating your output.

Try echoing the number of rows returned by your query at the top of your page - you have already got that as a variable, $numrows.
Are there more rows in the dataset returned than are displayed? You should get one row per player in your players table.

What do you get if you dump this line in your code ." LIMIT $paginate->start, $paginate->limit ???

drjohn 56 Posting Pro in Training

I was just about to say what hericles said.
Your desired method (changing the entire database every night) is a flawed approach.

Since even with your approach you will still have to look at the value returned and have your code make a decision based on the value, why change it when the simple date comparison suggested is so much less effort?

drjohn 56 Posting Pro in Training

the Web Developer Toolbar that was mentioned has a Chrome version.

I use it all the time, especially the edit css tool which is how to do a trial edit and see the result, without touching your real css file.

Posting the jquery library is not going to help with a css color change.

drjohn 56 Posting Pro in Training

What does the number represent?
Is it a count of something the user is doing? Or is it the step in a process that the user has reached?

drjohn 56 Posting Pro in Training

What do you get if you run the query directly on your tables of data?

You are obviously using php, so to eliminate the possibility of errors in the php, start your testing at the database level, using just the sql.
If it doesn't work there, it will never work in your program / web page, will it?
If it does work there, the error is in your PHP

drjohn 56 Posting Pro in Training

You have the field `club_id` int(11) NOT NULL COMMENT 'Foreign Key', in the nation table
This doesn't make sense.
It implies that each nation only has a single club in it.
It would make more sense to me if the club table had it's nation id in there as a foreign key - which then suggests that a nation has many clubs in it.

So check your normalisation again.

Why have you got all those fr_ in front of almost every field? They serve no purpose other than to give you more typing to do and increase the risk of making a typo.

Also I'm willing to bet that no two nations have the same name - there is only one Scotland, one Germany, one Denmark. So you don't need a numerical id for the nations table acting as the primary key, the name of the nation itself is the correct, natural primary key. Using the name as the primary key will reduce the number of joins you will regularly require, as the numerical id always forces a join to find the nation's name. But using the name as the PK means you already have that info in the player table.

It's a common beginners mistake to assume that a numerical id field is always required, when there is already a unique natural primary key present which will simplify things.

Example

color table
1, red
2, green
3, …

drjohn 56 Posting Pro in Training

If your page expands to fill the screen totally and the browser is maximised, then on a 21" or 24" monitor, the user will be trying to read lines of text up to 21" or 23" in length!

This is a very BAD thing - finding the beginning of the next line of text is difficult.
So you should also set a max-width on your outermost div to prevent it becoming too large and difficult to read.
Upsetting users makes them leave your site.

Don't use tables for layout control.

drjohn 56 Posting Pro in Training

Or just add overflow:auto to the wrapper's css. That usually makes it expand properly. Sometimes overflow:visible works too.

drjohn 56 Posting Pro in Training

FrontPage!!!! One of the most rubbish web tools around. Even MS disowned it several years ago.
I too have never seen a web host offering Access as the database, so that's not worth trying at all.

It is much better to just follow the advice given above. Doing things the correct way is so much better than forcing things to work the wrong way.

Incidentally, I find that using a tab delimited txt file from excel is a safer bet than a csv one, as you might have a comma in some of your data, and that will wreck havoc with your database. I receive 40000 - 50000 lines of data from an office's database to stick into an on-line MySQL database, in csv format, and the first thing I do is open it in excel and save as tab delimited. (and that means I have to re-define the date format and excel converts it from yyyy-mm-dd to dd-mm-yyyy, and of course MySQL's date format is the first one, of course.)