Jump to content

revraz

Members
  • Posts

    6,911
  • Joined

  • Last visited

    Never

Everything posted by revraz

  1. Store a date/time that the person last logged in, query the DB and show the people that were online in the last x mins.
  2. Missing ; on this line $endtime = mktime(23,59,59,$endmonth,$endday,$endyear)
  3. I have two I like, one is How to do everything with PHP & MYSQL, and is a great starter book, and I found it on Amazon for like $5.00
  4. Search for Cookies and Sessions, you'll find a ton of code, tutorials and examples.
  5. I use VB and VB.NET, and both were easy to transition to PHP. Concepts are the same, just have to learn the differences.
  6. NOT NULL means that field cannot be empty. Auto Increment will increment the ID when a new row is created. These are both MySQL features, not PHP.
  7. What I would do is just use a plain form, and see if it works: <form action="test_login.php " method="post"> <tr><td>Username</td></tr> <tr><td><input class="input" type="text" id="username" name="username" /> </td></tr> <tr><td>Password</td></tr> <tr><td><input class="input" type="text" id="password" name="password" /></td></tr> </form>
  8. Your error indicates that form data is not being passed, since the $_POST['username'] is blank in the error. And I can't see how both, the cookie gets set and it ruturns the error above it since its a IF ELSE statement.
  9. It depends on you really. You can verify that the cookie was accepted by the browser or you can just set it and move on.
  10. I don't understand what you are asking. Are you asking how to set a cookie for different length of times?
  11. What does your form code look like? It's returning that result because this line is true if ($num_rows <= 0) Which means either the username/pw doesn't match or your form isn't passing the $_POST data correctly
  12. You still have a lot more issues in you code: Example, why do you repeat the exact same query here? $sql="SELECT $field FROM $table WHERE userid='$userid'"; $result=mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($result)) { // userid exists $sql="SELECT $field FROM $table WHERE userid='$userid'"; $result=mysql_query($result) or die(mysql_error()); You already did a Select once with the same statement, and you are using $result= on the last line with a argument of $result instead of $sql
  13. Sounds like you are referring to people inside your house using the Internet to get out and not poeple using your Webhost. If so, this wouldn't fall under PHP stuff, this would be a Proxy setup along with Firewall tools, like Websense. I'm sure there are cheaper/easier ways, like Nanny type applications.
  14. I think you mean for(int $i=0; and not for($int i=0;
  15. I know you posted this in the MySQL forum, but if you are using a language like PHP, there should be no reason why you can't use another DB if your connect fails for one.
  16. You forgot a closing quote here function rank() { $query="select * from ladder; <---------
  17. From what I've read, Godaddy doesn't even support their packages. I'd find a new host. There are plenty of good php/mysql hosts for under $10/mo.
  18. So you have two columns in one table. You want to place your Car entry in the first available NULL car column and also place a Bike entry in the first available NULL bike column?
  19. Tick marks shouldn't make any difference in this case.
  20. I have my profile set to send me a email when I get a PM, yet no mail is received. I checked my spam box also and no email appears to be there as well.
  21. You need to have a formula first.
  22. Why would float be so wrong?
  23. revraz

    Functions

    If you put it in a functions.php page and Include it, sure.
  24. There is no reason to return the original password and there is also no way to. Everytime you want to verify a pw, you encrypt it first then compare, then if it matches it succeeds.
  25. This is assuming you are running this script from the webroot. You can try a absolute path instead: <?php $b="ebwmp-16-hh.jpg"; $a='<img src="http://www.blah.com/aoauth/images/'; $a .= $b; $a .= '>"'; echo $a; ?>
×
×
  • 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.