Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. // Side Conversation What does if and only if mean? Computers aren't wishy washy, it's not like they'll see if($x == 6){ } and think "five is close to six, I guess 5 counts too"; if means if, how could you have an if that isn't "only" if?
  2. So before including any of these files, make a global $db - then instead of using $this->db, just use $db;
  3. http://www.google.com/search?q=Generate+PDF+with+PHP First and second results look good. Or search the manual for PDF.
  4. I would use PHP to generate a PDF file, and print that, that way they can all be on seperate sheets of paper.
  5. 1. You don't need quotes around variables. 2. try $result = mysql_query("SELECT * FROM $tbl_name", $link) OR die(mysql_error());
  6. Thanks obsidian. That's what I do now, just the cellspacing part, since the rest can be controlled via CSS. If anyone knows of anything besides JS, please share ;)
  7. Did you try it using pconnect? How are you calling the class? You didn't post your query function either.
  8. What? Select them all out of the database, display them all on the screen like you normally would and print it. By print, you mean onto paper via a printer, with ink, yes? What I was saying is PHP can't interact with that device. If you're asking how to get it out of the database, how'd you get it in there in the first place? There are tutorials on databases in the beginners section on this site.
  9. What is the problem with it? Do print_r($_POST['foo']); and make sure they are set.
  10. I know that in order to mimic the table property cellpadding="0" you can have this in your css: [code]tr, td{ padding: 0; margin: 0; }[/code] You'd think that the margin: 0 would make the cellspacing 0 as well. However, it doesn't. (Unless I seriously screwed something else up?) Does anyone know of a CSS way to make a table have no cellspacing, so you don't have to put cellspacing="0" in every <table>?
  11. AFAIK, you'd have to generate what you want printed, and actually print it yourself. Such as generate a PDF, then make your computer print it. PHP isn't mean to handle interactions between computers and peripherals, it's a server-side language.
  12. use pconnect instead of connect. Do you get an error? What is it?
  13. Yes, but I was asking what it was specifically when you tried it. For example, if you'd put it "O'Brien" the ' might have been the culprit. Gah, I give up. Good luck getting help.
  14. You can install phpMyAdmin locally and set the IP in the config file, as long as the server is set up to allow remote connections.
  15. generic wasn't being a jerk. If you'd looked on the FAQ board, there's a post about @. Also, you knew to call it an operator. Did you look in the documentation under operators? There's only a few pages, and skimming through them and searching for @ shows that it's on the error control operators page. Also, just searching the PHP docs for "at sign" using the php.net search resulted in plenty of hits for the page.
  16. You may have to wrap the value in htmlentities so that it prints the value of < and not the html tag <. I missed the beginning of the img where you're trying to pass a whole html tag. Try running the string through htmlentities() first
  17. Because that's what you wrote. Remove the />" before Name.
  18. It's the error surpressor, there was a thread on this yesterday. Edit: weird, it didn't show me the message that someone had posted since I started composing. Good find generic :)
  19. Do this: $q = "SELECT DAY(event_date) AS day, COUNT(event_id) FROM calender_events WHERE MONTH(event_date) = " . $month . " AND YEAR(event_date) = " . $year . " GROUP BY day"; $sql = mysql_query($q) OR die(mysql_error());
  20. Well it looked fine to me, you didn't show me the value of description you were passing. If you show what you were passing when it broke, that might explain WHY. Look up mysql_real_escape_string();
  21. Isn't that what I did only using strtotime instead of mktime, and longer? :-P
  22. [code]$feb21 = mktime(0, 0, 0, 2, 21, date("Y")); $mar08 = mktime(0, 0, 0, 3, 8, date("Y")); while($time=$feb21; $time<=$mar08; $time = $time+(60*60*24)){   print date("F jS, Y", $time); }[/code] (not tested)
  23. that would be decrementing. If you just want it to show up that way in your display, you could just print a - in front ;)
  24. What is the value of $description? Your query is open to SQL injection.
  25. ... Yes, the people at the ZenCart support forum. This doesn't belong here, that's why you're not getting much help. http://www.zen-cart.com/forum/ Here: http://tutorials.zen-cart.com/index.php There are sections on setting up products, templates, troubleshooting, and much more.
×
×
  • 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.