Jump to content

Sir William

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by Sir William

  1. Before CSS, when layout was all tables, and knowing that relevant content higher in the page helped search engine rankings, some people put navigation on the right so as to get content read first and thereby help their rankings.  But with CSS positioning, you can have your content first and still have your nav on the left or right as you see fit. Most of the sites I do have it on the left, but I do have a few on the right for the heck of it.  :D
  2. A tab ( \t), tilde ( ~ ) or pipe ( | ) should work well and hardly if ever used by anybody.
  3. For phone numbers, I use three boxes. Then I use JS to auto jump to the next box as the number is filled out. This way, if they don't have JS, they can still use it the old fashioned way. Then I take the three fields, put a dash between them and store the properly formatted number in the DB.
  4. jesirose is right about the $array[] working to add to the end of the array; it works just the same as array_push but without the overhead. You may also want to read up on array_unshift ( http://www.php.net/manual/en/function.array-unshift.php ) which adds one or more values to the beginning of an array and renumbers accordingly.
  5. You could do fsockopen as well. http://www.php.net/manual/en/function.fsockopen.php It's what people used before cURL.
  6. Where is the array $stat[] coming from?  I don't see that defined anywhere.
  7. I've played with a ton of different CMS packages over the years.  Most were either too complex with too many features (Nuke/etc) or didn't do enough.  I've recently started using Etomite (http://www.etomite.org/) and have been very happy with it so far.  I've got customers using it who can barely send/receive e-mail.  I had to setup a couple of page templates for them to work from, but they're coming along quite nicely. Just my $.02.
  8. They're in there now.  I edited it about 20 seconds after I posted.  I was just saying why I edited. If $_SESSION['MM_Username'] = Joe then the query will be $sql = " ....... username = 'Joe' ".  There should be ticks around the variable call in case the Username has spaces in it.
  9. Well, you have $hours1 and $hours2 backwards.  But other than that, what is it doing or not doing that's causing your problems?  Errors?  Wrong results?  We need more info.
  10. What bqallover has will work, but my thought was that having to add in that code to every future query will make things that much harder to read as you develop more code.  Not trying to detract from cleverly structured SQL.  :D  On the contrary, the better I get at building effective queries, the less PHP I have to write to do what I want.
  11. You can't use the associative array call from within quotes, try this: $sql = "INSERT INTO filestore SET       filename = '$uploadname',       mimetype = '$uploadtype',       description = '$uploaddesc',       filedata = '$filedata',       username = '".$_SESSION['MM_Username']."'"; [i]Edit: forgot the ticks around the username.[/i]
  12. Since your date info is likely to be an issue down the road, I'd write a small script to pull the three fields, join them to create a proper date string then put that string in a new datetime field in the table.  You will still have your old values for whatever legacy script may need them, but you'll also have a proper datetime value that you can use as you write new code or rewrite the original stuff. Just my $.02.
  13. What wasn't really said was how you SHOULD be checking passwords.  The most common way I've seen and used is to store the md5'd password hash in the database for the user.  Then when they have to authenticate, you get their username/id and password.  You then retrieve the hash from the DB then md5 the submitted password.  If the retrieved hash and the hashed submission match, then you're authentic.  If not, error/try again/whatever.  That make sense?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.