hericles 289 Master Poster Featured Poster

Not overwriting the existing text is the least of your problems. Opening the file with the append flag specified solves the issue of overwriting. That makes sure the new data is added to the end of the file. In most cases it is a boolean added to the end of the write statement.
Concurrency is by far the bigger issue. IO is slow and you could have a lot of threads all waiting for the threads before them to open, write and close the file. At least, if that is all each thread does, no other operations, you should be spared from deadlocks.

hericles 289 Master Poster Featured Poster

You can, as long as the languages you use have connection drivers available for the particular database you intend to connect to, which in your case you know it does.

hericles 289 Master Poster Featured Poster

Yeah, you'll need to provide default values. Create a function that accepts the parameter, does the input_filter bit and either returns its value or an empty string. Then you can call that function instead of filter_input for each variable.
That'll get rid of the endless if's you were probably thinking of adding.

hericles 289 Master Poster Featured Poster

Is this on a 64bit Windows machine? If yes, you need to make sure you have the right versions of Apache and PHP. ApacheLounge.com can help you out with the right 64bit downloads.
If that was the problem your log files would have an error that makes reference to a 32bit file, I can't remember the exact text.

hericles 289 Master Poster Featured Poster

All is a mysql reserved word. If you need to use it because you have a column called all, you need to place it in quotes inside your query: 'all'

hericles 289 Master Poster Featured Poster

Some more information about what system you are running would be useful but in general terms you are probably seeing that error because the settings for the database connection are incorrect.
You should check the details in the connection string or config file, wherever you have specified the database name and the user name and password. One of those is probably wrong.

hericles 289 Master Poster Featured Poster

I am indeed, how can I help you today?

hericles 289 Master Poster Featured Poster

And we desperately want to know what your problem is.
Don't mind the sarcasm, but seriously, you could include slightly more information with your post.

hericles 289 Master Poster Featured Poster

Create a table for the categories that holds the category name, its ID and its parent ID. Top level categories would have a parent ID of 0.
For example, your demo would look like:

ID, Name,    ParentID
1  Level1       0
2  Level1.1     1
3  Level1.2     1
4  Level1.2.a   3
5  Level1.2.b   3
6  Level1.2.b.a 5

You can now track all children of a level via the database and extend this to as many levels as you need.

hericles 289 Master Poster Featured Poster

You need to add the new keywords that you want the website to be found by to the content of the website, in the headers, the page meta data, the image alt tags (has a pretty small effect) and the like.

hericles 289 Master Poster Featured Poster

Have you tried this:

if (!$result) {
    die('Invalid query: ' . mysql_error());
}

after the mysql_query line? $result should be a result set or FALSE, mysql_query doesn't return null.

hericles 289 Master Poster Featured Poster

Your $result variable probably is false, which isn't a resource and so the fetch_array is failing. Check your query returns a result set and not an error. If it is failing to query I'm guessing $id isn't a value.
So, output the string that makes up the complete query to check for a syntax error or catch the error coming from the database.

hericles 289 Master Poster Featured Poster

This should work, haven't tested it but it's a standard join of three tables sharing a common column. Of course the select can be changed to refer to the specific columns from each table you need by referring to their name e.g. dis.disapproval_date

SELECT * FROM details AS d JOIN approval AS a ON d.staff_id = a.staff_id JOIN disapproval AS dis
ON dis.staff_id = d.staff_id WHERE d.staff_id LIKE '%$search_id%' ORDER BY d.id DESC;
hericles 289 Master Poster Featured Poster

On your form you would need two text boxes (as the simplest solution) or two calendar controls that the user can use to enter the two dates.
On form submission you then read those two values and make them parameters in your query.
If you have done any code around the form, post it up. We work better with examples.

hericles 289 Master Poster Featured Poster

And what are you using? Because by itself HTML is stateless, you reload the page and it will draw itself as specified in the HTML, which in your case, is with neither radio button selected.
You would need either sessions, cookies or some other form of postback

hericles 289 Master Poster Featured Poster

Are you wanting to validate a form or do something else? Your question isn't very clear.

hericles 289 Master Poster Featured Poster

The biggest difference between the two (to me) is that interfaces don't contain implemented methods. They only define the structure that the inheriting class must take, whereas abstract classes can be partially or fully implemented with complete methods. Interfaces are usually said to be a contract that the developer must adhere to - the methods you need to create are specified but you have complete freedom as to how they are implemented.
The choice to use one of the other comes down to how you intend the class/interface to be used.
Things to consider are that interfaces cannot be changed after being released (without breaking all code that inherits from them), abstract classes can be extended/altered and the inheriting classes immediately gain the new functionality.
This link at MSDN gives some good examples of when to use one over the other.

ddanbe commented: Well explained! +15
hericles 289 Master Poster Featured Poster

OK, I don't why this is the case but if you remove the top:80px from your CSS it works. With the CSS top still there you can do top, left and right just not bottom.

hericles 289 Master Poster Featured Poster

Do you have the correct plugin available? unless my knowledge is outdated the jQuery UI lib is needed to use effects byond swing and linear

hericles 289 Master Poster Featured Poster

If your HTML snippet is the same for all rows then each product has a label with a class of 'count'. Which means in your jQuery all of the labels get incremented as the jQuery is affecting all of then, not just the one beside the button you happened to click. Currently you have no way to inform the jQuery function which label it should be increasing.
You could give each label a unique name and pass that name into the function when you click each button. To do this you'd need to add an onclick to each +/- button which calls the function with the parameter.

hericles 289 Master Poster Featured Poster

I changed the final parameter to linear, switch it back to easeOutBounce, or whatever it was before. I couldn't remeber if that was a correct animation so I went with linear while I tested it.

hericles 289 Master Poster Featured Poster
$(".box").click(function() {
    $('#circle').animate({height: '-=900px'}, 1300,'linear'); });

You were missing the curly braces and the 'px'. The '=' isn't required.

hericles 289 Master Poster Featured Poster

As far as sending the email goes, are you trying this from a server or just on your local machine? Because you need a working mail server for the email to be sent.
As for the link to the third page, a link that includes either the user's email or a unique identifier that can be used to locate them again on page three is required. You need to receive something onto page 3 that yets you continue the process with the correct user.

hericles 289 Master Poster Featured Poster

As far as I know empty() only takes one variable. The error is complaining about ALL of the && in your code, not any particular one.

hericles 289 Master Poster Featured Poster

The error says you are trying to put a string into a long. That should be enough to track down the cause.
Although your SQL query doesn't look right. Don't you want quotes around the 'AND'? Otherwise you're using it as the boolean operator (I think, my VB>net is rusty)

hericles 289 Master Poster Featured Poster

The error is related to your SQL query itself. It seems to be implying that the variable you are storing the string in is set to be a long variable.
What is the actual code around the problem?

hericles 289 Master Poster Featured Poster

Based on this:

echo "1";
       if(empty($imagetype)) return false;

your $imagetype variable is empty. Which comes back to this:
$imgtype=$_FILES["uploadedimage"]["type"];

Check the actual values of those variables.

hericles 289 Master Poster Featured Poster

This may help you, Click Here, as others seem to have had problems too.
But, to really help out, what was the error message?

hericles 289 Master Poster Featured Poster

Can you put an echo after this line:
if (!empty($_FILES["uploadedimage"]["name"]))
to prove this IF condition is being met?

hericles 289 Master Poster Featured Poster

Why are you doing it this way? If you want a particular employee and you're entering the name, why aren't you adding that information to the SQL query and retrieving just one row?

As it is, the code is failing on any employee beyond the first one because of the else statement you have. If the returned name doesn't match the entered name, which it won't for any query which doesn't use the first record's name, you show an error and break out.
You shouldn't be doing that, you're forcing your code to only run once through the reader.
I would suggest using the name in the SQL query as parameter. You're returning records that you don't need. And then you're allocating the returned data to variables before you know if you actually need it. If you want to keep the code you, fix the else problem and check for the name matching FIRST and then allocate data to variables if you have a match.

hericles 289 Master Poster Featured Poster

Can you confirm you have added the correct USING statement?

hericles 289 Master Poster Featured Poster

Was it a mistake when pasting in the CSS that caused you to make the first element 'av' instead of 'nav'?
Also, the CSS code can't be complete because I can't see the nav ul section (which there needs to be), the first element in your posted CSS is nav ul ul.
And, this must be a mistake, but I can't even see the <link> element in your head section so where are you even linking to the CSS?

I got a CSS drop menu working, from the site you linked to, in about 30 secs. It really is a matter of copy/paste, change the links as you need to. So I think one of the errors you've made above is causing the issue.

hericles 289 Master Poster Featured Poster

You can search as many columns as you want if you think the input is going to vary. You just want to only return one column and make sure the result set is distinct so you don't have multiple instances of the same name appearing in the list.
Say, for example, you want to return first name. You could create a query that searched for the partial text in first_name, last_name, age. depending on the criteria this could return a larger set than just searching first name. But as long as you filtered the result ser to remove duplicates, you still get a usable list as a result.
is that along the lines of what you are after?

hericles 289 Master Poster Featured Poster

The best idea is to rebuild something you see working, making some additions, add a new function.
If you've read a book with some non-trival examples, build them as they are in the book and then build them again with changes.
Its best to alter something you know works until you're debuggin/mistake tracking skills grow.

hericles 289 Master Poster Featured Poster

Indexing alone won't get you into the top search results. poorly constructed sites still get indexed if they are submitted to google or have links in-bound links a spider can follow.
The hardest part of SEO is getting the quality back links you need to make your site look like a reputible source on the net.

hericles 289 Master Poster Featured Poster

If I understand your question you want to insert a product into the products table and then, depending on whether it is an accessory or a smart device, also insert into the relevant secondary table.
So your secondary, subclass tables will have a productId column that matches the productId in the products table.
Insert a product into the products table and return the inserted productId. Use that id to do the insert into the secondary table. You now have a link between the two.
You can also add a foreign key constraint from accessories/smart devices to products with on delete cascade to keep your table integrity intact.
is that any help?

hericles 289 Master Poster Featured Poster

You say you've added meta tags but I don't see a meta keywords tags in your head section. The description could be more relevant to the search terms you want to be known for.
The main page has very little text that is SEO relevant or practically any that explains what your site does. What search terms are you trying to get recognised for and what keyword density do you have on the page for them?
You have no H1 or H2 tags AT ALL on the main page either.
To be honest, I'm not sure how much time you put into this but there is a lot of basic SEO missing from the site.

hericles 289 Master Poster Featured Poster

Your $dbhandle object doesn't exist. Is it being declared in the connect.php and are you referring to it by the correct variable name?

hericles 289 Master Poster Featured Poster

The only query I can see that might cause the error you are seeing is this one:
$query_add= sprintf("SELECT * FROM tbl_addons WHERE addOns_id IN (%s)", $colname_RecAdd_on);
If $colname_RecAdd_on is empty then your SQL becomes
SELECT * FROM tbl_addons WHERE addOns_id IN ()
Which matches your error. I would confirm that
colname_RecAdd_on = $id['add_on'];
is an actual value.

hericles 289 Master Poster Featured Poster

You still haven't given us everything required. We know the error is coming from an SQl query and in your first code segment there is :
$result_car=mysql_query($query_car);
with no reference to what $query_car is.

Echo your SQL statements just before you run the query and check the syntax.

hericles 289 Master Poster Featured Poster

I can confirm this as true. It's not perfect however, you can fudge the script tags in various ways that the script analyser will ingnore and pass through (I saw some methods that use comment delimiters).
But inputting <script> tags into inputs in Chrome doesn't work, they get scrubbed out.
I think safari has anti-XSS as well.

hericles 289 Master Poster Featured Poster

That code sample clearly isn't making any SQL queries so you'll need to look at your code that is.
Presumably at some point you are building up an SQL query that is being incorrectly structured because it is attempting to concatenate a null string.
I'm guessing that is why the error refers to ')'.
Post up the actual SQL if you can't see the problem.

hericles 289 Master Poster Featured Poster

Do you have any CSS specifying overflow:hidden for the divs containing the radio buttons? Sounds random but I know thats been an issue before.

hericles 289 Master Poster Featured Poster

Have you looked at Alfresco? It's based on the document sharing idea, a bit like sharepoint, but is quite customisable. It won't have everything you need immediately but it must tick a few boxes at least.

hericles 289 Master Poster Featured Poster

From Alexa's support site Click Here

hericles 289 Master Poster Featured Poster

OK, I think I understand now.
Seeing as you have a direct relation between a user and the manager that created them (created_by) I don't think you need to alter your tables to get what you want.
You will however want to extract from the database the current user's ID if you don't already (I didn't see it in my quick read through).
Then, when the frmTask loads, do a select on the manager's table for the manager with the ID that is in the created_by field of the current user. A join between the two tables will get everything you need in one query.
Once you have the manager's ID run a second query on the user's table to find all users with a created_by that matches that ID.
You will then have one manager in the Manager list and only the users created by that manager in the users list.
Does that make sense? Or do you want an example of the query you will need to do?

hericles 289 Master Poster Featured Poster

If you just want the ID of the user logging in why don't you select the ID in the logging in query rather than return the count?

hericles 289 Master Poster Featured Poster

Is the PHP code being used by anything else? If yes, then you could check whether it is your code (possibly) by seeing if the error occurs when another app uses the PHP library. Is that possible?
Otherwise, is it always the same people that get the error? And some never get it? Any information you can get will help you track down the cause.
Lastly, is adding logging code around the inserting/updating code feasible? If you could start logging the events you might locate the problem.

hericles 289 Master Poster Featured Poster

I've had a desk that could go from sitting height to standing at the push of a button and once I figured out the correct height to have the desk for standing and typing it was great. No adverse affects.
I really don't see how the same could be said for a treadmill desk...
I haven't even heard of them. Do they exist?

hericles 289 Master Poster Featured Poster

To be clear, are you saying that the database removes the rows? that is, no calling code is responsible? And if the database has removed a row, your app won't add it again like its supposed too?
How are you determing that a row has disappeared?