-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Code will not work after adding sha1 and salt encryption
Adam replied to rightone's topic in PHP Coding Help
You're missing a comma after '{$data['email']}'.. Slightly off-topic, is there a specific reason you're using char over varchar for `username`? char data types pad the data to the specific field length with spaces.. So unless this is purposefully done, using varchar is better for memory. -
You're mixing JavaScript with jQuery here: var value = $(this).val(); $("#testbox").style.border="1px solid "+ value; The style property doesn't exist within jQuery, you need to use the .css(propertyName, value) method.
-
Code will not work after adding sha1 and salt encryption
Adam replied to rightone's topic in PHP Coding Help
What output do you see? Have you tried checking for errors with mysql_error ? -
mjdamato I think you'll find that doesn't work in FF, Chrome or Safari.
-
I see what you're saying, but that's not what the OP is requesting. unistake wants to have the path "/demo" displayed within the SERP, not "/project-details.php?p=demo". A 301 redirect will correctly, without penalty lead Google to the long path, but it'll use that URL within the SERP. A 301 redirect from the long path to "/demo" will result in a redirect to a URL that is redirected again.. a loop.
-
Creating tree-like structure (item, sub item, subsubitem) from a db?
Adam replied to lfernando's topic in PHP Coding Help
Can the nesting be unlimited, or do you limit it to (up-to) 2 parent levels? -
Just to clarify there actually, slapping all the code in a function won't magically work. I was just saying how something like this *should* be written, as what you're currently trying to do makes no sense.
-
The browser won't make another HTTP request to the script just because you change the src attribute of the script tag. This is something that should be contained within a function and bound to an event: <script type="text/javascript" src="http://localhost:8888/calendars/calendar_javascript.js"></script> <script type="text/javascript"> window.onload = function() { document.getElementById('calendarPopButton').onclick = function() { popCalendar(this); } } </script> The external script would contain the 'popCalendar' function. Passing 'this' to it would pass the 'calendarPopButton' element, for uses in positioning and such. This way you have a re-usable function, that can be easily updated through other functions (i.e. 'setCalendarMonth()' or something). Having said all that; jQuery has a powerful, yet simple datepicker widget available within the UI library that would make this a thousand times easier for you.
-
I take it you're using this jQuery.validate plug-in? Firstly do you have the plug-in code included within a script tag? I've never used it myself so can only guess the problems, but it looks like you need to call it for individual inputs, not for a form as your selector suggests. Also it looks like you have to specify a 'valid()' function within the parameters in order to actually validate the input; which makes sense as how's it supposed to know what's valid otherwise?
-
Yeah. Unfortunately though the site has literally hundreds of thousands of pages rendered from a variety of sources, so the first draft of the application that generates the sitemap wasn't perfect. My point from this though is when Google will crawl the site normally, and finds a page that redirects, it'll still mark it down for having that unnecessary redirect. Using mod_rewrite to rewrite the URL will improve SEO (ever so slightly) over redirecting the user.
-
I don't mean pages that have been moved, the OP wasn't asking about that. It looks like unistake's got some kind of vanity URL system in place. I don't have information at hand, but during the SEO project we did at work we created sitemaps that were validated by Google. URLs that redirected to another URL with duplicate content were reported as warnings, that should be corrected. Obviously a negative in Google's eyes.. I'll try to dig out the exact errors later.
-
You mean..? UPDATE Classified SET `published`=0 WHERE `published`=1
-
Not 100% sure I understand. The link should help, but I'm getting a 404..
-
"CHARACTER VARYING(32)" is not a valid Oracle data type; you'd need to use varchar2(32) - assuming the 32 in yours means bytes. now() is also not a valid function, you'd need to use sysdate - without brackets - however that's probably not in the correct date format. You can combine it with to_char to set the format: to_char(sysdate, 'YYYY-MM-DD') I belive this would also fail: CONSTRAINT HT_SALARY_ISACTIVE_CHECK CHECK (isactive = ANY (ARRAY['Y'::bpchar, 'N'::bpchar])) You'd need to use the standard SQL IN operator, supported by PL/SQL.. Although I'm not sure the syntax will be anything like the same in Oracle. There may be other issues but see how that changes things.
-
No I meant accessing the PHP script through the browser, cutting out the jQuery middle man. That may display an error, blank page, wrong output.. something that would give you a clue as to why it's not working. Once you're 100% sure the PHP works fine, and if you still have errors, then start debugging the jQuery.
-
I can't see any reason why that wouldn't work. Do you get an error? Blank page? Try a var_dump on each variable to make sure they contain what you expect: var_dump($pass1); var_dump($pass2);
-
What do you mean by this? Google will understand the status codes you provide. 301 Moved permanantly, 404 does not exist, etc In terms of SEO, Google marks you down (ever so slightly) for redirects.
-
if($pass1 != o) Where exactly did you get "o" from? Should be: if ($pass1 != $pass2)
-
Think that was the point of Thorpe's post to be honest.
-
There's also the less-known 'canonical' link tag you can use, to tell Google (and presumably other search engines will have adapted it) duplicate URLs are the same.. Although Google still doesn't like the redirect, so you're probably better off rewriting the URL where possible.
-
What a penis.
-
Have you tried running the PHP script straight from the browser, to make sure it's working correctly?
-
Are you wanting to return the "album" parameter from the URL the user is visiting, or from a URL contained within a variable?
-
Aha oh yer
-
Okay. What's the problem with it?