279 Topics

Member Avatar for
Member Avatar for rayidi

Dear Friends, I'm Currently using php session ( $_SESSION[''] ), I want to use $_COOKIE Because when a user didn't click the logout button and he closed the website. still he is showing Online because i write the code at the logout page. So If we use $_COOKIE it is …

Member Avatar for diafol
0
188
Member Avatar for cacofonix

Hi all, I want to alert the user that his session time is expired . There are two options after session expired 1, redirect user to login page 2, ask user to extend their session time Guys , i never implement this feature in any of my project , can …

Member Avatar for broj1
0
127
Member Avatar for waveydaveywaves

I have literally been banging my head on my keyboard out of frustration. I'm trying to display PHP sessions as values in my php form, but it's not going so well. here's what I have: [CODE]<?php session_start();?><html> <head> <title>Create An Event</title> <style> label {float: left; width: 100px;} input[type=text],textarea {width: 210px;} …

Member Avatar for diafol
0
224
Member Avatar for 140fulton

I'm seeing a problem where some $_SESSION variables are passed from one page to another, and others are not. The session is setup on login, with user identity held in $_SESSION["id"]. At a later date, I want to shift the identity to another, subordinate account. The change is handled by …

Member Avatar for diafol
0
314
Member Avatar for usboy2903

Hi, well im working on a project for school but I can't seem to get it to work. Its an app that is connected to a DB with 3 tables, this is my sql syntax of the db: [CODE] Table structure for table `income` CREATE TABLE `income` ( `idincome` int(11) …

Member Avatar for niranga
0
219
Member Avatar for reco21

Hello. I'm wondering if someone could help me. I have a simple like/dislike voting voting system. Everything works fine but a user is able to click both up and down freely without checking if they have voted. So what I'm going for is 'Php sessions' because I dont want to …

Member Avatar for reco21
0
602
Member Avatar for Metophase

Hey looking over sessions was confusing the hell out of me but I found my solution again on this forum... now I have a session that as a time out and 'logs out' the user after 10 mins so next time they try do something it takes them to the …

Member Avatar for veedeoo
0
201
Member Avatar for nikita.

I have finally written this code, but the prob with this is that when it is prompting for password it doesnt send any password to the ftp machine, we have to do it manually, but after typing it manually, it take the password line as command and shows that that …

Member Avatar for nikita.
0
206
Member Avatar for nikita.

Hi I have written the below code for ftp transfer. can u please help me how to trap whether it is successful or not. [code]ftp -n `awk '$1 ~ /db_server_IP/ { print $3 }' $CONFIG_FILE` <<END quote USER `awk '$1 ~ /db_user/ { print $3 }' $CONFIG_FILE` quote PASS `awk …

0
147
Member Avatar for virtuali

Hi All, I am trying to create a form using sessions so that the submit button is only submitted once in a two minute duration. I need the form to still complete the onclick action so that a calculation happens, but I only want the mail() function to send an …

Member Avatar for Stefano Mtangoo
0
298
Member Avatar for aaloo

plz somebody help with this code . i m fed up now [CODE]<?php $x=5; echo $x; session_start(); $_SESSION['y']=$x; $string = '<?php session_start(); $x=$_SESSION['y']; echo $x;?> '; $fp = fopen("6.php", "w"); fwrite($fp, $string); fclose($fp); ?>[/CODE]

Member Avatar for aaloo
0
261
Member Avatar for phfilly

Hi guys! I got a problem with my logging in system. I can connect to my database with the code: [CODE]session_start(); include('header.html'); $page_title = 'Home Page'; $mail = $_POST['email']; $password = $_POST['password']; $msg =''; if(isset($mail,$password)){ $con = mysql_connect('127.0.0.1','root',''); if(!$con) { die('Could not connect: '.mysql_error()); } else{ echo "Connected!"; } } …

Member Avatar for phfilly
0
170
Member Avatar for ajbest

I have a bit of a stumper that I am hoping someone has a fresh idea on. [B]The Problem:[/B] I have a client that owns 3 domains all selling similar products. The domains are all very interlinked together for various SEO purposes. I need to be able to have a …

Member Avatar for ajbest
0
205
Member Avatar for megachip04

Hello, I have a website that is pretty much just css, html and php. I have incorporated a membership and log in system. For some reason in Internet Explorer, when users log in, the page becomes distorted (higher line heights, misplaced images, etc.). But it's only when they're using Internet …

Member Avatar for cereal
0
112
Member Avatar for edn_781

I am very new to PHP.. Please let me know which part will be saved in Client PC and Which part will be saved in Server? [CODE=PHP]$_SESSION['name'] = 'John';[/CODE]

Member Avatar for rotten69
0
257
Member Avatar for edn_781

Suppose I have a PHP SESSION script, which can load in my friend PC but not run into my PC. Code is same and code running a single server machine! What could be possible reasons? HELP me!

Member Avatar for diafol
0
63
Member Avatar for davy_yg

[CODE] <?php session_start(); // makes an array $colors=array('red', 'yellow', 'blue'); // adds it to our session $_SESSION['color']=$colors; $_SESSION['size']='small'; $_SESSION['shape']='round'; $_SESSION['diameter']='10cm'; print "Done"; function fnCheckSession(){ if (Session["LoggedIn"] !=null) echo "Session variable exist."; else echo "Session variable does not exist."; } fnCheckSession(); ?> [/CODE] I have the following error appears: Parse error: …

Member Avatar for cwarn23
0
86
Member Avatar for Hand

Hello, I want to know how to implement an authentication system. I know how to use HttpSession, but how will I ensure that an user cannot create false cookies to access protected area? Is it safe to keep the password as a session attribute?

0
75
Member Avatar for davy_yg

[CODE] <?php session_start(); // makes an array $colors=array('red', 'yellow', 'blue'); // adds it to our session $_SESSION['color']=$colors; $_SESSION['size']='small'; $_SESSION['shape']='round'; $_SESSION['diameter']='10cm'; $_SESSION['LoggedIn']='user'; print "Done"; function fnCheckSession(){ if ($_Session['LoggedIn'] !=null) echo "Session variable exist."; else echo "Session variable does not exist."; } fnCheckSession(); ?> [/CODE] The following errors appears: Done Notice: Undefined …

Member Avatar for ko ko
0
254
Member Avatar for davy_yg

[CODE] session_start(); // undefined index: login if (!isset($_SESSION['login'])){ echo "Anda tidak berhak mengakses halaman ini."; exit(); } //Fungsi baca data dari database [/CODE] Hi, Whenever I press eventmanager, the following error appears: "Anda tidak berhak mengakses halaman ini." What codes should I write so that I could pass the echo? …

Member Avatar for davy_yg
0
245
Member Avatar for SmallCucumber

I am a newbie to php, i occasionally find a problem, I open the page "index.php" on a chrome browser, then I left for lunch, then I come back and click the link in page "index.php", it did head to "login.php", but laterly I find a record in my database. …

Member Avatar for SmallCucumber
0
88
Member Avatar for chiiqui

How to send the session data in one page to another? here's my code because I am going to bill out all of the orders and Name and ID of the current user logged int , the PHP code [CODE]<?php session_start(); include("Connection.php"); if (isset($_POST['submit'])) { $name = $_POST['customerName']; mysql_query("INSERT INTO …

Member Avatar for daryll1
0
3K
Member Avatar for fradiavolo

Why is it saying "Notice: Undefined variable: cnt in C:\Wamp\www\librarie\cos.php on line 24". Here is the code: [CODE]<?php session_start(); include("conectare.php"); include("page_top.php"); include("meniu.php"); if (isset($_GET['actiune']) && ($_GET['actiune'] == "adauga")) { if (!isset($_SESSION['cnt']) || !$_SESSION['cnt']) $_SESSION['cnt'] = '0'; $cnt = $_SESSION['cnt']; $cnt++; $_SESSION['cnt'] = $cnt; $_SESSION['nr_buc'][] = 1; $_SESSION['pret'][] = $_POST['pret']; $_SESSION['titlu'][] …

Member Avatar for fradiavolo
0
191
Member Avatar for Virangya

HI CONSTANTS in my customer site are affecting my admin site. i don't know why. also when i browse for admin site and if index.php file is not available home.php file loads. i find this very weird... can anyone please help me? following is some of the errors it generates. …

Member Avatar for diafol
0
393
Member Avatar for gorleone

Hello guys, last time I learn php and make some scripts that work on my localhost, but not in a hosting which I use. Example: checklogin.php: [code]<?php ob_start(); $host=""; $username=""; $password=""; $db_name=""; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername …

Member Avatar for diafol
0
380
Member Avatar for rakwel10

Im having a problem with my code. When I run it to php4 and it works fine. Then I tried it to php5. Im getting error -[COLOR="Red"]"Undefined Variable: _Session in ..."[/COLOR] [CODE]<?php session_start(); function logged_in() { return isset($_SESSION['idnum']); return isset($_SESSION['user_type']); return isset($_SESSION['fname']); } function confirm_logged_in() { if (!logged_in()) { redirect_to("index.php"); …

Member Avatar for rakwel10
0
142
Member Avatar for karthik_ppts

Hi frendz, Can we set a value for a session variable through javascript onclick event? (or) How can we set a global variable for the whole website using javascript?

Member Avatar for karthik_ppts
0
7K
Member Avatar for paulnamroud

Hello, I would like to know how to: - Save an image into a Session Variables - Get the image from the Session Variable and display it on the web page. Here's the example on how to get the image from the DB: string v_customer_code = "PAUL"; SqlConnection v_connection = …

Member Avatar for lolafuertes
0
247
Member Avatar for rakwel10

How do I do this: on submit of the form, data will be saved in a session array variable. The purpose is to use the submitted data page by page. After that, how do I extract them? thats all.. thanks

Member Avatar for rv1990
0
66
Member Avatar for Farhad.idrees

Hi i want to echo session but it gives error...code is [CODE] session_start(); if(isset($_GET['P_Price'])) { $_SESSION['Price'] = $_SESSION['Price']+ $_GET['P_Price']; $_SESSION['Items']++; " <div class=\"shopping_cart\"> <div class=\"cart_title\">Shopping cart</div> <div class=\"cart_details\">Items echo $_SESSION['Items']; <br /> /// this line has error <span class=\"border_cart\"></span> Total: <span class=\"price\">echo $_SESSION['Price']; </span> ////this line has error also </div> …

Member Avatar for mamdouh ramadan
0
112

The End.