login-script

How to accept cookie from iPhone, login page

∥☆過路亽.° 提交于 2019-12-02 04:30:13
I don't know what is wrong with this php script but it makes the remember log-in for the device iPhone stop working (will log out every time when refresh the page) but the other device such as iPad, and all the PCs still can use remember me function still. <?php if(!isset($_GET['link'])){ $link = 1; } else { $link = $_GET['link']; } if ($link == 1) { echo ""; } elseif ($link == 23) { echo ""; } else { echo ""; } ?> so every single time the device refresh it will redirect to the login page again but then if I remove this script then it will remember the login any help will be appreciated Use

Block user after nth login attempt - PHP

安稳与你 提交于 2019-12-01 09:12:06
I am working in login such that unsuccessful login attempts are stored a database. Then, after the 3rd login attempt, login will be disabled for the affected user based on the recorded IP address and/or user account. Unfortunately, my code is not working as expected; the login attempts is not getting stored into the database, and login is still not disabled for the affected user. What am I doing wrong and how can I fix it? Below is my login script: session_start(); //Get IP address // code goes here $loginDate = date("Y-m-d H:i:s"); $Error = ""; $successMessage = ""; if (($_REQUEST['captcha']

Block user after nth login attempt - PHP

懵懂的女人 提交于 2019-12-01 05:58:51
问题 I am working in login such that unsuccessful login attempts are stored a database. Then, after the 3rd login attempt, login will be disabled for the affected user based on the recorded IP address and/or user account. Unfortunately, my code is not working as expected; the login attempts is not getting stored into the database, and login is still not disabled for the affected user. What am I doing wrong and how can I fix it? Below is my login script: session_start(); //Get IP address // code

How to make PHP errors in text instead of HTML [duplicate]

廉价感情. 提交于 2019-11-30 17:09:13
Possible Duplicate: How can I tell PHP to dump exceptions as raw text instead of HTML? I am trying to make a login script using C# and php and I plan on selling it as a 1 click install so I need it to be error proof. I am purposely trying to make mistakes in the setup, but whenever my php script has a mistake it has an HTML block output with the error when I just want a string output(refer to image). Heres the code I am using // We will now set up our MySQL database login. The values should be self-explanatory. $sqlhost = "localhost"; $sqlusername = "unity"; $sqlpassword = "mypass123"; //we

SQL Server Management Studio Logins Dialog missing

旧时模样 提交于 2019-11-29 15:51:39
I am running SQL Server Management Studio v17.6. The online tutorials for creating a new Login show a dialog that comes up when your right-click on Logins and select New Login. I don't see this dialog; instead I get a script to CREATE LOGIN which is OK but I would prefer the dialog. I don't see an option to switch from getting a script to getting the dialog. I don't know if this version does not have the dialog or if I am just not finding the option. Currently this is an Azure SQL limitation. More information can be found here on azure.microsoft.com or here on Microsoft docs. When creating a

How do I protect a page only for logged users?

拜拜、爱过 提交于 2019-11-28 12:07:30
I created a login form that works great. But I realized the page my user is directed to can still be accessed by anybody. How do I protect the page being accessed only viewable by those logged in? Do I need to place a script on the success page itself? Here is my check_login.php: <?php $host="localhost"; // Host name $username="xxx"; // Mysql username $password="xxx"; // Mysql password $db_name="xxx"; // Database name $tbl_name="xxx"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password") or die("cannot connect"); mysql_select_db("$db_name")or

Azure Provisioning - Without manual login

允我心安 提交于 2019-11-28 11:47:55
问题 I have a Powershell script which runs to set up Azure web apps, databases, etc. but before running the script, I have to do the following: PS C:/> Login-AzureRmAccount This pops up a GUI in which I have to manually add in my user, password, and my 2-factor authentication code. I eventually want to use that script as a part of a part of a build/deployment automation script. I gleaned the following from a few articles about using a "service principal". First I do: PS C:\> Add-AzureRmAccount In

SQL Server Management Studio Logins Dialog missing

两盒软妹~` 提交于 2019-11-28 09:24:03
问题 I am running SQL Server Management Studio v17.6. The online tutorials for creating a new Login show a dialog that comes up when your right-click on Logins and select New Login. I don't see this dialog; instead I get a script to CREATE LOGIN which is OK but I would prefer the dialog. I don't see an option to switch from getting a script to getting the dialog. I don't know if this version does not have the dialog or if I am just not finding the option. 回答1: Currently this is an Azure SQL

Designing a secure auto login cookie system in PHP

若如初见. 提交于 2019-11-27 07:53:04
I want to have an auto login option check for a user. Basically that means a cookie will be stored on the client side. Now the question is, how do I make it secure so the cookie will can not be spoofed/modified. One of my friends suggest having a db table that stores the session_id, user's ip, browser info, etc and then compare it all that information once a user goes to the website again. I feel like having a separate table for that is a bit too much trouble. Is there another way to do it? Maybe with tokens or something like that? The more secure you want this infamous cookie, the more

How do I protect a page only for logged users?

时间秒杀一切 提交于 2019-11-27 06:45:31
问题 I created a login form that works great. But I realized the page my user is directed to can still be accessed by anybody. How do I protect the page being accessed only viewable by those logged in? Do I need to place a script on the success page itself? Here is my check_login.php: <?php $host="localhost"; // Host name $username="xxx"; // Mysql username $password="xxx"; // Mysql password $db_name="xxx"; // Database name $tbl_name="xxx"; // Table name // Connect to server and select database.