4,124 Topics

Member Avatar for
Member Avatar for issaru07

hi everyone, keep getting this error although it shows the result perfectly..i cant do a $cart= ''; as it will show the incorrect result Notice: Undefined variable: cart in D:\xampp\htdocs\book\includes\functions.inc.php on line 8 [CODE] <?php function writeShoppingCart() { if(isset($_SESSION['cart']) ) { $cart = $_SESSION['cart']; } if (!$cart) { return '<p>You …

Member Avatar for pritaeas
0
117
Member Avatar for issaru07

the output of my page is correct yet it shows Notice: Undefined variable: total in D:\xampp\htdocs\book\includes\functions.inc.php on line 36 is there any ways to resolve this? thanks [CODE] <?php function writeShoppingCart() { $cart = $_SESSION['cart']; if (!$cart) { return '<p>You have no items in your shopping cart</p>'; } else { …

Member Avatar for cereal
0
366
Member Avatar for filipgothic

I want to make option to approve users before they can login or to ban them, here is code [CODE]<HTML><HEAD><TITLE>Fakultet informacionih tehnologija</TITLE> </HEAD> <BODY TEXT="#ffffff" BACKGROUND="fakultet/Assets/bg.jpg" LINK="#FFFF00" VLINK="#CDCD00" BGCOLOR="#000000"> <CENTER><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="700"> <CENTER> <FONT SIZE=+4 FACE="arial,helvetica"> Fakultet informacionih tehnologija <HR> </CENTER> <?php session_start(); // dBase file include "dbConfig.php"; …

Member Avatar for LOVE_outofLIGHT
0
318
Member Avatar for lastgame2007

help, i cant update my image i cant use session because,its admin who is providing the profile of the student, kindly take a look, what went wrong! [CODE] <?php $pic= $_FILES["piksur"]["name"]; if(isset($_POST['submit'])) { mysql_query("update students set idno='$_POST[id]', year='$_POST[year]', lastname='$_POST[lname]', firstname='$_POST[fname]', middlename='$_POST[mname]', birthplace='$_POST[bplace]', birthdate='$_POST[bdate]', religion='$_POST[religion]', studentcontact='$_POST[scontact]', studentaddress='$_POST[saddress]', father='$_POST[father]', fathercontact='$_POST[fatcon]', mother='$_POST[mother]', mothercontact='$_POST[motcon]', …

0
74
Member Avatar for morrisproject

I am trying to get a searched date from one page to appear on another page, i have this code on one page so the user can search for a specific date: [CODE]<?php if(!empty($_POST['searchdate'])) { $mydate = $_POST['searchdate']; } else { $mydate = date('Y-m-d'); } $id = $_POST['id']; if(empty($id) && …

Member Avatar for morrisproject
0
316
Member Avatar for masterjiraya

My PHP Session Log-in and log-out works fine but this is the problem I have a site consists of admin folder and outside the admin folder are the customer page files. both of them has sessions for log-in and log-out purposes but it acts so WEIRD because if I'm running …

Member Avatar for masterjiraya
0
290
Member Avatar for kikiwisaka

Hi... I am creating function searching on my web with drop down list, text box and button search. The following code: [CODE] <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> <asp:ListItem></asp:ListItem> <asp:ListItem Value="Pelanggan Rumah"></asp:ListItem> <asp:ListItem Value="Meter Besar"></asp:ListItem> <asp:ListItem Value="Kios Air"></asp:ListItem> <asp:ListItem Value="Pipa"></asp:ListItem> <asp:ListItem Value="Pembayaran"></asp:ListItem> </asp:DropDownList> <asp:TextBox ID="CariText" runat="server" Width="100px" Height="23px" CssClass="text_boxt_search"></asp:TextBox> <asp:Button ID="Find" …

Member Avatar for geniusvishal
0
325
Member Avatar for uva1102

Hi, I have three roles engineer,supuvisor and manager for my website and I have three master pages engineer.master , supervisor.master and mgr.master and i have some specific aspx pages for engineer,supervisor and manager. I want to use engineer.master page for an aspx page if engineer user is logged in and …

Member Avatar for uva1102
0
163
Member Avatar for Zrakot

All - Sure could use a fresh set of eyes on the following code .... as, I can not find the following error: Parse error: syntax error, unexpected $end in /homepages/xx/xxxxxx/htdocs/mysite/folder/index.php on line 6566 Have read that a possible cause for the error message is a missing curly bracket '{' …

Member Avatar for blocblue
0
208
Member Avatar for uva1102

Hi everyone, I wanted to add 3 Pages.. If Supervisor login will direct to supersior page, if engineer login will direct to engineer's page and so on. Here is the code: protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); Page.MasterPageFile = (Session["role"].ToString() == "ME") ? "ME.Master" : "ME.Master"; } protected List<preventiveRecord> …

Member Avatar for uva1102
0
284
Member Avatar for dinhunzvi

i have the following form which submits to itself. the form is used for editing a row in a database table. [CODE] <?php session_start(); // start a session require_once '../includes/adminheader.php'; require_once '../includes/mysql_connect.php'; require_once '../includes/functions.php'; require_once '../includes/brand_functions.php'; $brandid = (int)$_GET['brandid']; $brandname = getBrandName( $brandid ); $page_title = 'Auto-Zim Administration - Edit …

Member Avatar for pzuurveen
0
296
Member Avatar for dkjuk

Hello, I am trying to create a photography gallery and at the minute I have it so it uses session variables to pull the cat titles and where a cat title is present it loops through the folder which is passed from a mysql lookup. [code=php]$dir = "photography/".$gallery; $files1 = …

Member Avatar for cereal
0
147
Member Avatar for fredy91

hay all, I currently develop a website using php but I very newbie in php programming I have login issues here, I create a login sytem I success to make that, in my web after login page it will go to admin page but when I click browser's back button …

Member Avatar for fredy91
0
162
Member Avatar for klemme

Hi all, I have created a small test app - And I want to login users when they first arrive to the app - and log them out and redirect them after they have used it. Quite simple right, but using facebook php sdk - I am not able to …

0
145
Member Avatar for onosan

Hi, first of all, sorry for my english, but I´m having a problem and I can´t resolve it. This is part of my jsp code: [CODE]<% if( session.getAttribute("usuario") == null ) response.sendRedirect("index.jsp"); ArrayList pacientes = new ArrayList(); String mensaje=""; String dni="", nombre="", apellido="", email="", sexo="", telefono="", fechanacimiento="", obrasocial="", codigo=""; String …

Member Avatar for javaAddict
0
1K
Member Avatar for FakeTales

Hey I currently have a demo shopping cart , it works great . the user can add whatever items they want to it. However now i want to add just the bookId's , quantity and price to my sql table to simulate an order taking place. the shopping cart code …

Member Avatar for FakeTales
0
427
Member Avatar for ykyk

when i first add an item, gridview can show the data from dtcart. when i add second item, the error "[COLOR="Red"]Input array is longer than the number of columns in this table.[/COLOR]" appear in [COLOR="Red"]##[/COLOR]. Did i use data table wrongly? [CODE] protected void addToCartbtn_Click(object sender, EventArgs e) { int …

-1
72
Member Avatar for saybabs

I really need someone to help me on the scenario below. I fetch all the rows in a database table with the mysql_fetch_array() and it was successful. I placed a button on each row in order to click and take the user to another page. On click of the button, …

Member Avatar for broj1
0
180
Member Avatar for nickg21

Hey everyone, I'm going to do my best to explain this easily, even though the code might not be the easiest to follow. I have an "Edit" form made out of a TabContainer and TabPanels that I am populating with results from a few different datasets, after a user clicks …

0
68
Member Avatar for 4cpukid

Hi; I have a mobile script from detectmobilebrowsers.com that will redirect the user to my mobile site however I also wish that when the URL "http://mysite.com/?mobile=no" is entered a session will be created that won't redirect the user on every page of my site... [code=php] $mobile=$_GET['mobile']; if(isset($_SESSION['mobile'])){ if($_SESSION['mobile']==="no"){ complete(); } …

Member Avatar for forkmartin
0
193
Member Avatar for mbowler

Hello, I run a service business where employees go to customer homes. I have a Joomla site where registered users (customers) can maintain details about the services they wish us to perform for them. At any point they can login and change these details. I have functions that use TCPDF …

0
71
Member Avatar for uva1102

Hi everyone.. Problem: no space between each tables.Could anyone please advice.. solutions: here is the coding: protected void btnShow_Click(object sender, EventArgs e) { if (ddlMonth.Text != "") {d.Controls.Clear(); DateTime start = DateTime.Parse(ddlMonth.SelectedValue); DateTime end = start.AddMonths(1).Subtract(new TimeSpan(1, 0, 0, 0)); switch (ddlRecurr.Text) { #region Daily case "Daily":{ foreach (preventive p …

Member Avatar for uva1102
0
147
Member Avatar for polinolin

I want to create a voting system where there is a user and admin pages. so when the user has selected, the user can not choose anymore. To the database system checks whether the user has selected or not. I want to use the session between user and admin. and …

Member Avatar for mikulucky
0
64
Member Avatar for ab_omid

hi i want to use hibernate in java+postgresql but when i run it receive NullPointerException [code]import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import org.postgresql.Driver; public class FirstExample { public static void main(String[] args) { Session session = null; try{ SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); session =sessionFactory.openSession(); Transaction tx = …

Member Avatar for ab_omid
0
293
Member Avatar for magikman

Ok, so I have exhausted all possible options with this. I cannot figure out why this script fails to compile when trying to divide. The division on line 203 seems to break the whole script. The errors that are displayed are for lines that are 50 some lines below the …

Member Avatar for d5e5
0
476
Member Avatar for creativeartbd

Hi, I'm new in php and face some problem in mysql. I want to check some data if it's remain on database. Example: in my form there are two form field. 1) url 2) name. So i want to check if session user have already this 'url' and 'name' in …

Member Avatar for debasisdas
0
121
Member Avatar for sidra 100

hi m writing a program n storing a values in session but one of them i.e of prie is not working . can any1 tel where m i wrong [CODE] $name=$_POST['P_list']; $quantity=$_POST['quantity']; $query= "SELECT product_name, unit_price FROM product WHERE product_name='$name'"; $result=mysql_query($query); if ($result) { if (mysql_num_rows($result)==1) { $orders = mysql_fetch_assoc($result); …

Member Avatar for pzuurveen
0
126
Member Avatar for gorleone

Hey guys, what the best practice for session check without duplicate code. I mean when check the session in some controller I have to duplicate the code to other controller, and that is not a good idea. <?php [CODE]class Ctrl extends Controller { private function _ses_check() {...} } class Second_ctrl …

Member Avatar for pritaeas
0
165
Member Avatar for apanimesh061

[CODE] CREATE TABLE Query3Ans( dname char(20) ); CREATE VIEW deptNonPhDs(dept, numNonPhDs) AS SELECT dcode AS dept, count(*) AS numNonPhDs FROM instructor WHERE idegree != 'PhD' GROUP BY dcode; INSERT INTO Query3Ans( SELECT d.dname FROM deptNonPhDs dp1, department d WHERE dp1.numNonPhDs >= (select max(dp2.numNonPhDs) FROM deptNonPhDs dp2) AND dp1.dept=d.dcode ); select …

Member Avatar for hfx642
0
137
Member Avatar for polinolin

someone there who can help me about the session not? I have a page the user A and user B.. on every page there InputBox user. If the user A has to fill the input box means that when the A log back he does not need to fill in …

Member Avatar for diafol
0
131
Member Avatar for Xufyan

Ok, I have two radio buttons 'A' and 'B' and user have a choice to select anyone of them, by default button 'A' is selected but when user come to my website and selects 'B' then selection changes to button 'B' however the problem is, when the user move to …

Member Avatar for diafol
0
174
Member Avatar for Narayanan87

Hi i am new to JSP. I am setting a boolean value for session attribute in the java class. Now i am getting the same in the jsp using session.getAttribute("session attribute") method. Now i want to remove the session value in jsp. How could i achieve this??? Plz Help..

Member Avatar for laxmipriya22
0
97
Member Avatar for diafol

Hi all, I've been using ajax for a while and I've been storing my trivial php include files in the public directory tree. Then I thought, I really should be putting my classes and includes above the public document root (as I used to do before I started dabbling with …

Member Avatar for diafol
0
1K
Member Avatar for Philippe.Lahaie

Hi, I am currently taking care of a website that goes back to 1997 and mostly all programmed with Asp 2.0 and vbscript, while i keep the pages in Asp 2.0 when i have to update them, this week i had to implement some new pages, and since we are …

Member Avatar for Philippe.Lahaie
0
524
Member Avatar for swebdizajn

I have a problem at login to the site: Constantly message appears: Deprecated: Function mysql_db_query() is deprecated in /home/vebsajt/public_html/hosting/config/functions.php on line 53 Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in /home/vebsajt/public_html/hosting/config/functions.php on line 53 the file in line 53 functions is: $check_login = mysql_db_query($db, "SELECT * FROM …

Member Avatar for hericles
0
969
Member Avatar for bflack

Hello guyz, I was using sessions on my php code to pass specific variable values such as usernames. Everything goes well when I go straight browsing from page 1 to page 2, 3, 4 etc. but when I press the back button or even clicking the link to another previous …

Member Avatar for simplypixie
0
194
Member Avatar for PrincessSasha

I have this idea which I need some help with. Currently I am developing a mysql database with a java interface. It is a hotel management system, and for billing purpose. I have the following tables. Bill (BillID, ResvID, IssueDate, ToTalBill, ChargedTo) Employee (EmpID, Name, Age, Nationality, NatId, Mobile, Telephone, …

Member Avatar for ChrisPadgham
0
132
Member Avatar for BenzZz

Error messages should be displayed within the html if certain fields on my member register form are left empty, if they are invalid types or if the username entered already exists. I've tried adding a record with an already existing username and it does direct to the member registration failed …

Member Avatar for BenzZz
0
272
Member Avatar for ErGa

Hello, I would like to create a small procedure that fetches the names of the columns of a table and uses them as a variable name. Let me explain. TableA Ref, FullName, FirstName, Age, ... 1, Jones, Charles, 32 2, Bridge, Dom, 26 3, Goodtime, Jack, 46 ... And I …

0
67
Member Avatar for sainigks

Hi every one, i am making a database table which count how much times page reloaded. i have create a variable in session and assign it a value "0"; now i want when page reloaded this value of session variable will increase with 1. how can i do this. please …

Member Avatar for DariusG
0
1K
Member Avatar for toplisek

I have link with e-mail like: <a href="mailto:no-reply@mydomain.com">My e-mail address</a> When clicked on link it should do two tasks: 1. PHP SESSION variable: $_SESSION["var"] = "no-reply@mydomain.com"; 2. Live Ajax value to publish at form As there is stored value into session $_SESSION["var"] = "no-reply@mydomain.com"; there should be Ajax based SESSION …

Member Avatar for AleMonteiro
0
133
Member Avatar for FakeTales

Hey guys , i am working on a login page that will only allow an admin login , if the user is part of a trade account or is classed as a customer i would like them to be redirected. [CODE]<?php session_start(); if (isset($_SESSION["superUser"])){ header("location: index.php"); exit(); } ?> <?php …

Member Avatar for FakeTales
0
2K
Member Avatar for albright_family

Ok so I am using the default WebApplication in Visual Web Developer 2010, and applied Paladine's example of Simple ASP.Net Login page. And it is working, but only to some extent. I am sure I am just missing something INCREDIBLY simple, but after looking at this code for 2 days, …

Member Avatar for albright_family
0
406
Member Avatar for sidra 100

hi m trying to make a login page. m trying that when username and password is confirmed it shows name of customer with welcome message and further page appears accordingly. this is my code for login GUI [CODE]<!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"> <!-- DW6 --> …

Member Avatar for sidra 100
0
264
Member Avatar for apontutul

[CODE]<html> <head> <title>Pie Chart Demo</title> </head> <jsp:useBean id=[COLOR=red]"myChart"[/COLOR] class=[COLOR=red]"classes.beans.votepie"[/COLOR] scope=[COLOR=red]"session"[/COLOR] /> <body> <h2>Vote Results Pie-chart</h2> <%String chartViewer = myChart.getvoteserve(request, response);%> <img src=[COLOR=red]"<%=chartViewer%>"[/COLOR] border=0 usemap=[COLOR=red]"#imageMap"[/COLOR]> </body> </html> [/CODE] accessing this above viewrst.jsp file shows the following error: [CODE][B]HTTP Status 500 - [/B] [B]type[/B] Exception report [B]message[/B] [B]description[/B] [U]The server encountered an …

Member Avatar for victabk
0
2K
Member Avatar for FakeTales

Hey i am currently working on a book store for a university project. And would like to implement that only admins can access the backend of the website. My login scripts currently allows all types of users Login . I have two mysql tables a [B]user [/B] table and a …

Member Avatar for blocblue
0
438
Member Avatar for cascer1

hello, i've been working on this website for a while ([url]www.scfan.net[/url]), but for some reason the page: /gameinfo.php has an error with the session code. i'm using this code on every other page on the website too. but only /gameinfo.php and /livestream.php and /tac_protoss.php have the problem. could anyone help …

Member Avatar for broj1
0
89
Member Avatar for jonnyboy12

Hello all. I am trying to set a session variable as a string like this. [CODE] $_SESSION['something']="hello"; [/CODE]this does not work I also tried this. but it didn't work; [CODE] $name =$_SESSION['something']."hello"; [/CODE] and if i do this [CODE] $_SESSION['something']=$_SESSION['something']."hello"; [/CODE] the value ends up like this hellohellohellohellohello So what …

Member Avatar for phorce
0
46
Member Avatar for Mogradjinn

I'm trying to set up a timeout test on a selection of files. The files run the test via an include, which contains the following: [CODE]$inactive = 20; /* check to see if $_SESSION['timeout'] is set */ if(isset($_SESSION['timeout']) ) { $session_life = time() - $_SESSION['timeout']; if($session_life > $inactive) { session_destroy(); …

Member Avatar for Mogradjinn
0
337
Member Avatar for gourav1

hey!tell me that what is difference between info contained in cookies and session(made in web container) ? let i have opened a website and done something in it and then i opened another site and do something on it. then tell me what is the info cookie is containing and …

Member Avatar for gourav1
0
159

The End.