4,124 Topics
![]() | |
My site needs a way to know whether a user is an admin or not in multiple pages. So is it safe to store whether a user is an admin or not in session variable? Or is there a better alternative (Maybe another superglobal variable?), It will only hold a … | |
I am new to PHP/MySQL and currently working on a project to learn it a little better. I have a bit of PHP code and it has a problem that I'm having a little trouble figuring out. Basically, it is taking session data and writing it to a MySQL database. … | |
I autoload the Session library in CodeIgniter. However, sometimes there are controllers that output XML, JSON, an image, or other mime types, and I don't want these sending back cookies in the header. Is there a way to suppress this on a per-controller basis? ![]() | |
So i came across this issue that I can run my applet fine and it creates my file (exe) until i attempt to do so in a browser (firefox, IE, etc). Its signed and asks for permission and gives no erros but it doesnt write to the file I want … | |
Hello, I m new to servlets. I have written a servlet program which reads http header of local host! How to read http header of any website say www.google.com? /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Header; … | |
I have a lab management webapp that lists servers on my network. With a click in IE I can open a terminal services session to that server. The code works in IE, but not in chrome or firefox. Can anyone suggest how I can make this work in Chrome (Firefox … | |
Hey, im trying to dynamically add an image to a gridview for each row if it meets a condition. DataTable dtSub = new DataTable(); dtSub.Columns.Add("ID", Type.GetType("System.String")); dtSub.Columns.Add("FirstName", Type.GetType("System.String")); dtSub.Columns.Add("LastName", Type.GetType("System.String")); dtSub.Columns.Add("Tutor", Type.GetType("System.String")); dtSub.Columns.Add("test", typeof(System.Web.UI.WebControls.Image)); //not sure if this is correct?? DataSet ds = new DataSet(); ds.Tables.Add(dtSub); Session["myds"] = ds; foreach … | |
I am trying to create a powerpoint quiz that tallies the scores, provides the results e.g. 95 out of 100 and the percentage %, then writes the users name and results to an excel spreadsheet. Oh, and all this has to be done using Office 2007 products. Can anyone help? … | |
i get an error "org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 18" i think my exception code is wrong. i don't know how to return an empty string when the user doesn't enter any number and clicks "continue". any suggestions <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" encoding="UTF-8"?> … | |
i am trying to get the sum of 2 number.. it should give me a message if the sum is correct. i get an error "21 in the jsp file: /index.jsp Incompatible operand types String and int" .any suggestions whats wrong with the program. <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" … | |
The problem is, when I load a particular page (user.php) the session variable not work. But on the other pages it works fine. Even in my local host user.php also works fine. Only user.php on remote server is occuring this problem. This is login script <?php require_once 'inc/functions.php'; require_once 'inc/mysql_cnct.php'; … | |
i want the best secured php class to provide [B]log in[/B] feature in my web with access protection and session timeout , plz help me | |
Hi Im trying to create a web based quotation system with php and mysql. I wanted to create something like shopping basket where people store the items and when they click generate quote the system will display the quote of the items and qty selected. Only when the person has … | |
I've had nighmares about this since 3 days ago and couldn't find anything by googling so here I am. As the title says so i need to find a way to store and then retrieve images from a mysql database I have tired the code below to do so (the … | |
I am not sure if this makes sense, but in an application I've working on, there are two users. One is an admin with an admin role/capabilities and the other is a member with a member role/capabilities. Now, when I log in as the admin, there is no issue. When … | |
i have a form and checkloginstudents.php,,but my problem,i can't display the details of a user after login,, this is my form: <form id="form1" name="form1" method="post" action="check_login_students.php"> <label>Name <input name="username" type="text" id="textfield" /> </label> <label>Password <input type="password" name="password" id="textfield2" style="margin-top:5px;" /> </label> <label> <input type="submit" name="button" id="button" value="Submit" /> </label> </form> … ![]() | |
Hello, Im having issue's with this jquery code for enabling and disabling select/input box's. I have been googing everything but can not find a solution. Any help would be appreciated. Thanks <?php session_start(); require_once 'includes/ncjhs_summerschool.php'; foreach($_POST as $key => $value ) { if( in_array($key,$CAPTURE_FIELDS) ) { $_SESSION[$key] = $value; } … | |
Hi All, In my server ther are so many session files are under /tmp files. I want to delete all the session files which is no more active in automated way. I came to know that i need to change some garbage collection configuraions in php.ini file . These are … | |
I need help with a program i am writing. It takes in a line from the user and then decides wat to do. there are to many options to spesify. some of the options are: set TARGET 453.212.556.22 This command will differ becuase the host will never be the same. … | |
I've updated an application that I am working on to use PHPass instead of md5. I am using sessions, so when a user logs in, at some point they get reset to another user. I am not sure what is causing this issue, so some help is greatly appreciated. Below … | |
Hi all, when I use equals method is not working when i tried to check password from database and from textfeild both the values are same but eqals method shows error my code is if(strPasswordNew.equals(passwordManager.getPassword())) My complete code for rreference String strPasswordOld=request.getParameter("oldpassword"); String strPasswordNew=(request.getParameter("newpassword")).trim(); String strPasswordNew1=(request.getParameter("newpassword1")).trim(); if(strPasswordNew.length()!=0 && strPasswordNew.equals(strPasswordNew1)){ dataManager.getConnection(); … | |
Since md5 will be deprecated at some point (if it isn't already), and will soon pass away, I thought I should think about of another way of securing passwords. I've been thinking about phpass for a while and decided to jump in feet first. I am pretty sure that I … | |
I have created one form named newest_receipe.aspx in which i have various receipes name with respective date and time in a data list and receipe names are displayed using hyperlink. <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" onselectedindexchanged="DataList1_SelectedIndexChanged"> <ItemTemplate> <asp:HyperLink ID="HyperLink20" runat="server" Font-Underline="True" ForeColor="#0000CC" onload="HyperLink20_Load"> <%# Eval("recipe_name") %> </asp:HyperLink> <asp:Label ID="datetimeLabel" runat="server" Text='<%# … | |
is it possible not to include the account password for the user that will send the email. i tried not to put password but it does not work. the email that can send only is the one that is set. please help. this is the code: <%@ page import="java.io.*,java.util.*,javax.mail.*"%> <%@ … | |
Hi, First, I made a web page which only contains Facebook Comment API. (http://developers.facebook.com/docs/reference/plugins/comments/) This works fine in any internet browser such as FF and IE. I can leave a comment - submit button works fine. Also I can change the name. (We can have multiple names/pages in one account) … | |
the web app is a simple calculator that adds and subtracts. my problem is that the add and the subtract buttons don't work i get an error message: "An error occurred at line: 19 in the jsp file: /adder.jsp Invalid character constant" <% String name = (String) session.getAttribute("name"); if (name==null) … | |
I am not able to set php session for starting the session I am using below code session_start(); $_SESSION['username'] = $username; For checking the session I m using <?php if (!isset($_SESSION['username'])) { header('Location: index.html'); } ?> But the session is not being set as I am not able to grep … | |
Hey guys , I am curently fallen in an adverse situation . I am at the end of my website and this situation occurs as follows:- I got 2 tables named "userdata" and "userresult" such that when user registers himself to the site , his information is inserted to both … | |
Hi, Im using session variables and when passing from one page to another with a target="_top" the session variables are erased. Is there anyway i can go around this problem ? Any idea will be greatly appreciated. Thank you | |
Hi All, I am trying to create a page were users can edit their post. -Select subbmitted data from the database using post id, and display this information so that users can Edit. -And finally i want to update the data and continue to the preview page, where users can … | |
I need help displaying some products from a mysql database in a 3x4 table or what ever size i choose to do. An example of how I want to display it is http://www.golfcircuit.com/Golf-Drivers/13__.html. Right now I just have it displaying in a n x 1 format. Like so http://webdev.cs.kent.edu/~jfunchio/wp2/HW2/index.php. I … | |
I am having trouble to find the entities for this condition. Can anyone please help me here. A university has different types of staffs, e.g., lecturer, receptionist, cleaner etc. Should be recorded is class of jobs - Academic, Technical and General. An Academic can teach many subjects in a session … | |
i have one combobox and it is containing some items when ever i changed that item the output is generated according that it means i store databases in my combobox the default item is "select" like this I have so many forms when ever i changed my cbdatabaselist that database … | |
![]() | Dear I would like to set session expire time to 3hrs, Which one is best ? `ini_set("session.cookie_lifetime","10800");` or `session_set_cookie_params(3600 * 3);` Or can I use both? And one more, Is it compulsary to place every page b4 where ever session_start() Thanks. Pls help me. ![]() |
hello!! i want to read username from database then pass the username in session how its possible using c# in asp.net?? | |
Hi, I am trying to integrate phpbbforum in my website. I have been successfull in adding the data of the user in the table of my website as well as my form user table.Now I am trying to make a single sign in for the user. It means that if … | |
Hi, I am trying to creat a very simple session between 3 php pages as:index.php ,validate.php and target.php index.php <?php session_start(); $_SESSION['uid'] = 'test'; ?> <!DOCTYPE HTML> <html> <head> <title>Start A Session</title> </head> <body> <h1>Welcome to Heaven</h1> <form method="POST" action="validate.php"> Your Name: <input type="text" name="name" value="" /> <input type="submit" value="Submit" … | |
Ok so I have made ASP.NET website I have used Access database 2010 but I am having problems with one particular thing when I try and run the website I am getting this error which says OleDbException was unhandled by user code and Could not find file 'C:\Program Files\Common Files\Microsoft … | |
**Hello everyone, I dont know if im placing this in a good place. I have a problem with my application. Its a simple application with connecting to database, retriving info and populating table. I changed the apache tomcats context.xml to looks like this:** <Resource name="jdbc/test" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" … | |
Hi I am a bit stuck on how to close a security issue. Basically if someone is looking at their profile and wants to edit it the URL will show the id of the user. Currently anyone can just change that number and have access to viewing and changing another … | |
Hi guys, Here I got a problem that my session expired is not secure I think.. I use this code, but user can click button back and go to previous page. Means session not destroy.. May I know why its happen. Within 15 min it will be logout but user … | |
Hi, How do I prevent my user from submitting an empty form? When I do that, I'm getting a HTTP 404 not found error in IE and a blank page in Firefox. None of the validation errors are showing up. I even tried putting an else stmt in the StudentsController's … | |
Hi, I am facing a problem in transferring session.I am developing a website and I want to integrate a forum in the website.I need to take the session of the user from my website to the forum. Is there any way of transferring my session values to the forum. Thanks … | |
Hi, I've been reading into testing my PHP code particularly unit testing using PHPUnit. The problem I have is that most of my code is procedural with not even many functions. I have read that unit testing is more suitable for OO PHP however i have seen that many people … | |
okay....my cookies and session varibles are not working on my handheld...but its working on my computer...i have checked my handheld using phpinfo(), it does accepts cookies...in desperate need to idea...kindly guide me please invoice.php <?php session_start(); //starting session $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password … | |
Hi there I have a few lines of code that I would like to ammend but have been unsuccessful in doing so. I have posted in a few other forums with no luck, hopefully somebody here can help me out. I have a delete statement which I have been asked … | |
Session is not working everytime,but when i restart my machine everthing works fine .Why this happens? | |
<?php ob_start(); session_start( ); include 'authenticate.php'; ?> aurheticate.php---------> <?php mysql_connect("localhost", "root", "") or die (mysql_error()); mysql_select_db("pms") or die (mysql_error()); if (!isset( $_SESSION['user_id'])) { if(!isset($_POST['txtuser_name'])) header('location:login(Admin).php'); $value=mysql_real_escape_string($_POST['user_value']); $user_name = $_POST['txtuser_name']; $pass = $_POST['txtpassword']; //user isentification if($value==1) { $query="select admin_name , admin_id from admin where admin_name='$user_name' AND admin_password='$pass'"; $sql = mysql_query ($query); … | |
okay guys....currently i'm using session for my web application, the problem is evertime i click the browser "back" button, the session expires and the variables are reseted. i want to retain this value until the user quits the browser. | |
okay...seem to be experiencing some problem here....in my pc, the web application is running perfectly....but when i run it from my handheld, its showing error... this is my code <?php session_start(); //starting session $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="test3"; … |
The End.