
jairathnem
Members-
Posts
93 -
Joined
-
Last visited
Everything posted by jairathnem
-
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/
-
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.
-
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
- 2 replies
-
- mysql
- encryption
-
(and 1 more)
Tagged with:
-
Need help with auto increasement on a number in database
jairathnem replied to Dezmo's topic in PHP Coding Help
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. -
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
-
Need help with auto increasement on a number in database
jairathnem replied to Dezmo's topic in PHP Coding Help
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. -
Show results of MySQL query only if field has a value
jairathnem replied to twebman84's topic in MySQL Help
Use mysql_num_rows() in if condition to check. -
Not possible with PHP and not ethical!
-
not updating database and prepared statements
jairathnem replied to jacko_162's topic in PHP Coding Help
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. -
.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.
-
not updating database and prepared statements
jairathnem replied to jacko_162's topic in PHP Coding Help
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. -
Thanks Barand. Unique index does the job
-
.rotate90 { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -ms-transform: rotate(-90deg); transform: rotate(-90deg); } tried this?
-
<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.
-
My knowledge of PHP isn't that great. Could you please explain the method to send it securely.
-
$_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.
-
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.
-
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?