Jump to content

greatstar00

Members
  • Posts

    154
  • Joined

  • Last visited

    Never

Everything posted by greatstar00

  1. that \n does not work when u open with notepad when i open with dreamweaver, it works then i save again with dreamweaver
  2. the problem lies in the login.php <form action="welcome.php" method="post"> you want them to go to your welcome.php in any case, not want them to go login page you should change it to <form action="log.php" method="post"> also, you changed the redirection of the else statement u changed to login.php, original is log.php in fact, if same page, why u use redirection???? u can just delete that redirection
  3. thx alot people, this really helped
  4. I have a table which holds the integer values(the value representing some data) of many users the table look like this (MySQL) id f1 f2 f3 1 30 50 15 2 31 17 37 3 18 31 54 and more .... i randomly select a user from the another table(let's call it sel_user), and then i select a user who got the numbers closest to the sel_user or same as the sel_user, from the table above here is the method of select closest user, it is based on the sum of 3 columns, f1, f2, f3, (i.e user 2, so the numbers are 31 17 37) if a sel_user got values 12 30 18, then the sum is 60 from the table above, user 2 is closest, because 31+17+37 is 85, others are larger than 85 my solution is (with mysql query) add sum the user's value, put it onto the stack for all users, then compare, abs(sel_user's sum - user_from_table's sum) my question is is there any faster way to do this? the method i used gets slower and slower, because the mysql string i sent is longer and longer based on numbers of users or is there a way to make the mysql string always has same length each time?
×
×
  • 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.