279 Topics

Member Avatar for
Member Avatar for joban.ali

I want to use sessions to identify if a user is signed in. If user is signed in they should be directed to their own profile. If the user is not signed in then the user should be taken to the login page. on my header I have options when …

Member Avatar for joban.ali
0
117
Member Avatar for maxbalboa

Hi Everyone, I got a strange problem with session. Session variables that I define in a page with "www" prefix in the domain name for example http://www.foo.com/page1.php for some reason can't be recognized in page2.php if I remove the "www". But if I use "www" like http://www.foo.com/page2.php, it works just …

Member Avatar for mayureshgoyal
0
558
Member Avatar for lit108

I have created a login system with some validation which all works fine, however I want to be able to create a session when the user logs in and then store this session information in a table that I have allready created. The table has the following values id ip_address …

Member Avatar for ice_k99
0
199
Member Avatar for purell

HI, I would like to load a aspx page based on a session parameter. I have a "login name" in the session parameter and i want to show this aspx page if the "login name" session parameter matches a particular "login name" How can i do this? Thanks in advance.

Member Avatar for kvprajapati
1
268
Member Avatar for tcollins412

i am trying to register 2 sessions. one is supposed to get the id of the user logging in, the other is supposed to get the persons username. here is the login page: [CODE]<?php session_start(); include "dbconnect.php"; $myusername=$_POST['user']; $mypassword=$_POST['pass']; $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = …

Member Avatar for kohyar bolvary
0
135
Member Avatar for billmudry

Lately I have been learning how to use 'sessions' (with some degree of success) for transferring parameters between pages. I have come across a new error report that is so weird that I would not be able to envision how I could do a Google search to find what is …

Member Avatar for billmudry
0
151
Member Avatar for zlloyd1

I have a project I am near completing except I cannot properly test it because the array uses sessions and is full of useless data now. I have an HTML entry form that feeds data to this PHP script: [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <title>Directory</title> …

Member Avatar for zlloyd1
0
155
Member Avatar for mbhanley

Can anyone tell me if I am going in the wright direction with this, or if there is a better way, I am trying to create a session check so that if logged in clients change the url id number example.com?id=192 it won't show other clients contents. Its the first …

Member Avatar for paulrajj
0
176
Member Avatar for ivanwafoo

Hi Guys, I am having trouble with my links, i am currently trying to use my $_SESSION['SESS_MEMBER_ID']; to automatically link it directly to the specific user page. However I always have this error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\ThesisDB\DisplayThisUser.php on line 21 [CODE] …

Member Avatar for sudeepjd
0
311
Member Avatar for rajesh1158

Here is my problem. I have a site into which users can login. It has a logout button to let the user log out. My problem is when they close the browser without logging out, how can I close the logged in entry in the database?? I need a way …

Member Avatar for diafol
1
1K
Member Avatar for imti321

see this code [CODE]<?php $username = $_POST['username']; $password = $_POST['password']; if (isset($username,$password)) { $connect = mysql_connect ("localhost","root",""); mysql_select_db("phplogin"); $query = mysql_query("SELECT * FROM `users` WHERE username ='$username' and password='$password'"); $numrows=mysql_num_rows($query); if ($numrows!=0) { while($row = mysql_fetch_assoc($query)) { $dbusername = $row ['username']; $dbpassword = $row ['password']; } if ($dbusername=='username'&&$dbpassword=='password') { echo …

Member Avatar for Zagga
0
151
Member Avatar for learning_php

Hi While learning how to create and manage a session, I got through session time out technique, I got throw 2 ways : 1. Setting up garpage collection directive in php.ini file and 2. Create a session variable named, say, EXPIRE that holds the value [code]$_SESSION['EXPIRES']=time()+360;[/code] at the beginning of …

Member Avatar for learning_php
0
189
Member Avatar for diafol

Hi all, I've been developing a GoogleCal app for a month or so in my spare time. I've ended up with a shed full of session variables, just so I can keep all the data alive and create an import file for GoogleCal at the end of the process. I …

Member Avatar for diafol
0
719
Member Avatar for Sinha's

Hello Frnds, I have an application developed in ASP.Net(C#) and MS SQL, its working fine and fulfilling the requirements. Now the problem is I have a [I]MS Access Database[/I] from where I have to read some data and feed it into ASP.Net form and then save it to [I]MS SQL …

Member Avatar for crishjeny
0
351
Member Avatar for feoperro

Hi, I'm having a problem where I set a session after checking login details, and then change the section respectively via ajax. The problem that I've noticed is that the session is only set once the page is refreshed - I was wondering if it would be possible to set …

Member Avatar for diafol
0
192
Member Avatar for feoperro

Hi, I am new to PHP and I would just like to know: Is there a purpose for cookies if you handle sessions with the database? I've been reading about cookies and trying to understand how they would be beneficial if I had sessions handled by the database, and I …

Member Avatar for somedude3488
0
131
Member Avatar for Borzoi

What is the proper way to use sessions? I have a forum on my site which I've coded from scratch but I've not been using sessions for the users and instead I've been using just cookies to determine if they're logged in or not. I know my current way isn't …

Member Avatar for P0lT10n
0
114
Member Avatar for ninja_girl

I have searched the forum and Google but there was nothing that would give me a clue what's wrong with my code. I'm just starting PHP and I'm trying a few things. :) I have a page with login. Logging in works wonderfully, storing sessions with username does too. However, …

Member Avatar for ninja_girl
0
297
Member Avatar for Clawsy

Hello, I use Ruby with Sinatra in my application and I need to store a big data (exceeding 4K) in my session or somewhere secude on the server because I do some API calls and I refer to that data very often and that's why I need it stored. The …

Member Avatar for Clawsy
0
412
Member Avatar for rajesh1158

I have a website whose homepage has 4 frames. 1 at top(horizontal) and 3 vertical below it. The middle vertical frame displays all the contents of pages when links in other frames are clicked. I have a link in top frame to logout the user when clicked. In this link's …

Member Avatar for rajesh1158
0
206
Member Avatar for stolikp

Where should I keep connection object to database like ISession or SQLConnection? What's the best solution and why ? Is it Application, Session or Items ?

Member Avatar for glennt
0
118
Member Avatar for SunnySideUp

Hi, I am using Tiny MCE as a Textbox to get user generated input which can be bold, italic, underlined, lists and different alignments. When the user submits the form data the information is then saved to a variable like below: [CODE] $jobDesc = mysqli_real_escape_string ($dbc, $trimmed['txtJobProfile']); [/CODE] The I …

Member Avatar for SunnySideUp
0
200
Member Avatar for Sorcher

Greetings, I got no clue how to make / set a session. When i login on my page and then press a link i get out-logged, I've tried to read on PHP.net but i cant get it together. Anyone got an explaination or code i could go from to keep …

Member Avatar for Sorcher
0
115
Member Avatar for freddyvorhees

Hello! I want to continue a session even after the browser was closed. What I want to do is to remember the host, username, password, of mysql. Whats the trick?

Member Avatar for maba001
0
153
Member Avatar for digital-ether

The above classes provide an interface for reading the PHP session data. PHP alone only gives you access to the current users session. This class allows you to read all session files, and thus allow you to read session data across different users. This may be useful if you want …

Member Avatar for digital-ether
2
1K
Member Avatar for dschuett

Hi, I have made a log in script that checks the database for username and password. I have everything working for the users (they must be logged in to access member.php). Now I have admin.php redirecting to a different page, but how do i keep users OUT of that page? …

Member Avatar for richieking
0
7K
Member Avatar for mayuri_desh

i have a login page, where i check login name and password if it matches i create a session.and redrect it to other page, now the problem is in localhost(WAMP Server)it works fine but in server when i host it it does not redirect it shows an error like this …

Member Avatar for mayuri_desh
0
102
Member Avatar for digiplaystudios

Hi There, For some reason the following is not working - Inside the text field it displays nothing: [CODE]<?php include 'dbc.php'; page_protect(); $rs_settings = mysql_query("select * from users where id='$_SESSION[id]'"); $row_settings = mysql_fetch_array($rs_settings); ?> <html> <head> </head> <body> <form action="index.php" method="post" name="regForm" id="regForm" > <input name="first_name" type="text" class="updateusersmall" id="first_name" value="<? …

Member Avatar for P0lT10n
0
153
Member Avatar for KPheasey

I am having a weird problem setting a session variable. I use a session array ($_SESSION['message']) to display messages. $_SESSION['message']['type'] = error/success; $_SESSION['message']['message'] = $message; Here is the function for displaying the message: [code=php] function displayMessage(){ if(isset($_SESSION['message'])){ echo" <div class=\"notification " . $_SESSION['message']['type'] . " png_bg\"> <div> " . $_SESSION['message']['message'] …

Member Avatar for KPheasey
0
278
Member Avatar for finnj6

Hi I'm trying to develop a site that users can log into. It's all standard enough the details are being kept on a mysql database. I can add the details to the db but my code for logging in isn't working. here is my login script [CODE]function user_login($username, $password) { …

Member Avatar for hielo
0
144

The End.