Mahngiel
-
Posts
1,068 -
Joined
-
Last visited
Posts posted by Mahngiel
-
-
AND date BETWEEN (CURDATE() - INTERVAL 30 DAY) AND (CURDATE() - INTERVAL 10 DAY)
I've seen you post that methodology several times before, and I'm just curious: Is there a timestamp format that must be abided by in order for that to work? a la yyyy-mm-dd hh:mm:ss ?
-
Much akin to my post on your previous thread, you need to learn how to manage your code. The text you have is not contained within any element, therefore making managing said elements impossible. http://jsfiddle.net/Mahngiel/9YpSr/1/
-
I'm very confused. I understand your not here to for me but could you please elaborate on this?
Yes, I can tell from reading your code you would be. You've thrown so many elements at the page, if you were to ever get this working, I'm not sure you understand why. Take a look at this code, for example:
<div style="background-color: #FFFFFF;width: 1119px; margin: 0px auto; border-left: 1px solid #ccc; border-right: 1px solid #ccc;"> <ul id="navlist"> <li> <div class="toggle1" style="background-color: #FFFFFF; border-bottom: 1px solid #ccc;"> <a href="#"> <div align="center" style="color: #000000;"><b>DROPDOWN</b></div> </a> </div> <div class="hidden1"> <div style="height: 50px; background-color: #FFFFFF;"></div> </div> </li> </ul> </div>
The purpose of these elements is to create one clickable element and the corresponding show/hide div. Validation failures aside, you've got no logic in your code.
[*] The UL is a block-level element which is supposed to hold a ... list or grouped items like menus
[*] You use a div > a > div This doesn't validate because you don't wrap a block-level element (<div>) in an inline element ( <a> ). Yes, it works, but there is a much better way to do this: If you manipulate the stylesheet, you can turn an element block.
[*] Your code can be minimized and more easily read with a few minutes of study and effort.
Put your styles into the stylesheet, not inline. makes debugging a pain in the ass.
-
checkboxes smd radios post as true or false you'll need to iterate through the post values and assign based on that look up for each()
-
looks great! now i can troll on the go!
-
-
does it round down?
-
add: 'where `date` > yyyy:mm:dd and `date` <yyyy:mm:dd ' to your query or so depending on how you're storing your timestamps
-
what i would is is why separation between controllers and models are so important. what i would do is start with looking for a user in the table that matches the inout username if that first step passes, you have the row's salt, right? take that salt, and use it against the same strategy you employed to creqte the hash in the first place if that result matches the earlier query's column value, then the "passwors" matches the user and a valid login has been established
-
<div>
<div>dropdown</div><div>expando chango</div></div>
-
i think your page structure is what's messed up. you should include the drop down inside the 'dropdown' element at the very least.
-
then it's supposed to be "fixed" too. apply the code to it. there is no magic in coding, you have to make it happen.
-
Yeah, that's really the question here.
You need to figure out which areas of PHP (or programming in general) you are weak in, and then research those specific topics.
When you're new to any language, not knowing what you don't know that can be useful to the endeavor is one of the hardest parts. From there, it's just googling those topics. To that end, i think surrogategod's suggestion is a valid one. Getting open-source frameworks / applications, playing with it, and extending it is how I learned what i know ( supplemented with shit loads of google and these boards, ofc )
-
bro... you've already established a salt for the user. you need to use THAT salt to compare it.
-
Linux has limitations, for example ext3 has a 32,000 subdirectory limit, while ext4 has 64,000
Subdir limit != file num limit, as evidenced by this snippet:
for ($run = 1; $run < 65000; $run++) { file_put_contents ($run, 'test'); }
The result:
test$ ls -l | wc -l65000
-
gonna have to see the relevant data
-
May as well stop you getting into bad habits at an early stage.
...
Do not use "SELECT * "
Well, OP didn't... i did purely for brevity. But valid enough point!
-
echo '<pre>'.print_r($row[0], true).'</pre>';
there is only one array, therefore no offset is required. use
$row
instead. -
you should research how to use the tools and what they're for before you implement them. a JOIN is for combining more than one table (99% of the time) into a single table instead of making successive queries.
Scenario: You want a user and his rank. The user table stores a rank_id, which relates to the rank table which stores the name of the rank.
bad way:
<?php // getting user row $user = select * from users where user_id = 1; // get rank with that info select * from rank where rank_id = $user[rank_id];
better way
<?php //get user and rank together SELECT * FROM users where user_id = 1 LEFT JOIN rank on rank.id = user.rank_id
-
you want the modal boxes to come from another server? why? modals are typically hidden (or loaded via ajax for a cleaner DOM) until called.
-
^^ Furthermore
'password' => $this->encrypt->sha1($salt . $this->encrypt->sha1 . $this->input->post('password')))
<- controller'password', $salt . $this->input->post(sha1('password')));
<- modelthe two are not the same
when you hash passwords, you are comparing the stored hash to the user's input that's been hashed in the same method.
If you're storing it as per the first method, your login controller should take the password input, re-perform the encrypt method and compare the re-hash to the stored value.
-
-
You don't declare a base font-size when declaring the font family. It has it's own base dimensions from when it was drawn. You can, however assign the font-size based on when you use it.
h4 { font-family: my-font; font-size: 1em; }
-
the two are not the same
php display css with order, 1/2/1/2/1/2/1/2 etc...
in PHP Coding Help
Posted
let's say your code looks like this:
using CSS pseudo elements, you can actually alternate with nth-child. http://jsfiddle.net/Mahngiel/jmKc4/
so take your styles for .circle1 and .circle2 and apply them to the psuedo