Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. make #sidebar and #mainContent heights 100%; that way each div will be the height of the parent div, if you don't want both divs to be the same height as #container, create another parent div inside of #conatiner.
  2. a combination of both really, learning a new language should not be rushed, as this will lead to common errors that can be avoided, if you are serious about wanting to get into web development, take your time, learn the material the correct way, and then proceed with your script.
  3. thank you for the recommendation, isn't Bjarne the creator of C++? can't really get a more reliable resource than that.
  4. I've tried: $count = mysql_query("SELECT COUNT(id) FROM my_posts"); Then: $q1 = mysql_query("SELECT * FROM my_posts ORDER BY id DESC LIMIT 1"); // to be the first result And: $q2 = mysql_query("SELECT * FROM my_posts WHERE id<$count LIMIT 1"); //to be the second result but this cannot be executed.. mysql_query returns a resource, using its return value like an integer is clearly incorrect and will never work.
  5. Those books were recommended by one of my friends as well, will definitely need to purchase it/them. I'm assuming it is a several book series?
  6. Js setInterval()
  7. 1. notify the user by having the necessary string as the input value. 2. use a regular expression to search for the specified pattern in the string. (really, in this instance, strpos may be used.) and act accordingly.
  8. dealing with backslashes in a like clause can be a little buggy, this link from mysql dev talks about it: http://dev.mysql.com/doc/refman/5.1/en/string-comparison-functions.html#operator_like
  9. use a mysql JOIN for this, you can google it if you are not sure what it is, and really, you didn't answer my first question, what errors do you receive.
  10. mysql_real_escape_string will take care of the backslash, what error(s) do you actually receive
  11. order by primary_index desc limit 3
  12. I have done research, almost everywhere I looked it is based on opinion. classic..lol.. and somewhat true
  13. thank you MasterAce, i have looked at cplusplus.com and it looks like it does a very good job of covering the basics. I will also look into the book you suggested, thanks again.
  14. hey guys, im looking to get into programming applications using C++, maybe Java at some point. I am looking for some recommended online references/tutorials, as well as any books that you guys recommend.
  15. it is recommended to use nl2br() to output data from your db, not on insertion, as mentioned.
  16. yes, you will need the PDO driver for prepared statements if you choose to go that route, depending on what PHP version you are running, you may or may not have the driver installed/enabled.
  17. always have session_start() at the top of any page where you plan on using sessions, if session_start() is not there, sessions will not be displayed. Never have session start() in a condition.
  18. mysql_real_escape_string
  19. 1. to avoid silly errors that come from having to escape everything, don't use php to echo javascript, end php, execute the javascript, then start php again <?php echo "blah"; ?> <script> //js stuff </script> <?php ?> 2. well, you could pass the form object values as arguments, which would make for a more robust and reusable function, which is what functions are for, but either way you should definitely be assigning each value to a different variable. 3. you can for loop the document.forms['addp'] values and check for them being null or empty inside of the loop, this would reduce the amount of code needed greatly.
  20. have the form handling on the same page and pass the id from te form via the $_GET or $_POST methods. It would help if you posted the relevant code.
  21. should be able to figure it out from the hint, but you'll want something like this, with whatever conditions you want to add. select distinct ip from track
  22. Yeah, and StarCraft wasn't founded in Korea either! like
  23. You can use the PHP magic constant __FILE__
  24. no problem, im glad you figured that last part out on your own. good work
  25. because $name = "Bob" is static, every time the page is refreshed, $name will be set to Bob.. if you want the name that the user types in to appear there, you can store the value in either a session or a cookie
×
×
  • 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.