273 Topics
| |
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 = … | |
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 … | |
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> … | |
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 … | |
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] … | |
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 … | |
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 … | |
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 … | |
| 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 … |
| 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 … |
| 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 … |
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 … | |
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, … | |
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 … | |
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 … | |
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 ? | |
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 … | |
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 … | |
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? | |
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 … | |
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? … | |
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 … | |
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="<? … | |
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'] … | |
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) { … | |
I have a button which starts processing. I want that when ever a button is click from page1.aspx .. a count down timer should start and displayed on page2.aspx. I am thinking of using iframe to join 2 pages. Please let me know your suggestions. Thanks | |
I want to run a function just for specific time (say 10 min). After specific time it will return successful if it is able to execute the function successfully or unsuccessful. The function does a large amount of data processing and updating the tables. I want to stop executing that … | |
Hi everyone, I have an issue with IE7 not responding as it should after a log-in to a website I built for a client. This same problem also affects the add to basket or add to wish-list functionality, the checkout process, and all other Ajax requests. Here is a breakdown … | |
Hello, I have a PHP Login Form and it works fine, but users with Fiddler2 (Web Debugging Proxy) have the ability to hide their PHPSESSID Completely. What is a good system that I can use to prevent this, as anonymous users can cause trouble on the website. | |
These are my 2 pages index.php:- [CODE]<?php session_start(); ?> <html> <head> <title>Enter Your Name</title> </head> <body> <form action="hello.php" method="post"> Wat's U'r name : <input type="text" name="name"/> <br/> <input type="submit" value="Next"/> </form> </body> </html>[/CODE] hello.php:- [CODE]<?php session_start() ?> <html> <head> <title>Hey <?php echo $name; ?></title> </head> <body> <?php $_SESSION['name'] = $_POST['name']; … |
The End.