Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. 1 - This isn't a PHP problem, but don't bother moving it, it's on the way. 2 - What exactly is the problem because: Here is my problem: I have two tables in the same database – isn't a problem, it's normal.
  2. Your code just needs a minor adjustment to work $foldername = "asdf"; echo '' . $foldername . '';
  3. You need the whole string in double quotes or else the variables won't interpolate. For attributes use single quotes. echo "$foldername";
  4. Hmm, I'm not really sure then. Because description IS NOT a reserved word so that's not the problem. Maybe you have to select what you order by. If * works than just use that. No professional training. I did graduate from a university with a BS in computer science and did an internship that entailed mostly PHP. To tell you the truth, I learned most of my PHP from this site
  5. Try echoing out the session count to make sure it's incrementing. if($_SESSION['stats'] > 1) { echo " session # " . $_SESSION['stats']; } else Also echo it out here just to make sure it's being passed along: session_start(); include ('log.php'); echo " test log script "; echo "session # " . $_SESSION['stats']; // phpinfo (); ?> The include should take care of this but just to rule it out, try putting session_start(); on every page.
  6. I agree, 3 is the best one so far. Maybe it's just me (or my shitty laptop), but it looks a little off-centered. Leans to the right a bit. Do you have a horizontal scroll bar? The image is 1400 px wide. Lol, yeah... it's centered, FML.
  7. Hehe, sure buddy. Don't worry, I always get confused with logical operators
  8. Yes and Yes. If description is a column in your table then you should get results back without errors. What exactly did the mysql_error say when you put the or die clause in? You're right it is in-efficient. If you don't need ALL columns then only select what you do need.
  9. Start a new thread in the proper section (Javascript). AND mark this thread [sOLVED]. Here's one that looks halfway decent. http://www.java2s.com/Code/JavaScript/Ajax-Layer/Textcolorfadein.htm Just google, "javascript color fading text", you will find what you're looking for. Also, it's a good idea to use a libraries like Mootools, scriptaculous, Jquery, etc... It makes things a lot easier, and it's just a good to learn. Maybe do a little research on your own? They are not programs, they are libraries. MooTools - basics
  10. I agree, 3 is the best one so far. Maybe it's just me (or my shitty laptop), but it looks a little off-centered. Leans to the right a bit.
  11. description may be reserved so I put backticks around it, but the or die clause will let you know what the SQL error is: $sql = mysql_query("SELECT `description` FROM mag_art_desc ORDER BY ID DESC LIMIT 1") or die(mysql_error());
  12. Example please, this could mean a couple different things.
  13. Try switching the include to be before the echo... include ('log.php'); echo " test log script "; // phpinfo (); ?> I was getting this error if I put the include after the echo: You don't get errors because you seem to be a live site, if you put this code at the top of your page you would probably get the same error message: ini_set ("display_errors", "1"); error_reporting(E_ALL); It's still not a logical explanation as to why it keeps writing dupes. * Back to testing *
  14. Yeah, you need to use OR. userid can't be 2 different numbers at the same time, you know what I mean?
  15. Hmmm yeah it keeps adding me in every time I refresh... Is this your entire script , as far as recording visitors to log.db?
  16. Why can't you just do this? $query = "SELECT * FROM posts WHERE userid = '$follower' OR userid = '$me' ORDER BY posted DESC";
  17. I'm using FF3 as well. I refreshed the page and it doesn't write a dupe to the log. I also made 2 separate files and included the one in the second file to ensure I had the same setup as you and it still works... You don't use session_destroy(); anywhere do you? Cause that will reset the session variable and count a page refresh.
  18. Makes me want to take a vacation! What kind of discounts can you hook me up with? Seriously, it looks really nice. Perfect theme for the type of site it is. Although I don't like brown, it fits the sand that goes further down in the background. Nice job
  19. Oh yeah sorry, I edited my previous post, and changed the query. Should be: $query_Recordset1 = "SELECT * FROM employees ORDER BY id"; NOTE: MySQL assumes you want ASC unless you specify DESC.
  20. Looks good. I just tested it on my local host and everything seems to be working/writing properly. Nice job By the way, why are you writing to a log file rather than a database?
  21. post your current query.
  22. - Please don't give us unnecessary code. - I think you meant ASC to order from first to last. $query_Recordset1 = "SELECT * FROM employees ORDER BY id";
  23. I'm confused, is this solved? If so, please mark as [sOLVED], thanks.
  24. The damage has been done... :'(
  25. Instead of storing the results delimited by a character just make a new record for each one with the same category. You can use an auto-incremented id to identify them uniquely. You should read more into Database normalization.
×
×
  • 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.