Jump to content

dgiberson

Members
  • Posts

    87
  • Joined

  • Last visited

    Never

Everything posted by dgiberson

  1. So i take it, that you are having to different columns then? If you only require a single date/time i.e. 1/16/2007 00:13:13 store all that information in one field. then you can just format the field as you desire use: http://ca3.php.net/manual/en/function.date.php as a reference.
  2. Why don't you set a session variable upon the first time someone hits the page effectively giving you a entrance timestamp. Use standard pagination script including an additional AND in the sql statement so that it will only return topics that already existed the first time they hit the page. I just dont see the logic in storing that much information in an array, or the mess of file creation/cleanup...
  3. Is the date in Access still showing as 1-Jan-07?
  4. It depends on how you store the information in the database. Check the design view of the table to see how the data is stored, it sounds like you are storing the date in a Medium Date format. Change it to general date... essentially becomes a timestamp field, then you can use the date("<format here>", $date).
  5. you need to set $host, $user and $pass in order to connect. This manner will allow you to use an almost persistent connection as opposed to writing out the connection statement on every page.
  6. if ($result === 1) {   do something } else {   do something else } ===  is a strict comparison for type for example $x = 1; $y = "1"; if ($y == $x) {   echo "This matches"; } else {   echo "No match"; } if ($y === $x) {   echo "match"; } else {   echo "no match"; }
  7. ^^ that's the way to go
  8. Couple of questions: 1. Is the password stored in the database a md5 hash? 2. I dont doubt you are using the proper username / password, just asking if you are matching it up case sensitive?
  9. There's one of two things probably wrong, either the SQL statement or how the info is displaying to the screen. Please POST that section of code.
  10. Im not sure why you have it setup this way but anyways, this should do the trick for ya.... $name=explode("<br>", $row['resourcesneeded']); $amountIn = count($name); for($x = 0; $x <= $amountIn; $x++){   $line = explode(" ", $name[$x]);   echo $line[0]; // prints 200   echo "&nbsp".$line[1]; // prints <space>nails }
  11. Change: $rec_num = mysql_num_rows($rec_check); To: $rec_num = mysql_numrows($rec_check);
  12. I whole heartedly agree with Tandem on the whole SQL injection attack. Secondly, I would suggest changing the lines such as : echo "<script>self.location='index.php';</script>"; to header("Location: index.php");
×
×
  • 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.