scootstah
Staff Alumni-
Posts
3,858 -
Joined
-
Last visited
-
Days Won
29
Everything posted by scootstah
-
how to update infinite amount of rows in 1 query?
scootstah replied to Monkuar's topic in PHP Coding Help
hmm sounds mysql intensive do u recommend me just creating a button for a user to click to auto move the rank up/down each time? seems better and better performance? do u agree or no? MySQL won't even bat an eyelash at that. You could also just use multiple queries. In this case it won't hurt anything. -
You shouldn't really be putting meta tags half way through the DOM. Why not use PHP headers?
-
What are you sanitizing for? First ask yourself if sanitizing input is really what you want to do. If you sanitize input, it will forever be in that format. If you decide to change your sanitation methods later on or want to use the data in a different format you may run into problems. Sanitizing output is much more flexible, because the raw data is always kept in the database. For example if you sanitize HTML and save it to the database then you are stuck with that. If you ever wanted to display the HTML you can't. With that being said, what are you sanitizing against? HTML Purifier is probably the best library out there for sanitizing HTML.
-
Not really. He suggested that if the code is used anywhere else that the developer pay a $10,000 fine. True. I guess I was thinking more of the whole design being part of the work there. It's hard to use random chunks of code for random projects in your portfolio.
-
Sorry but I don't think many people would agree to that. I know I wouldn't. Most freelancers use a contract that states, more-or-less, that the developer owns all copyright to the code, but the client can modify the code for their own use however they see fit, but cannot redistribute it. That way, I am free to use the code that I developed as a base for future projects, future clients, I can use it willy nilly on my portfolio if I want, and I have zero concerns about getting sued for it. None of this effects the client in any way, they got what they paid for. After all, a large majority of freelancing work is throwing a CMS together with some modifications and calling it a day. It's not even your code.
-
It's been a while since I messed with this stuff but is it suppose to be border-style : none; not border: 0; ? Try one then the other and see what happens. I check the qoutes border:0 is fine. Although in this case border makes no difference because the outline is from the "outline" property.
-
Just store the filename.
-
how would i check if user is pending already?
scootstah replied to Monkuar's topic in PHP Coding Help
Select the data from the table and then see if pending == 1? -
Okay, so what is the problem then?
-
getimagesize() thinks $tmpName is empty, so that makes me believe it didn't upload properly this time around.
-
The operator is called the "modulus" operator, which is synonymous to "remainder" in math.
-
Do $image = imagecreatefromjpeg($tmpName); If your image isn't a jpeg, then use one of the other imagecreatefrom functions
-
dirname(__FILE__);
-
You should store the images as files and not in a database. However, you can still put in the image names into the database. If you don't want to overwrite old images you can just use file_exists() to see if that image already exists. If it does, just append some random characters to the end of the file name before you save it.
-
Ah, didn't know that.
-
You could do something like set a disable variable to false. Then before your animation, if disable == true, don't run the animation. If not, set to true and then after the animation runs set back to false.
-
Nothing is sticking out. Make sure that $new_width and $new_height actually contain values, and make sure $image_resized is actually a resource.
-
Use .stop() before the animation.
-
if (isset($_POST['login'])) {
-
Don't put @ on getimagesize(), and you would see another error. You are giving getimagesize() the image name, like, "image.jpg" but you aren't actually giving it the image - just a string containing its name. So you need to give it the tmp_name instead.
-
Your code works just fine for me using IE8.
-
The input="image" is just called login, whereas you are checking for login_x and login_y.
-
Turn on errors. At the top of your script, error_reporting(-1); ini_set('display_errors', 1);
-
Like this? http://jsfiddle.net/VAwDt/ You probably want innerHTML instead of document.write(), since document.write() replaces the entire DOM.
-
$p = 1; foreach ( $_POST as $key => $val ) { $p = $p * $val; echo $p; }