
MDCode
Members-
Posts
640 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MDCode
-
I'm confused on the logic behind that. PHP is a server-side language so it will be processed no matter how many times you open and close. The only way to use it with JavaScript is to call another file, or the same file with a "if is JavaScript call" conditional.
-
You will have to make an ajax call. PHP is a server side language and thus will not be able to be executed once the file is done loading.
-
How do I get database values for currently logged in users?
MDCode replied to DeX's topic in PHP Coding Help
The only thing a user can do is change their session id cookie to acquire another user's session. The actual session data is private and stored on the server. -
What does your cURL structure look like after adding your XML?
-
In requinix's example, the returned response from that site is saved in the variable $response.
-
Set is a MySQL reserved name. Surround it with backticks. In case of confusion, the column name. Not the variable.
-
Your echoed query shows that the value of $pp is empty so it seems your first query is failing. Also, I do hope you realize $_GET variables are vulnerable to SQL Injectjon as well. Edit: The page should actually not be continuing as you have no open bracket after the if false check
-
$id = _GET ['id']; Not Working :/ Please Help.... URGENT!
MDCode replied to davidfattore's topic in PHP Coding Help
That particular error message usually means the value in your WHERE clause is empty or null. In this case, id. -
There are several issues that can cause flush() to fail as stated in the PHP docs. http://us1.php.net/manual/en/function.flush.php
-
If there isn't a possible conflict, why not check for rand with a space in front, or not with an underscore in front?
-
So what's the question?
-
Just posting snippets won't help. The only reason that we can assume from that is $Code is not set and you are echoing it out of that conditional.
-
Extra bracket. Tip: Post the whole error message next time.
-
Noooo don't use any Adam Khoury (whatever) scripts (you're using one now). He stores passwords in his tutorials unhashed and unsalted and just tells you to go learn how. He's never heard of XSS, CSRF, and 2nd Order SQL Injection either. I would suggest either learning how to secure it first, build one from scratch, or follow another tutorial.
-
Roughly 5 hours ago, Google had flagged php.net as malware. An attacker injected obfuscated javascript into their userprefs.js file. You can read more from their google group at http://productforums.google.com/forum/m/#!topic/webmasters/puLmvjtK0m8
-
Do you have short tags enabled on your server? If not, you will need to change <? To <?php in posttest.php
-
You will need to make a database named something like "images". In the database, include the link to the image, and everything you want to edit for that image. Then just make an edit form and use it to update the database.
-
What part can you not get working?
-
Using Javascript Confirm Box on HTML Drop Down List
MDCode replied to pengi's topic in Javascript Help
You need to validate the response if(confirm("Are you sure?")) { //Pressed ok } else { //Pressed cancel } -
Sorry I'm having a bit of a hard time understanding. You mean like this? $("#chat_container").css('overflow', 'hidden'); var height = $("#chat_container")[0].scrollHeight; // scrollHeight can be accessed when overflow is on any setting. Not sure why to set it as a variable $("#chat_container").css('overflow', 'auto'); // Setting this back will make the div go back to the top if you scroll when hidden $("#chat_container").scrollTop(height); // scrollTop will not work when overflow is on auto or scroll
-
Sorry I seems to have misread your post. scrollHeight will always work. The problem is that scrollTop will always return 0 when the overflow is on scroll or auto. When you change the scrollTop during the time that it is hidden, it works. However when you reset the overflow, scrollTop immediately returns to 0.
-
Thanks kicken. I would never have thought of that I will try it out as soon as I get off work.
-
Hello everyone. Been quite a while Anyways, I'm having a small issue on android that seems to be more of a hassle than I thought. As some of you may know, android has a bug in which scrollTop always returns 0 when the css overflow is set to auto or scroll. I'm making a chat and am trying to make it scroll supported by all devices. Now, there is a workaround for the android bug and that first setting the overflow to hidden, scrolling the chat, then setting it back to auto or scroll like: $("#chat_container").css('overflow', 'hidden'); $("#chat_container").scrollTop($("#chat_container")[0].scrollHeight); $("#chat_container").css('overflow', 'scroll');The problem is that in a few versions of android, when the chat is set back to auto or scroll, it resets the scroll position to the top of, in this case, the chat_container div. If anyone could point me in the right direction, it would be greatly appreciated
-
1. Go to that page and insert an apostrophe after ?city= so it's ?city=' 2. Put "><iframe> into a field 3. When you're on that page, enter something into search and press enter. 4. The way you scroll back to the top of the page. Scroll down the page some and then click another slide number.
-
http://www.lankainstitute.com/search.php?city=' - SQL Injection http://www.lankainstitute.com/contact.php - XSS in textfields http://www.lankainstitute.com/student_registration.php? - Errors when you search http://www.lankainstitute.com/index.php - Kind of annoying that you autoscroll back up after a user selects a different slide. The profile page is...plain. And are you sure it's a good idea to publicly display their phone number and email?