
MDCode
Members-
Posts
640 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MDCode
-
If you mean if you can post some information into an email, then yes. When the link is clicked, get the code from the URL and match it towards which account has which link, and update said user.
-
I'm not sure as to what your problem could be as this works on my site. Perhaps a version of php problem.
-
There is no security risk in clicking a link in their email. The way you have it would work good but set it to an int or enum for better organization, if not registered put a 0, when the link is clicked set to 1
-
Speekup.com - Political Social Networking - Please Critique
MDCode replied to SpeekUp's topic in Website Critique
The fact that you use javascript alerts so much is really annoying. Scrolling seems to lag the page pretty badly. If a user has javascript disabled and navigates from there, every functionality is pretty useless. For example: I tried viewing one of your posts and there were errors on the page. In fact, if a user has javascript disabled every link on your footer results in errors. -
Please elaborate on the question.
-
There are various problems reported about chrome with onclick issues. I believe it is just incompatible.
-
I tried your suggestion...and failed epically. But! I google'd my hands to numbness and found a solution. If anyone is interested, here it is <script> var isScrolling = false; var load = null; $(function() { $('#chat_container').on('scroll', function() { isScrolling = true; if (load != null) { clearInterval(load); load = null; } }); var pollScrolling = setInterval(function() { isScrolling = false; if (load == null) { load = setInterval(refreshContent, 5000); } }, 500); load = setInterval(refreshContent, 300); function refreshContent() { if (!isScrolling) { $('#chat_container').load('fetchchat.php'); var objDiv = document.getElementById("chat_container"); objDiv.scrollTop = objDiv.scrollHeight; } } }); </script> Just checking if the user is scrolling, if they stop scrolling for 5 seconds, send them back to the bottom.
-
Ok so I'm new to ajax/jquery and am making a basic chat thingy . Yea. So I want it to scroll down to the last message in the div, which works, but a user can not scroll up the way I'm using it because of the interval refresh at the moment. <script> var load = setInterval( function() { $('#chat_container').load('fetchchat.php'); var objDiv = document.getElementById("chat_container"); objDiv.scrollTop = objDiv.scrollHeight; }, 1000); </script> Any idea where I could move it that would not affect the user's scrolling?
-
Just create a read field. Set it to Enum: '0','1' if a user has read it, update read set to 1. else keep it at 0.
-
A full list of timezones was given in the link I posted.
-
Was it really necessary to post the same exact thing 3 times? Refer to http://php.net/manual/en/timezones.php
-
<? is used for only php documents while <?php is correct for documents containing more than php (their echoed html)
-
Yes, a server can be configured to parse php in a .html file. Also, if it were a .html file unable to be parsed, then everything would be displayed not just under the while loop
-
Not necessarily. A server can be configured to .html being able to parse php <? is used for a document that contains only php nothing else. switch to <?php
-
You need to use a form for each button because either will work if they are in the same form. When start visit is pressed just use sql. $sql = "INSERT INTO `table` (value,date,time) VALUES ('start visit', 'CURDATE()', 'date(h:i:s)')";
-
Any errors? The only thing that I can see from a quick glance is that you may not be specifing the $_GET['username']
-
You would need direct access to runescape servers (to be able to get their stats) which they may not allow. Contact them first before attempting. You would also need to have some sort of script to constantly update the image for each user
-
You need to explain what img.php does. We're here guessing blindly while there's no information as what you are trying to do.
-
I have no idea what you're trying to do.
-
<form action="img.php?user=" .$user. "&img=" .$img. "" method="post">
-
I'm not sure what you're trying to accomplish but $img is not right in it either way
-
Everything that you post needs a name="" to identify it. by giving your submit button a name, the if(isset($_POST['submit'])) will work correctly. Also after you solve the submit button crisis, change <form action="img.php?user=" .$user. "&img=". $img" method="post"> to <form action="img.php?user=" .$user. "&img=" .$img. "" method="post">
-
<input type="submit" value="Submit" name="submit" /> Also before it becomes an issue, your form action I'm not seeing where you are getting your variables from for it and you are not escaping $img correctly
-
You aren't giving a name to your submit button add name="submit"
-
Add an opening bracket after if isset post submit