4,124 Topics

Member Avatar for
Member Avatar for ku.heng.7

protected void Page_Load(object sender, EventArgs e) { if (Session["UserName"] != null) { if (Session["roles"].ToString() != "Admin") { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Only Admin Can Access this Page');window.location ='HomePageAdmin.aspx';", true); } } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Please Login To Proceed');window.location ='HomePageAdmin.aspx';", true); } } protected void btnRegister_Click(object sender, EventArgs e) { …

Member Avatar for BhuvanRam
0
219
Member Avatar for rjony321

Hello,I am using PHP Codeignetor. and I can't retrive row/single data information from table.But here data save successfully. here is the CI_Model code: public function selectItinfoByUserId($user_id) { $this->db->select('*'); $this->db->from('tbl_add_it_ins_course'); // table name $this->db->where('user_id', $user_id); //$this->db->where('contact_status', 0); $query_result = $this->db->get(); $result = $query_result->result(); return $result; } /* End Model*/ Here Is …

Member Avatar for cereal
0
318
Member Avatar for Venter

Good Morning. Actually i'm doing online quizz project. so when ever user login details are true he has to take a test. so that i displaying questions randomly from database. when i press F5/Ctrl+r/browser Refresh Button the questions are changing simultaneously. What i require is the questions could not while …

Member Avatar for diafol
-2
204
Member Avatar for Venter

i'm doing online quizz project. so i'm fetching questioins & answers Randomly from database. when ever press referesh button/f5 the questions are changing. wat i require is when the session starts once.the questions could not be change even doing refresh.. thank u all. eagerly waiting for ur help

Member Avatar for gon1387
0
226
Member Avatar for crazydevelopervish

i have one datalist having shopping cart table which retrieves values as per customer_id aspx code. <asp:DataList ID="DataList1" runat="server" DataKeyField="Customer_Product" DataSourceID="SqlDataSource2" onupdatecommand="DataList1_UpdateCommand" oneditcommand="DataList1_EditCommand1" ondeletecommand="DataList1_DeleteCommand" oncancelcommand="DataList1_CancelCommand1"> <HeaderTemplate> <table border="solid 1px black"> <tr> <th style="width: 250px"> </th> <th style="width: 400px"> Item Description </th> <th style="width: 100px"> Price </th> <th style="width: 100px"> Qty …

Member Avatar for kvprajapati
0
185
Member Avatar for eyeda

Hi Guys! I've a problem here with the $_SESSION coding. As u can see from the coding below, I've declared several session after a user is log in. I want to display the $_SESSION['SESS_ADMIN_LEVEL'] in adLandingpage.php but the code is not work. logincode.php $resultA = mysql_query("SELECT * FROM staff WHERE …

Member Avatar for eyeda
0
194
Member Avatar for qwertpink

Hi all, Im trying to add sizes to the cart. However, i cant pass size over. please help. $result = $db->query($sql); $output[] = '<ul>'; while ($row = $result->fetch()) { $output[] = '<br><font color="837F77"size="6">'.$row['name'].' </font><br></br> S$'.$row['price'].'<br></br>'; $output[] = '<select name="size"> <option disabled="disabled" selected value="NA" >Size</option>'; if ($row[small_qty]== 0){ $output[] = ' …

Member Avatar for qwertpink
0
379
Member Avatar for HunainHafeez

i put a code in my website to redirect user to paypal sandbox , after entering his email id , and storing it in session , in return url of paypal sandbox i mentioned a page but it doesn't work, it doesn't maintaing the session variable, it assigns null to …

Member Avatar for HunainHafeez
0
1K
Member Avatar for Szabi Zsoldos

Hi guys, I'm facing a weird problem with our Trustico Certificate. We have a webshop with customers that are logging in to make purchases of different products, all of this works nice untill the user changes his/her DATE on the Computer that he/she is using. If the date is changed …

Member Avatar for Szabi Zsoldos
0
277
Member Avatar for showman13

I was having issues getting this working 2 years ago and through posting in here, got it resolved... Now I have another related question to the same rewrite code... I haven't ever run into this issue til now, so didn't realize it existed... I need the rewrite rule to be …

Member Avatar for showman13
0
167
Member Avatar for nHulk

[CODE] <tr> [B][U]<td><a href="inbox.jsp" ><%=rs.getString(1)%></a></td>[/U][/B] <td><%=rs.getString(2)%></td> <td><%=rs.getString(3)%></td> </tr>[/CODE] See lines in Bold.....after i click it has to set session variable with value reterived from <%=rs.getString(1)% >based on which i am going to display particular contents in redirected page

Member Avatar for jalpesh_007
0
1K
Member Avatar for dancks

Hey guys its me again: Basically everything on this page, at least the parts I'm able to test, are working, problem is addproduct.php is supposed to print errors when error checking the form and repopulate the data fields with the previously submitted data. I'm doing this by populating $_SESSION. addproduct.php: …

Member Avatar for gavinflud
0
420
Member Avatar for Cally_Law

Hi, I have some problem that I can display the image in picturebox before save into database when browse but after browse, the image path is lost in fileupload and I unable to save the path into database. Can I display and image in picturebox , but the path still …

Member Avatar for JOSheaIV
0
164
Member Avatar for adrian.mcguinness

I have a gridview which totals up the quantity of items the buyer has added to basket. I have added a delete button and this button is meant to reduce the quantity by one when clicked. removing the latest record from the database. I keep getting a the following: > …

Member Avatar for adrian.mcguinness
0
1K
Member Avatar for OsaMasw

Hello there, I have a big big problem in my project, I have a login page , so everyone log in, the **session** will be his **id** $_SESSION['userid'] = $id; till now there is no problems, I put a header file to check the user is logged in or not …

Member Avatar for phorce
0
126
Member Avatar for sheshagirig

I need a ajax way of updating the mysql table. Following is my code that gets the data from mysql table plus ajax function that will send data to processing file. Problem is it is sending every time only the data of the top row ( form). How can send …

Member Avatar for sheshagirig
0
175
Member Avatar for crazydevelopervish

I have one form having One DataList In which i have two table one having Header Template and other having Item Template....... Code Of aspx page is as follows..... <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"> <HeaderTemplate> <div> <table> <tr> <td style="width:245px; text-align:center;"> Image</td> <td style="width:450px;text-align:center;"> Item Description</td> <td style="width:260px;text-align:center;"> Price</td> <td style="width:322px;text-align:center;"> …

Member Avatar for crazydevelopervish
0
134
Member Avatar for hwoarang69

i now the differece between seesion and cookies. but i am not sure when one to use. when people make website like dreamincode, myspace, linkedin, etc.. wht they use. right now on my site when user log in session get started but if user hit remember me than cookie get …

Member Avatar for diafol
0
188
Member Avatar for coder91

I have a page that allows a user to enter a reference then select the app that they want. The reference is stored as session and is used on other pages to show the user their recording against that reference. On this particular page (after they have chosen the app) …

Member Avatar for coder91
0
138
Member Avatar for coder91

I have a page that allows the user to select various options from drop down lists. Below this is a gridview recording the details that have been submitted previously. So when the user hits submit their data is stored in a database and the gridview is rebinded to display this …

Member Avatar for coder91
0
164
Member Avatar for hwoarang69

let say i create session in login page. here session is on id and username. $_SESSION["id"] = $id; $_SESSION["username"] = $username_p; now to see who loged in i can do this $user_name_s = $_SESSION['username']; //has the name of who is loged in now how do i do this with cookies? …

Member Avatar for LastMitch
0
108
Member Avatar for Djmann1013

I have this code right here: if(isset($_SESSION['username'])) { header("location: home.php"); exit(); } This code works, but I want it to redirect to home.php with out having to visit a different page and then the page this code is on to trigger the code. I don't know how to do that. …

Member Avatar for Djmann1013
0
1K
Member Avatar for cheelo007

Ok, I may be missing something very easy but when I submit and query the database the session doesn't set for some reason and I'm sent back to admin.php per instruction of my index.php file. Could someone please give this a look over, maybe it's a very simple fix, but …

Member Avatar for cheelo007
0
383
Member Avatar for webdev2012

Hello, So in my root directory sessions work fine. On every page I include an initialization page like so: <?php include "http://localhost/home/core/init.php";?> On this page I start the session: session_start(); Now when logged in to my site I can browse every page in the root directory and still be logged …

Member Avatar for veedeoo
0
469
Member Avatar for phphelp123

<?php session_start(); # start up the session $host="localhost"; // Host name $db_username="root"; // Mysql username $db_password=""; // Mysql password $db_name="shop"; // Database name $tbl_name="users"; // Table name // Connect to server and select databse. mysql_connect("$host", "$db_username", "$db_password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // username and password sent from form …

Member Avatar for Zagga
0
105
Member Avatar for TIM_M_91

OK so I have two classes in the first class is where the database is handled, in the second class is where I want the output from my database select statment in be displayed on a label. How do I get the result to a label on Invoice.aspx? DBdatabase.cs public …

Member Avatar for TIM_M_91
0
184
Member Avatar for TIM_M_91

Ok so I have a class called DBdatabase.cs which stored all my sql queryies, what I am trying to do is execute an update statement that updates the users password through the session however when I execute the statement nothing occurs what am I doing wrong? Also Please note that …

Member Avatar for TIM_M_91
0
99
Member Avatar for rikkitikkitavi

Hi, I need help please. i spent the last 6 hours looking EVERYWHERE for help about using PHP session across web pages. The $_SESSION variable is supposed to be global, right? but I can only access it on the page it was declared. like: //PAGE 1 this works <?php session_start(); …

Member Avatar for jkon
0
687
Member Avatar for KRUX17

Hi, I'm having trouble with my session variable. When I add this code in the while loop it doesn't add the product in, but when I put it outside it adds the product to the cart. Can anyone tell me what's wrong with my code? It would save me a …

Member Avatar for LastMitch
0
161
Member Avatar for stephen_UK

For reason I won't bore you with, I need to update an archive database periodically with typically blocks of 100-300 records. Each record has 6 visible fields in the database. Frequently 4 of the 6 fields have the same information in them for the whole block of data. For a …

Member Avatar for stephen_UK
0
253
Member Avatar for hwoarang69

error:Notice: Undefined index: username in C:\xampp\htdocs\E_COMMERCE\INCLUDE\header.php on line 20 login in information: so i have a checkbox called "$remember_p". if check box is on than i want to set cookies but if its not on than i want to set session. if($remember_p == "on") { //cookies doesnt get destory when …

Member Avatar for diafol
0
125
Member Avatar for coder91

Hi, I have code that increments values protected void IncrementOccur_Click(object sender, EventArgs e) { if (Page.IsValid) { //build object to insert occurrance Ad a = new Ad(); a.AdID = Convert.ToInt32(ddlAddtype.SelectedValue); a.AdRef = Session["SessAppRef"].ToString(); a.AdOcc = 1; try { //insert advert object into db AdManager.InsertAdOccRef(a); //rebind the gridview GridViewHistory.DataBind(); //reset the …

Member Avatar for coder91
0
351
Member Avatar for hwoarang69

my cookies not seem to be working. the seesion works fine tho. am i missing some thing? o and i doesnt print echo"on"; if($remember_p == "on") { //remember username for 42 hrs setcookie("id", $id, time()+20); setcookie("username", $username_p, time()+20); //seconds //header("location: index.php"); if(isset($_COOKIE['username'])) { echo"on"; } } else if($remember_p == "") …

Member Avatar for LastMitch
0
82
Member Avatar for dinhunzvi

i have a form with a text box and a drop-down list. the form submits to itself. when the user submits the form for processing the form must be able to retain the selected value from the drop list if there is an error. here is the code for the …

Member Avatar for adam.adamski.96155
0
349
Member Avatar for hwoarang69

this code doesnt check captol letters. how can i do this. for examle is i have "cat" in table "user". than if i set $username_p to Cat. and it will work fine. but i dont want to work bc Cat != cat. $sql = mysql_query("SELECT id FROM user WHERE username='$username_p' …

Member Avatar for hwoarang69
0
117
Member Avatar for hwoarang69

i want to save the value of there username and password in field. so that next time they only have to hit login. so i only have one file for login page. login.php //html code <form id='login' action='login.php' method='POST'> <input type="text" name="username" id="login_username" class="login_field" value="" /> <input type="password" name="password" id="login_password" …

Member Avatar for LastMitch
0
268
Member Avatar for lbgladson

Last week I was working on some assignments using JDBC and now when I try to run programs in Eclipse this is what I get...and this is only part of the message that appears in the Console box instead of what should show when I run a program. What did …

0
82
Member Avatar for hwoarang69

cant seem to log in. when ever i hit login button in login.php. than it goes to index.php but user is not loged in. i think its bc session_start problem. any idea why?? header.php <?php session_start(); include("connect.php"); //check, if user is loged in or not if(isset($_SESSION['username'])) /*** user is loged …

Member Avatar for diafol
0
343
Member Avatar for TioNacho

My laptop is infected and I have tried everything I know to clean it. I now need your help to interpret the attached Hyjackthis report. My normal anti-virus/Firewall is ESET NOD32. I have run the following, in Safe mode: * NOD32 Virus checker * Adaware * Spybot S&D * Karpersky …

Member Avatar for ocdpcfix.com
0
196
Member Avatar for servis

i want to get the alert on responce text, but getting nothing, my code is as follow, [ICODE] <?php session_start(); ?> <script type="text/javascript"> var xmlHttp function checkCAP(str) { if (str=="") { alert("plase enter the code"); return } xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } …

Member Avatar for karlosdpm
0
3K
Member Avatar for SagarSe7en

Hey Friends, Developing an Online Shopping System. Firstly had posted a code regarding MD5 Encryption and it was solved very quickly. Require the same help again. While registering an image selected by the User should be inserted into the Database. Posting a Code which follows the DAO Pattern but i …

Member Avatar for SagarSe7en
0
1K
Member Avatar for coder91

There is code in the project I am working on that increments. Basically the user selects from a drop down list and than there is a button that increments the number for that option, to record how many times they've done something. Now I need to write code to decrement …

Member Avatar for bill_kearns
0
101
Member Avatar for HunainHafeez

i have page at facebook with the name of my website (fanPage), i imported like button script from FB to my website code , so i want then when user visits my website then whereever he clicks on my page then it should be actually clicking LIKE button but invisibly, …

Member Avatar for HunainHafeez
-1
178
Member Avatar for hafiz.muhammadakas

please i have a problem with my login page when i hosted my website it is showing me this error please help me here are the errors that it show:- 1. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/coezelib/public_html/checkstaffLogin.php:10) in /home/coezelib/public_html/checkstaffLogin.php on …

Member Avatar for gabrielcastillo
0
153
Member Avatar for HunainHafeez

using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class loginApplicant : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnsubmit_Click(object sender, EventArgs e) { // String …

Member Avatar for HunainHafeez
0
132
Member Avatar for 68thorby68

I have been reading lots about the use of cookies and session id's but keep thinking i'm missing something. I currently set cookies when users login and add things like the users database id or email so I can retrieve their details when needed, and for forms, but I don't …

Member Avatar for 68thorby68
1
183
Member Avatar for jazeelkm

Hi , I am developing a windows application using C#. In that I want to display all the outlook profiles in a listbox and on selecting one, The folder structure should be displayed on a treeview control. I can display all the profiles in the listbox and on its changedindex …

Member Avatar for sundar786
0
796
Member Avatar for allis0

I have a tale of woe to tell which is all the worse because of Microsoft's abject failure to put things right. On the first day it became available (26th Oct), I started the Windows 8 Pro download upgrade process. It's only £24.99 from here in the UK. On my …

Member Avatar for caperjack
0
211
Member Avatar for Master Mascus

Hey guys i have been assigned a work of designing a online shoe shop. I am stuck on the part of saving the chosen products on a session vaiable (rather an array) can anyone help me out to give me an idea how to proceed.

Member Avatar for JorgeM
0
232
Member Avatar for gurumoha

I need a logic / idea for establishing communication from servlet to applet. whenever the user login to server, session time will be allocated to the user, when the user logs on the server, server should initiate communication to the applet then server sends data to the applet along with …

0
47

The End.