Jump to content

jairathnem

Members
  • Posts

    93
  • Joined

  • Last visited

Everything posted by jairathnem

  1. try this $serverName = "serverName\sqlexpress"; $connectionInfo = array("Database"=>"dbName","UID"=>"userName","PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo); check this too : http://www.techrepublic.com/article/access-microsoft-sql-server-2000-using-php/
  2. what is the purpouse of echo json_encode($status)? It is predefined and will output the same array regardless of whether the mail is sent or not. I'd suggest you remove that. Are you trying this from a local server? if so, local servers need to be configured to use SMTP to send mails.
  3. Now-a-days encrypting with MD5,SHA1 isnt secure. Use predefined library like phpass. check this : http://stackoverflow.com/questions/1581610/how-can-i-store-my-users-passwords-safely/1581919#1581919
  4. record the time the user logged in and the time the user logged out. get the difference amount in seconds - use strtotime() on both the variables and get the difference. add the resultant value to the DB.
  5. use isset() to check if the variables are set. most likely reason is the variables are not set at all, hence you get Undefined index: error
  6. I am not able to get your question. you need to auto-increment for each registered member? if so then declare a primary key and set it to auto-increment in the DB itself. when you insert you dont have to send the primary key valuse the DB will increment it for you. if this is not question - please explain it breifly.
  7. Not possible with PHP and not ethical!
  8. Implement that at the database and set default to NULL. alter code : ALTER TABLE tests ALTER test3 SET DEFAULT NULL if no value is sent for test3 it will add NULL, else it adds the passed value.
  9. .polaroid { position: relative; background: #fff; width: 200px; padding: 7px; margin: 10px; text-align: center; -moz-box-shadow: 1px 1px 3px #222; -moz-transform: rotate(-5deg); -webkit-box-shadow: 1px 1px 3px #222; -webkit-transform: rotate(-5deg); box-shadow: 1px 1px 3px #222; -o-transform: rotate(-5deg); transform: rotate(-5deg); } Add the polaroid class to css and use div class with polaroid for the image tag. Again this was taken fro google tested and it works.
  10. Check if it is throwing an error in that insert. $result=mysql_query($insert); if(!$result){ echo mysql_error(); } This will check if the insert executed correctly or not.
  11. .rotate90 { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -ms-transform: rotate(-90deg); transform: rotate(-90deg); } tried this?
  12. <img id="image_canv" src="/image.png" class="rotate90"> .rotate90 { -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } Taken from Google.
  13. My knowledge of PHP isn't that great. Could you please explain the method to send it securely.
  14. $_GET[] sends the data directly in the URL, which means it is accessible by anyone viewing the page. The URL will look like index.php?id=123 . So if you send passwords it will be directly visible in the URL, which isn't safe. Also this page can be bookmarked and viewed again later. $_POST[] does not show the sent data. hence it is used to send passwords and secure info. Although if a sniffer is used it too can be read.
  15. Hello, My scenario is I need to have a unique value in a column based on value from another column. for ex : I have item_ID and product column For every item_ID there should only be unique values in the product column. item_ID Product 1 1 1 2 1 4 2 1 but if I insert 1 in item_ID and 1 in product now, it should throw an error. I have no idea how to implement this. Any help appreciated.
  16. I dont understand your logic in check_login.php $count = mysql_num_rows($result); $count = 1; if($count == 1) you get the count of rows returned from DB and store in $count, you re-assign $count to 1 and check if $count=1?
×
×
  • 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.