hericles 289 Master Poster Featured Poster

Your console.log line isn't getting hit because the code is failing at the http.get line. When AngularJS itself hits an error the location of the error shown in the console often isn't of much use.
I used a JSON validator found here and loaded up your JSON. Two errors were found. If you do the same you can easier track them down and see whats wrong.

hericles 289 Master Poster Featured Poster

You have two errors in your code. Change line 20 to:
var userTrials = document.getElementById("userGuesses");

Firstly, its getElementById, camelcase for all words. Secondly, you don't want the innerText portion of the userGuesses div, you just want the div itself.
Thirdy, find a new professor.

hericles 289 Master Poster Featured Poster

From the iOS Approval page:
If an issue is discovered during the review of your app, you will be notified via email. You will find details regarding your app rejection in the Resolution Center, which can be accessed from both the App Summary page and the Version Details page in iTunes Connect.

Their review guidelines are pretty complete. Meet these and you should be OK.

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

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

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

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

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

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

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

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

From Alexa's support site Click Here

hericles 289 Master Poster Featured Poster

A strong password maybe??
I take you are referring to people hacking your password right? In which case you can't stop someone from guessing your password, if they have enough time time they'll get it. You can make that a lot harder but using a long password made up of letters, numbers and psecial characters.

hericles 289 Master Poster Featured Poster

What is tutorials? Shouldn't it have a # or . in front of it if it is a page element?

hericles 289 Master Poster Featured Poster

Your user control just needs to include a picture box for you to pass the image url to. Or am I missing something?

hericles 289 Master Poster Featured Poster

The AddRange function simply adds all of the objects in the added range to the arraylist. In your example, your arraylist would contain three items accessible at positions 0, 1 and 2.
Think of it in terms as appending the array to the arraylist, it just gets tacked on the end.

hericles 289 Master Poster Featured Poster

While they can make your site look like it is actively putting up fresh content TO A WEB CRAWLER, it does nothing for the real users of your site.
If you don't want people to come back to your site then, by all means, keep posting up the same content spun.
Also, unless you have a good quality spinner the end result may be poorly constructed which will have negative effects both in terms of SEO and real user retention.
And remember, Google is smarter than you. They don't like spun articles and may well have tricks that detect article spinners (I have no idea if this is true) in which case your efforts will backfire big time.
If you like your site and your users take the time to actually MAKE content rather than serve up the same stuff time and again.

hericles 289 Master Poster Featured Poster

The parentheses is the problem. Your statement is trying to provide everything in the select statement as one column which means the total number of columns doesn't match.

Something like this will work:

insertString = "INSERT INTO SocialHistory (ExamID, Occupation, SafetyYN, ComputerYN, ComputerHrs) 
SELECT " & CurrentExamID.ToString & " AS ExamID, Occupation, SafetyYN, ComputerYN, ComputerHrs FROM SocialHistory 
WHERE ExamID = '" & LastExamID & "'"

Feed everything you want to insert into the SELECT statement, use AS to match discrete values to their column in the destination table and everything should work out OK.

hericles 289 Master Poster Featured Poster

You simply need to do a query to the table searching for that user name. If one row is returned then they have already created their account so redirect to the update page. If no rows are returned, they don't exist in the database so redirect to the insert page.

So,on the link click run a SELECT statement with the user name as a parameter. The result tells you which option you redirect to.

hericles 289 Master Poster Featured Poster

Not sure what you mean by a database site. Are you referring to a database driven website where all of the content comes from a database?
these cases are no different from static websites. A crawler lands on your page and the page loads as normal, thereby making all of the same content available as if a user had navigated there. The content is there searched and the usual SEO rules applied.
Is that what you meant?

hericles 289 Master Poster Featured Poster

It comes down to how the compiler reads and interprets your code. By defining different symbols for different things the compiler can infere what action you are trying to do. If you have done a course on compilers you would have used similar structures to tell your compiler how to handle certain lines in your code and branch appropriately.
But your final points are correct. Those structures do the things you describe.

iConqueror commented: thankyou sir +1
hericles 289 Master Poster Featured Poster

No follow stops net crawlers from following links away from your site to the linked site. By using no-follow you can prevent your page rank transferring to the linked page and prevent the search engine from adding the linked page to their graph of the web (via your site at least).
This google page explains their take on no-follow (other search engines may differ): Click Here

hericles 289 Master Poster Featured Poster

You need session_start() at the top of all scripts that intend to use the session state, whether to read from or set it.
Adding session_start() to your checklogin.php should fix the problem.

hericles 289 Master Poster Featured Poster

Have you got the correct modules enabled in your php.ini file?

hericles 289 Master Poster Featured Poster

My take is that, for knowledgeable web users, the https and the lack of warnings is a sign of trust. Your self encrypton method, while it would be valid if done right, is invisible to the user. they wouldn't know what was happening in the background and so your website LOOKS unsecured.

hericles 289 Master Poster Featured Poster

You can use google web fonts for that. You download the font via an href to the google font location.
Here is Google's getting started guide

almostbob commented: what he said :) +13
hericles 289 Master Poster Featured Poster

It should be fairly understandable if you buld the string yourself, keeping track of x at the same time but I'll try to give a coherent explanation.

On the first loop x == 0
an A is always added so "a" becomes the first letter.
X < 1 so a space is added : "a "
An 'n' is always added: "a n"
Only the x < 1 if statement is called as x == 0 so oise is added: 'a noise '

Second loop, x = 1
an 'a' is always added: 'a noise a'
an 'n' is always added: 'a noise an'
the only if statement to fire is x == 1 so noys is added: 'a noise annoys '

Third loop x == 2
add an a
add an n : 'a noise annoys an'
x > 1 if statement adds 'oyster' : 'a noise annoys an oyster'
x increments to 4 so loop exits

Does that help?

hericles 289 Master Poster Featured Poster

$query is not a string, it is a mysql_query so your concatenation isn't working as you would think.
Build your string and then create your query.

$select = "SELECT M.msg_id, M.uploads, M.message, M.description, M.type, M.text, M.views_count, U.username, C.name as country_name FROM users AS U INNER JOIN messages AS M ON U.uid = M.uid_fk INNER JOIN head_networks AS H ON M.network_id=H.network_id LEFT JOIN countries AS C ON M.country_id=C.country_id WHERE M.type='A' ";
$Order = " ORDER BY M.message ASC";
$query = mysql_query($select . $Order);
hericles 289 Master Poster Featured Poster

The world bank data file says 0.51 hectares per person for the US so times that by 10 million and convert to km2

hericles 289 Master Poster Featured Poster

Without knowing more about the queries users will be placing against the database it is hard to be sure but making sure all inputting transactions are wrapped in transactions should stop most conflicts.
Any solution that involves locking the required columns or tables during queries should mean max(id) always returns the correct url.

hericles 289 Master Poster Featured Poster

Are any of the columns used in that insert statement integers, double, floats, etc? If yes, you would need to parse the matching input from text to whatever the column type is.

hericles 289 Master Poster Featured Poster

Is there any particular part you are stuck with?
Posting up what you have done already makes it far more likely someone will help you. Requests to do your homework for you don't get much of a response.

If you haven't started, break it down into what it is asking of you:
sort 4 digits highest to lowest
sort the same 4 digits lowest to highest
subtract lowest from highest
check result
input new number or stop

If you handle each part as a separate problem you'll probably find you step through it pretty quickly.

ddanbe commented: well said! +15
hericles 289 Master Poster Featured Poster

OK, as a test, can you alter the html property in the css file so the background image isn't a part of it, change the colour instead. That way we'll know if the image is the issue or the html selector itself.
Of course, strip the color from the body selector too...

hericles 289 Master Poster Featured Poster

I doubt your image dir is inside your styles directory in that case.
Change to
background: url(../images/ralnabg.jpg) no-repeat center center fixed;

You need the ../ to revert out of the styles folder and locate the images folder.

hericles 289 Master Poster Featured Poster

The background property is a shortcut to combine all background commands into one, as opposed to having a background-color and a background-image.
So you are setting a background-color and then using the background: to say you don't want a color.
try:
background: #3d3d3d url(../images/first_section_bg.jpg) no-repeat center center;

hericles 289 Master Poster Featured Poster

Remove the var key word from line 5. You don't want to to be specifying a new version of X, just reset the existing x variable.

hericles 289 Master Poster Featured Poster

Use a JOIN to connect the two tables. For that to happen both tables need to share a common key that you can JOIN them ON.
A sample JOIN looks like:

SELECT a.col1, b.col2 FROM tablea AS a JOIN tableb AS b ON a.col1 = b.col1 WHERE <some flter> 

As an aside you mentioed a widget to show the last 5 songs but your query, ifit is the query for your widget, gets all songs from the table. You can use LIMIT <some number> to specify how many rows to return.

hericles 289 Master Poster Featured Poster

You need AJAX. A standard button click will process all server side code and then cause a postback to the page, meaning nothing will update until the process is complete.

hericles 289 Master Poster Featured Poster

For a start you database design could be better. You should have a table for employees, a table for department and a linking table that holds just employee IDs and department IDs to show who is in what.

emp (id, name)
dep (depid, dep_name)
emp_dep(empid, depid)

Now you join all three (if you want to search by name) or just emp and emp_dep if searching by depid is enough and you can use NOT IN or something similar to separate out your employees.

hericles 289 Master Poster Featured Poster

Any information about what goes wrong, displayed behaviour or error messages, would help us out a little.

hericles 289 Master Poster Featured Poster

Most payment portals have an API that allows the website to make calls to the payment provider. exactly how they operate and fit together depends a lot on the particular provider and their API.
Obviously, PHP skills help a lot. Did you understand how the API works and looks at examples? Most have a sandbox you can use to test as well.

hericles 289 Master Poster Featured Poster

You pretty much have it correct. If no data lends itself to being a natural key (i.e. nothing int the data is unique across rows) a surrogate key needs to be supplied.
If you created a id column using [int auto_increment primary key] then you have a surrogate key because, although the column uniqiuely identifies each row, it has no real world realtionship with the data.
Using unique 'business' data means you are using a natural key e.g. social security numbers in a payroll database

[NOPE]FOREVER commented: Thankyou sir +1
hericles 289 Master Poster Featured Poster

see link at bottom of original post

diafol commented: thank you, heh heh +0
hericles 289 Master Poster Featured Poster

If you simply want to validate the input, make sure values are entered in required fields, that emails are in email format, etc you can just use jQuery to monitor each input for changes and validate them.
If you need to check the input against a database for any reason then you need AJAX to post the query away and get a response without leaving the page.
Both of those methods happen as the user enters data into the page and have nothing to do with the form submission (in fact, once anything is flagged as bad or a required field is incomplete you could disable the button).
Recording the info and sending an email would be handled by the PHP script on form submission.

I doubt you will find a custom script that works exactly as you want and PHP scripts won't work the way you want anyway as they require post back.

diafol commented: good points +14
hericles 289 Master Poster Featured Poster

Two ways the query could work (depending on your database design):
Your database query could be a query to return everything from the users table for that login.
You then parse that result set to locate an empty elements and if any are found display the alert box.

Or, query for all fields in the database that are '' or NULL. If anything is returned then you know to bring up the alert box.

Once the user has clicked the link to complete their profile you can either show just the empty fields or show everything to allow them to make changes to every field. Save the changes to the database.

You mention it should be the same script that does all this but it doesn't have to be and preferrably won't be. You want one script to detect empty fields, if any show message to take user to editing page.
From that page second script runs the update.

almostbob commented: can't get tighter answer than this Kudos +13