Jump to content

samshel

Members
  • Posts

    837
  • Joined

  • Last visited

Everything posted by samshel

  1. oops..sorry thought sales was the name of the drop down, it is recipient. try $subject = 'Enquiry for: '. $_REQUEST['recipient']. "\r\n";
  2. what is the problem with using regex?
  3. change subject to following. $subject = 'Enquiry for: '. $_REQUEST['sales']. "\r\n";
  4. m not sure...in a query data surrounded in a single quote would be treated as a string... select 'username' from user; will return the string 'username' where as select `username` from user; will return the actual value of the column Bendude14 , please try query which i posted earlier. hope it is clear...
  5. <?php $sql = "SELECT pwd FROM users WHERE LOWER (`username`) = '".strtolower($username)."'"; ?> Field names should not be in single quotes, surroung them with bck ticks..try and let me know
  6. Store the username as it is, just while checking convert it to lowercase "SELECT * from `user` WHERE LOWER(`username`) = '".strtolower($username)."'"
  7. Try $date = addslashes("8/07/"); "SELECT * FROM `data` WHERE uname = %s AND`data`.tdate LIKE '$date%' ORDER BY id DESC"
  8. did the code i gave worked OR was there some other problem? also pl hit the solved button.
  9. I think you should consult your systems administrator. As this problem is not PHP related anymore, could you please mark the topic as solved
  10. you have done md5() on password in PHP while checking where as while entering you have used MySQL md5(), it should match, but just try shifting md5() in your code in query instead of PHP. <?php $uname=trim($_POST['uname']); $uname=strtolower($uname); $pass=$_POST['pass']; if($uname != "" && $pass != ""){ if($_SESSION["logged_in_user"]==$uname && $_SESSION["logged_in_pass"]==$pass){ if($record["status"]=="administrator"){require("iframe_adm.php"); exit; }elseif($record["status"]=="user"){require("iframe_usr.php"); exit; } } require("connection.php"); $db=mysql_connect("$host","$user","$password"); if(!$db){echo "No connection,please contact the system administrator.Sorry";} $strSql = "SELECT * FROM login WHERE uname='".$uname."' AND pass=md5('".$pass."')"; echo $strSql; $result=mysql_query($strSql); if(!$result){echo "error in query";} if(mysql_num_rows($result) > 0){ $_SESSION["logged_in_user"]=$uname; $_SESSION["logged_in_pass"]=$pass; $record=mysql_fetch_assoc($result); if($record["status"]=="administrator"){require("iframe_adm.php"); exit; }elseif($record["status"]=="user"){require("iframe_usr.php"); exit; } } else{require("top.php"); echo "<B style='color:red;font-size:15px'>Wrong username or password</B>"; } if(!$db){echo "No connection,please contact the system administrator.Sorry";} }else{require("top.php"); echo "<B style='color:red;font-size:15px'>You forgot to enter the username or password ?> check if it works.
  11. then...i think its something got to do with your outlook configuration ...
  12. in what format have you stored date in MySQL ? if data type is "date" it will be stored in the format "YYYY-MM-DD"
  13. What is the user does not refresh his page for 2 hours...the code which checks the cookie will be executed after 2 hours.. and your user wont log out till then also if the browser is closed directly the flag is not set to logout...
  14. are the passwords manually added in DB or by some script, in that script, is the password lower cased ?
  15. i think cron is best way to do it, because you want something asyncronous that will reset your flags. Crons are simple PHP script, which run periodically as per settings done..so i think that is safest way. you can get to know more about crons here http://www.unixgeeks.org/security/newbie/unix/cron-1.html also google around for more info. Example would be entry in crontab like 30 * * * * php /path/to/file/resetting/flag.php Your file will run every 30 mins.
  16. store login time... and run a cron to logout all customer whose start up time is greater than specified time ?
  17. if it does not allow to over write, it will also not allow to delete i think..first we need to know what error it shows..
  18. Does it show any error? the only reason i see why it would not over write is insufficient permissions.
  19. Hi jesushax, That code works perfectly on my machine. Is .dat file being attached in your outlook client or are you using any webmail like hotmail, yahoo, if not, try using a webmail so we can pinpoint the issue.
  20. What is the name of the .dat file winmail.dat?
  21. while storing the username and password are you doing strtolower ?
  22. //divide this line in 2 and debug... $strSql = "SELECT * FROM login WHERE uname='".$uname."' AND pass='".$pass."'"; echo $strSql; $result=mysql_query($strSql); fire the displayed query directly on database client and check if rows are returned..
  23. Sorry a stupid(but primary) debug technique, but did you try if hard coded mail function works mail("[email protected]", "Test Mail", "Mail Body...");
  24. Hi Juan, let me try... Generally we have URLs like category.php?id=1 //displays details of category with id = 1 category.php?id=2 //displays details of category with id = 2 and so on... 1) Google does not like URLs with "?". 2) There is no information about the category itself in the URL so google does not get more information.. Using Static URLs we can use following URLs for the same purpose.. category/1/mobiles.html // this will internally redirect to category.php?id=1 category/2/washing_machines.html // this will internally redirect to category.php?id=2 1) There are no "?" so google likes them 2) There is information about category name so google indexes the url higher. hope it is clear... atleast thats my understanding.. i may be wrong.
  25. the problem is the variable or mail not being sent?
×
×
  • 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.