Hi, I have a logout script that works just fine but I don't think its actually killing the session(?). so i have index.php, login.php, home.php, session.php, and logout.php. When i logout from home.php I am redirected to index.php, which is great. But when i manually enter the home.php url i can still get into the home.php with the previous session which shouldn't be allowed. It may be how the session is handled? Im not sure. login.php <?php session_start(); include_once 'database.php'; //connection to server if(isset($_POST['submit'])){ try{ $id = $_POST['id']; $pass = $_POST['password']; $stmt = $conn->prepare("SELECT * FROM table WHERE id = …

Member Avatar
Member Avatar
+0 forum 3

Making sites is nice and fun but what if you don't want everybody too see something like an admin panel or maybe a special button. Well this tutorial helps you understand how to add a password to a php site in a simple manner. There are two techniques you can use. One is to use a database which allows you to have a group of users who may access the site. Another technique is to have pre defined variables that check if the values match the value of the variable. In this tutorial you will get to know the basics …

Member Avatar
Member Avatar
+5 forum 6

Hello friends, I am having a confusion in my script please explain me what is it doing i don't know what it is i don't understand sessions very well, so please explain it if (isset($_SESSION['SBUser'])) { $user_id =*** $_SESSION['SBUser']***; $query = $db->query("SELECT * FROM users WHERE id = '$user_id'"); $user_data = mysqli_fetch_assoc($query); $fn = explode(' ', $user_data['full_name']); $user_data['first'] = $fn['0']; $user_data['last'] = $fn['1']; } `$_SESSION['SBUser'];` please explain me what does it mean.

Member Avatar
Member Avatar
+0 forum 2

platform: IIS + Apache + mysql + php (please dont justdge me on the platform it was not my choice) I have this weird bug that seems to be directly related to my sessions on my web based app. when i travel between links, if i give the previous page enough time to fully load i am fine, but when traveling from page to page if i click another page link before the previous one has finished loading then i suddenly get kicked back tot eh login screen. I dont understand why this is happening and i cant seem to …

Member Avatar
Member Avatar
+0 forum 10

in all pages will code with "session_start ();" but does not display all the information, as "First name, Last name" But if the user is connected, and when browsing pages, only shows the nick, and the other names disappear on the first page to connect, if it shows all the user information but when clicking to another page disappears please help, how to solve or correct the problem. "$cedula" is the nickname, "$clave" is the password Here, the full code Funtions.php <? function loginuser() { $cedula = $_POST['cedula']; $clave = $_POST['clave']; $nombres = $_POST['nombres']; $nombres = $_GET['nombres']; if ($cedula && …

Member Avatar
Member Avatar
+0 forum 4

Ok , i just have doubt and need suggestions for this.I have multistep form.What i am doing now that i am saving step-1 and step-2 data in session and in the last when user clicks on register all data saved in sessions will passed to database and inserted there.Now i want to ask is this wrong.When i user is registered tmp files are generated in tmp folder containing user data yeah this is not good thing to do causes security issues.So is there any way i can delete these data after user is registered or any other path which does …

Member Avatar
Member Avatar
+0 forum 1

Hi, i am using setExpirationSeconds() to set the timeout for user. but how to update the timeout timestamp in data base when user session expires automatically due to user inactivity. Regards, Nabin

Member Avatar
Member Avatar
+0 forum 2

I have images generated by while loop php based on how many course user have when user press on one of those images it will send him to that course page but all images send to one course page this my php code in** home page ** <?php $con=mysqli_connect("localhost","FYP","123","FYP"); $sql= mysqli_query($con, "SELECT C_Code FROM F_COURSES WHERE F_ID=".$_SESSION['userid']); while($row = mysqli_fetch_array($sql)){ echo " <a href='course.php'><div class='cc' id='tres'><img class='icon' src='bookicon1.png'><p class='pra'>".$row['C_Code']."</p></div></a>&nbsp;"; $C_Code = $row['C_Code']; $_SESSION['course'] = $C_Code;} ?> and this code for **course page ** this is <?php echo $_SESSION['course']; ?> course. I hope my question make sense and I appreciate your …

Member Avatar
Member Avatar
+0 forum 3

Hi Hope,everyone is doing good out there. I need some help regarding which strategy to use for one of my projects. Here are the project details I want to generate PDF forms, by gathering data from user.There are different questions to ask and based on each answer,we will ask next question.i.e Where do you live? If s/he reply USA, next question will be regarding USA,if s/he reply Outside USA,next question will be different. I'll use FPDF to generate PDF on the go. But my question is how to implement questionnaire.Where should we store the values, either in session or Mysql …

Member Avatar
Member Avatar
+0 forum 6

Hi all, i have web application and login form. i would like when i exit (logout) it automatically logs out from all devices (or browsers or PC). Can anyone help me?

Member Avatar
Member Avatar
+0 forum 1

At times, I have need to push all submitted form array values into $_SESSION. To do this, I've written a small function: function addPostToSession() { foreach ($_POST as $key=>$value ){ $_SESSION[$key]=stripslashes(strval($value)); } } This works well, as long as $_POST is one dimensional, but in a form with checkboxes, $_POST may contain arrays as array elements. Example: POST: Array ( [othertype] => Server [issues] => Array ( [0] => crashes [1] => freezes ) ) When I use my addPostToSession() function, $_SESSION['issues'] is given the string 'Array' (checked with var_dump). Example: SESSION: Array ( [othertype] => Server [issues] => Array …

Member Avatar
Member Avatar
+0 forum 4

Can I create user log in application without starting a new session(without using session_start()). I've created a application where user can log in but session is not created.But everything is working correctly.My application is working under one url.URL is not changing when user navigates.Everyting is happaning behind the scene usign AJAX. 1)If I move with my way will there be problems in future ?. 2)Is it a bad practice ?. Thanks.

Member Avatar
Member Avatar
+0 forum 3

Dea Friends, it is superb serveice you are doing....lets please talk about SESSION in PHP.My code is below. <!DOCTYPE html> <?php session_start(); ?> <html> <head> <title>Login page</title> </head> <h1 style="width: 20%" >Login Page</h1> <fieldset style="width: 30%"> <legend style="background: #59CC57" >Login</legend> <body style="background: #B6ECEB"> <form method="post" > Username:<input type="text" name="username" placeholder="username" /> <br></br> Password:<input type="password" name="password" placeholder="********" /><br></br> <input type="submit" name="login" value="login" /> <br></br> </form> <?php include"conn.php"; $errormsg=""; if(isset($_POST['login'])){ //$uname= $_POST['username']; //$pword= $_POST['password']; $uname = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS); $pword = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_SPECIAL_CHARS); $sql = $conn->prepare("SELECT * FROM login1 WHERE L1 = ? AND L2 = ?"); $sql->bind_param('ss', $uname, $pword); $sql->execute(); …

Member Avatar
Member Avatar
+0 forum 4

i've two files one is send-data.php which contains html form and another one is receive-data.php, i am converting the form value as session value into second file and printing using echo. but it's not printing the output. //send-data.php <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form action="receive-data.php" method="post"> <input name="cardno" type="text" size="30" /> <input name="Send" type="submit" value="submit" /> </form> </body> </html> //receive-data.php <?php session_start(); $_SESSION=['cardno']=$_POST['cardno']; echo "Pageviews=". $_SESSION['cardno']; ?>

Member Avatar
Member Avatar
+0 forum 2

Hi, am not a experianced coder, would like to seek for help. i would like to create a session logout. a pop out appear which able to count 60 sec " Warning your eMyHome session will expire in 60 seconds. Do you wish to continue?" with button continue & logout. i would like below to be coded in my script. 1. if click on continue it should appear after the 60 sec if session idle 2. if click on logout go back to main page 3. if nothing/no response then sys automatically show the main page after the session expired. …

Member Avatar
Member Avatar
+0 forum 2

Hello guys,how are you? well im in a bit of trouble,so i want some help. I´m developing a site in VB.NET that in the beginning the user must login to access other pages.This part is ok,the user logins successfully and goes to members area.In this area,i would like to show in the header,the sentence 'welcome'+username during all the pages that he enters,like for example 'about page' or 'privacy policy page'i would like that if he´s logged in,his username appearing in the header. I´m not using masterpage.I was using request.querystring to get the value of an early session to the next …

Member Avatar
Member Avatar
+0 forum 7

Hi All, I have developed php login system. If user successfully logged in system will create a session call, `$_SESSION['username'];` Now I want to redirect user, if not logged in when try to view specific page. Please help me to write a code. I already wrote a code, but it is not working. if(empty($_SESSION['username'])){ header ("Location : login.php"); }

Member Avatar
Member Avatar
+0 forum 5

hi, i have index.php and home.php. in order to go to home.php users have to login in index.php. but how do i not allow users to be directed to home.php when they type home.php address in the address bar? *am i making sense?*

Member Avatar
Member Avatar
+0 forum 4

<?php include 'ProcessDAO.php'; $dest=""; if(isset($_POST['login'])){ session_start(); // i get an error in this line !! $_SESSION['status']='online'; $_SESSION['breadcrumb']='home'; $pro = new ProcessDAO(); $dest = $pro->LogIn($_POST['username'],$_POST['password']); }else{ session_start(); $dest ="Location: ../index.php"; session_destroy(); } header($dest); ?> guyss can you help me out because in my Login.PHP file when i login i always get this error . >** Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\IPMS\process\ProcessDAO.php:1) in C:\xampp\htdocs\IPMS\process\login.php on line 5**

Member Avatar
Member Avatar
+0 forum 6

Please help with this...say we have few subdomains domains on same server. blog.robots.com chat.robots.com forum.robots.com forum.robot.com generates the session id of a user. I want to share this session id with other domains....blog,chat... All for the purpose of not letting the user login twice on this domain How can I go about this...thank you.

Member Avatar
Member Avatar
+0 forum 1

Hello world, I'm developing two applications: 1. Chat room 2. Forum The two are under the same domain : **chat_room**.ask.com and **forum**.ask.com What I wanna do is this, I want users who login to the forum to at the same time use the chat room without login in again...just like the google services. Thank You.

Member Avatar
Member Avatar
+0 forum 1

i have a repeater in one page to which me load the data from database now i want to click a button and i get the value of a repeater specific row data and kept data in session and access that data an another page.plz help me any one have any idea or any simple code. i will be very thank full for yours this kindness. YOur sinser Regard Mian sahib Jan . me have the following code.now i to access these value from a repeater and keep it in session. ///// <asp:Repeater ID="Repeater1" runat="server" > `` <table border="1" width="100%"> …

Member Avatar
+0 forum 0

Hello, I have an application which shows users which are currently logged into the system. The web application is running on a server and everytime a client on another computer logs in, he/she appears on the active users list. Below is some of the code: loggedusers.php ...... <table cellpadding="3"> <tr bgcolor="#CCCCCC"> <td><b>User</b></td> <td><b>Date In</b></td> <td><b>Time In</b></td> </tr> <?php while( $row = mysql_fetch_array( $result ) ) { if($row['userID'] == $_SESSION['loggedUserID']){ ?> <tr bgcolor="#CCCCFF"> <td><?php echo $row['user']; ?></td> <td><?php echo $row['dateIn']; ?></td> <td><?php echo $row['timeIn']; ?></td> </tr> <?php } else { ?> <tr bgcolor="#CCCCFF"> <td><?php echo $row['user']; ?></td> <td><?php echo $row['dateIn']; ?></td> …

Member Avatar
Member Avatar
+0 forum 8

I am new in web and PHP want to learn about session... how they are made on login... and how they are carried to next page... i know to make database and queries..

Member Avatar
Member Avatar
+0 forum 2

Hi all, I had two website in different servers. Both website had same headers. so if login one server website and going to another website i want same session in this website. how to pass the session values to this server. And also if logout server means both servers sessions need to distory. Give me the best options. Thanks bala

Member Avatar
Member Avatar
+0 forum 2

Hi everyone, I'm a newbie in VB.net I would like to ask if there is a code or equivalent code or script like $_SESSION variable of PHP in VB.Net Thanks;

Member Avatar
Member Avatar
+0 forum 1

Hi Friends Please help me about a session problem, i am unable to find the reson of this issue. I am Developing a matrimonial site for a client : bit.ly/19mFQ8x Problem : users are automatically logout when they click on any page after login, but it is not happning in my windows 7 Laptop and my other 5 windows 7 PC, It is happening on my client windows XP PC and in my one windows xp PC, i never face this type of issue, i have used same login code in my another projects and it is runing ok, i …

Member Avatar
Member Avatar
+0 forum 5

Is it possible/compatible to use Session Types in Java for a cloud-based application using Windows Azure (SDK for Java)?

Member Avatar
+0 forum 0

here if user logged information is correct it should show the main page. in that mainpage right top corner i need to show the username, employee id, employee name. here i can get username correctly. but, i did not get employee id and employee name. for example : Name - Indian, Username - Indian1990, Emp id - EMP_6504 these all values already stored in database using registration form. now they logged in using Username - Indian1990 and Password - 123456. and then mainpage will open. In that page i need to show **EMPLOYEED ID** and **NAME** of the Username - …

Member Avatar
Member Avatar
+0 forum 1

this is my login page coding. my login form html coding and php coding is in same page. now if login successful it will redirect to mainpage.php and then if login failure it will show the error message on same page (login.php). how to do that? i tried something but its not working... how to use php session here? <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { $uname = $_POST['username']; $pwd = $_POST['password']; $uname = htmlspecialchars($uname); $pwd = htmlspecialchars($pwd); $user = "root"; $pass = ""; $database = "data"; $link = mysql_connect( "localhost", $user, $pass ); if(!$link) { die ( "Could not connect to …

Member Avatar
Member Avatar
+0 forum 3

The End.