Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. You most likely have an error in your sql. You need to check if mysql_error is populated, if it is echo that out as it will show the error. That or the SQL returned 0 records and you can use mysql_num_rows to check that.
  2. Store the criteria in Sessions and check if they are active. Or store them as GET data on the URL.
  3. Why not just pull the data out of the query how you want it sorted using ORDER BY?
  4. That query is bad. Use this instead as it has correct syntax. $query=" SELECT * FROM cars WHERE `$searchtype` LIKE '%$searchterm%'";
  5. Why not just check if the username is not available when they post the data with the main submit button? 2 submit buttons is not a viable option in my opinion. Why make them post twice, when once is all that is needed.
  6. You can easily convert anything that is null to ???. if is_null then display ??? in it's place
  7. If it is disabled they may allow you to use curl that does the same thing in a sense.
  8. My bet is because alphabetical items and numbers can be indexed. ? marks really cannot. I would change that to be different, either just null or another item or add like an "A" infront of them. However you will have to remember to take that into effect each time you run a query against just "A" to not include that.
  9. Why use a template engine? PHP is it's own template engine. Simple as this: index.tpl.php <html> <title><?php echo $title; ?></title> // display the body items <!-- include the foot --> <?php include($_SERVER['DOCUMENT_ROOT'] . '/templates/footer.tpl.php'); ?> </html> index.php <?php //if some condition true // other processing here also $title = "Main Index"; include($_SERVER['DOCUMENT_ROOT'] . '/templates/index.tpl.php'); ?> No need to go and create a whole new system for something PHP was really designed todo.
  10. MySQL should not show it. When you output the data, do the nl2br. It should convert it. Line breaks are escaped characters. They are not suppose to display, if you view the source of the html file you should notice the breaks.
  11. The \n character is there. To detect it you can use strstr But have no doubt it is there, use nl2br before you output the test to see it (that converts \n to <br>) so it is visible to html. EDIT: A note though, if you used spaces instead of enters, it could display like that. So instead of \n it is just a bunch of spaces.
  12. First off take off the caps, annoying as all hell. Secondly, stop holding the ! key down, also very very annoying. Secondly, what is the question. Your post is redundant and really gibberish. Do you have any code and a specific example? Lay off the meth and take an extra 5 minutes to fully explain yourself and maybe someone will help you.
  13. Global should only be used for certain situations. It is better to pass regular variables as parameters. One example of a global variable could be a database connection that you want to use in a function. Show the function you are working on and it can be explained a bit more.
  14. So you want it to when a user clicks it displays that characters information. This is rather easy, you need to store the rest of the information in a hidden div (style="display:none") or use AJAX to retrieve that information. I would go just the hidden div route. You may want to look into "Shadow Box" javascript code, as that maybe just what you are looking for. You need to use html/css to get this to work. Hope that helps.
  15. MySQL Addtime or MySQL Adddate Not sure which is best, but yea. I would add the 2 hours in mysql and save some php processing time/conversion.
  16. You would have quite a bit control depending on the server. As far as users really being who they are, you can customize a script to have them login as that, but you cannot prevent them from changing the username inchat. As far as embedding it, it is just a Java Applet: http://www.phpfreaks.com/page/irc-live-chat A lot of chat sites use this method, like major chat sites. You can really lock down a channel and require a registered username/password. And if you really want it to be members only you have a bot and when a user registers you can use a cronjob and checking if they are registered on the irc chat, if not you add them there via a bot. Anyhow that is a bit of work, but the basic irc chat is the easiest to implement, there are plenty of java applets for it that should be free.
  17. Ok then, so the issue is cURL is not posting the values for the security page and being redirected to the right page? Correct? If I am not mistaken, don't you have to re-put the curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); portion in for the second curl call or am I wrong? If you do not, and cURL does not carry that over, it would not know what/where the cookies. I could be wrong because I never used cURL extensively, but yea. That would be my suggestion from the code and just a logical knowledge of cURL.
  18. Basically there are many free servers out there. You find one you like, create a channel for your site then register that channel. You will have to learn some IRC commands, there are different programs, some people like mIRC but you have to pay for it etc. IRC is a whole nother world and an interesting one. It is worth and fun learning if you ask me.
  19. The pare error is not there. Post more code around "line 20".
  20. In my opinion, use IRC with a Java or Flash program. 100 times easier and way reliable. With 30-50 active users AJAX would be making so many call backs etc, it would be totally un-reliable. Anyhow that is just my 2 cents.
  21. To support this, whenever you get a SMS from an email (I can go in my email and write one) It rarely, if ever, states the actual email. It usually has some random numbers which the server stores for x amount of time and if you reply to it, they route it back using that.
  22. You want to take a look into .htaccess and mod_rewrite.
  23. That is part of my signature, it is attached to all my posts.
  24. You know why this has gone unsolved? (Sorry I am just tired of it being bumped). A, we cannot login to that site to see what you are even talking about without being very proactive and creating an account (which I do not care to do). B, the security question, if it is an image and it is like a Captcha, you would need OCR technology to even begin to break that. C, If it is not, then essentially it should work, why it is not I really do not know as we cannot really view that site to see what is happening. Figured I would let you know why no one was responding.
  25. You have to enable the mysql extension in the php.ini file. Open that file and fine extensions then find the php_mysql (I think it is) and remove the ; from the beginning of that line, restart apache and it should work. EDIT: Noticed that he did uncomment, but did you restart apache
×
×
  • 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.