Jump to content

Tandem

Members
  • Posts

    251
  • Joined

  • Last visited

    Never

Everything posted by Tandem

  1. Thats not what i mean at all. I am drawing them by name only. The order is not alphabetical, it is a specific order set by me.
  2. Hi, i am drawing the names of cars out of my database. There are 6 different types of car and i want to put them in a specific order. I'm pretty sure i need to use a case statement to do this but i can't remember exactly how to do it as i need it, and when i google it i can't find anything that is similar to what i'm looking for. Can someone please demonstrate one for me? Thanks.
  3. Nvm, i googled it. Thanks for your replies!
  4. Ok, how do i go about reconfiguring with gd support?
  5. I can't seem to find whether it is or not. my PHP info is here. http://217.174.251.128/php.php also http://217.174.251.128/captcha.txt is my captcha code.
  6. Yes, it's in the same directory. If i go directly to it, i get a red cross too. I'm trying to post my code but everytime i do i get "page cannot be displayed" and then a bunch of errors on reload. While i was googling random things about the subject, i noticed something about GD support. Perhaps maybe that is to do with it?
  7. I don't have error reporting on. i'm not sure how to put it on as i only have cli access to the server and i'm not too familiar with cli's. Not sure if it makes a difference, but it uses img tags to be called, like this <img src="captcha.php">. All my other included files work fine though.
  8. Hi, this is prbably a long shot, as i cannot really give a lot of information about this, as i don't really know what the problem is, so i apologize for that in advance. I've been using a captcha that i found on a tutorial site for a few months now and it's been working great. I can't seem to post the code for it however as everytime that i try, for some reason my session times out :S So i woke up yesterday to find that my site wouldn't load at all, and an error claiming that mysql_connect was an undefined function, and apparently (according to a friend), it was due to a fedora update, and i had to install php-mysql. This fixed everything, but now all of a sudden my captha only appears as a red x. I'm pretty inclined to say that this is all connected. Can anyone suggest anything i can do to get this working again? Thanks in advance if anyone can help me.
  9. I'm trying to post a topic and it won't let me... It says page cannot be displayed and then when i reload it says my session has timed out and that my fields are empty.
  10. If you mean that you want it to happen instantly, and both boxes be on the same page, i think that's a javascript thing. If they are to appear on consecutive pages, then php can be used.
  11. Thanks, i'll give this a try.
  12. Hi, i need some way to be able to detect whether a number is even or not. I searched the php manual but couldn't find anything that does this. Anyone know of a way to do this?
  13. Wow, i didn't think of that. Thanks guys!
  14. Hi, I have a form on my site where users are supposed to input the name of another user. I want to make sure that people cannot enter their own username instead of somebody elses. It also has to be case insensitive, because with the previuos piece of code i had, people were just inputting their own username in different cases to get around it. Here's something similar to what i had before: [code] <?php $other_user = $_POST['otheruser']; if ($other_user == $_SESSION[username]) { echo "Invalid"; exit(); } ?> [/code] I also tried a something with eregi that somebody told me would work, but that didn't work too well, and detected similar usernames as well as matches, but i deleted it and forgot the exact setup of it. Can someone suggest to me a solution? Thanks in advance.
  15. I want to use the mysql DATE_SUB function, but i want the interval time to be specified with a variable. [code]<?php $ter_check = mysql_query("DELETE FROM BLAH WHERE OCCUPANT='$_SESSION[username]' AND NOW() < DATE_SUB(ENTERED, INTERVAL '$ter_res[11]' HOUR)"); ?>[/code] Is this possible, and if so, is the way above the right way?
  16. If you only want to use links then GET is your best option. To use POST (to my knowledge), you need to use a submit input to submit the form.
  17. I think your looking for html frames. Put a frame inside the table, name it something, e.g content, and put target="content" inside your <a> tags. Try googling it for the property info and stuff like that.
  18. You need to configure php.ini to use a smtp server if you haven't already. I remember i had probelms with trying to do this on my local server. EDIT: It's under the module settings section of php.ini
  19. [quote author=eaglejazz link=topic=110746.msg448292#msg448292 date=1160175285] I want to edit this to my specifications, but need your help with this code: [/quote] What are the specifications that you want to edit it to?
  20. nvm, i realised to use a while loop.
  21. include'blah.php'; might be what you're looking for.
  22. Hi, I have come to a situation where i need 2 variables that are both numbers, and both generated with rand(), and they both have to be different on every occasion. For example if they both equal 6, then that is bad. At the moment due to lack of knowledge of what to do properly, i am using the following code: [code]<?php if (!empty($something)){ $var1 = rand(1,52); $var2 = rand(1,52); if ($var1 == $var2){ $var1 = rand(1,52); $var2 = rand(1,52); } if ($var1 == $var2){ $var1 = rand(1,52); $var2 = rand(1,52); } if ($var1 == $var2){ $var1 = rand(1,52); $var2 = rand(1,52); } } ?>[/code] The chances of them still being the same after this is pretty small, but still possible. What is the proper way to solve my problem? Thanks in advance.
  23. You need to use double ='s. e.g [code] if ($partno == "B-100"){ //query here } [/code]
  24. http://us3.php.net/date If you look at example 3 it shows you how to do something similar using mktime and date together. Sorry i can't be of more help than that.
  25. On my site i include a file on every page which updates a field called LAST_ONLINE in the MEMBERS table which contains the members general user information. Then i use the following to display the people who have been active in the last 10 minutes. [code]$online_check = mysql_query("SELECT USERNAME FROM MEMBERS WHERE LAST_ONLINE > DATE_SUB(NOW(), INTERVAL 10 MINUTE)"); $online_num = mysql_num_rows($online_check); for ($i = 0; $i < $online_num; $i++){ $online_result = mysql_result($online_check, $i); echo "$online_result<br>"; }[/code] That would output a list of people.
×
×
  • 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.