105 Solved Topics
Remove Filter | |
Hello This is a simple php login script with sessions. It connects to mySQL for usernames and passwords. I’m using a variation of the code from [url]http://www.phpportalen.net/wiki/index.php?page=Enkel+Inloggning+med+Mysql+och+sessioner+-+Komplett+kod[/url] (index.php is the relevant part) Here is my code (my script is called login.php): [code=php] <?php session_start(); // Always at the top include … | |
I have created a table in a mySQL DB where users are going to a form and entering ratings on 6 Categories (5 Specific and 1 Overall) for a particular item_id. On the item table, I have a column that calculates the total number of ratings this particular item_id has … | |
I have a long/register system working . Each user see their own profile details when they login. Now I want to users to see other users profile by clicking on a link to their profile. How do I do this? I need advice | |
<?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 … | |
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 … | |
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= … | |
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 … | |
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 … | |
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" … | |
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 … | |
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 … | |
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?* | |
I have the following code in my php files, but i am having a following error while loading my page? "Notice: Undefined variable: username in C:\xampp\htdocs\fyp\cms\cms.php on line 48" My page is successfully loading up, but username is not being shown in the page and the error is popped up … | |
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 … | |
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.. | |
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 - … | |
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 … | |
Hi, i am new in asp.net and i found it quiet difficult... i was programming in classic asp and sql server, but asp.net looks quiet different, specially if i do program in C# .... Than i hase a couple of questions : 1) if i do a form with 2 … | |
Evening Sirs! Well I have a quiet emberrassing problem caused by i don't know what, but I would like to get rid of this issue. I have a login with session open every .php document. But when I try to open the following file, it stops my session. This is … | |
Please can anyone explain clearly.... what is the difference between session and httpcontext.current.session and application variables? Thankyou in advance... | |
When i implement the following code in my Global.asax.cs in the session timeout procedure, It prompts me an error... HttpContext.Current.Response.Redirect("login.aspx"); What will be the problem? Note: I want to forward the user to login page when the session is timeout.So i used this. Correct me if i am wrong in … | |
I have an issue with `$_SESSION` global across a single domian, on my local machine, running PHP 5.1 build 2600 I'm creating a session in the domain root. $first_name='martin'; $second_name='thorburn'; $login_array=array("first_namet"=>$first, "second_name"=>$second); $_SESSION['login']=$login_array; When I run `print_r($_SESSION['login']);` in the root, I get the expected response "Array ( [first_name] => martin … | |
I want to create a login system with "**remember me**" option, but am afraid to use cookies because I don't know how to handle the security for it, so I prefer to use session instead, but all session will be destroyed after 30 minutes or when user close the browser, … | |
| File structure: /index.php /source/header.php /manager/login.php /manager/scripts/auth.php login.php: <?php require ("../source/header.php"); ?> <?php if ($_SESSION['check'] == 2) { unset($_SESSION['check']); echo "<p>Incorrect! Please try again.</p>"; } ?> <form action="scripts/auth.php" method="post" name="login-form"> <label>Table ID</label> <br /> <input type="text" size="20" id="ID" name="ID"> <br /><br /> <label>Password</label> <br /> <input type="password" size="20" id="pass" name="pass"> <br … |
Hi! I am testing the "session" object and I don't know why it is losing data when I change the web page. I created a simple software to show the problem: See the code: Page index.jsp: ============== <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Login</title> </head> … | |
I've got an upload script that generates some stuff in relation to uploads eg File foo.jpg uploaded succesfully<br /> File bar.tiff failed to upload! ... This is all part of a variable called `$message`. How could I pass this to another php script? Thanks for any help | |
Hi Guys I'm trying to create a page which uses session data to find a user in a database and then sends the events that this user has signed up to. I'm a bit of a newbie and have got very confused with where I am at. I am using … | |
hello there thanks for help mke in many questions, I've learened a lot from this great community I have question about creating visitor counter,daily,monthly,yearly I've created a counter depending on IP address but all my costomer are in the same IP so this counter will not be accurate, So I … | |
Hello guys today when i checked my script I noticed my sessions are not protected, when user log in his **username** stored in session variable lets call it $_SESSION['user'], and I use this session variable in many function ex. when uploading a file the name of user taken from session … | |
Hi, In my website i have implemented custom session values. In which, on log on i set the session value to some object. This object is used to extract user specific data from db. now the problem is If user logs in with : test1.somesite.com and logs off and again … |
The End.