473,598 Members | 3,164 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Function in php to update session using two parameters?

34 New Member
Q1.Hello guys i'm trying to make a function named as "updateSession( )" to assign values in session variales. Also the function should have two parameters.
A. session variable key name that neesd to be set in session array.
B. session variable value that needs to be assigned to the key name first parameter. for eg: if we need to assign a value "steave"
to a key named "username" then we would add(use) a function as updateSession(" username", "steave");

Please help me..i got stucked
Oct 30 '10 #1
1 2377
6,050 Recognized Expert Expert
What exactly are you having trouble with? Show us what you've already tried.
Oct 30 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Phester | last post by:
Some of the functions that are part of PHP have optional parameters. Is it possible to define your own function so that it has optional parameters? If so, how is that done? Thanks, Phester vilefesteringscum at
by: Jon Maz | last post by:
Hi, A quick one: If you are forming a dynamic sql statement using parameters from a web form, you would normally double up any single inverted commas inputted by the user to stop sql injection. But if you are using command parameters to build the sql statement (as below), is this still necessary? cmd.Parameters.Add("@subcategory", SqlDbType.VarChar).Value =
by: Mark | last post by:
Hi: I have an access db that I'm accessing via ASP.Net. I'm using WebMatrix's wizard to write the tedious db query code using parameters. Select, insert, and delete work fine using the database parameters. I can't seem to get the update code to work. If I write my own code using a standard SQL statement like: "UPDATE db SET field='somevalue' WHERE id=someinteger" : the update works properly. But with webmatrix's code, the update doesn't...
by: ksrajalakshmi | last post by:
Hai, I've displayed all data in a datagrid. the datasource is a dataset. the user can modify the data in the datagrid. the updated data in the datagrid to be updated in datatable. i used the following snippet,but no effects. if(dsSalaryslip.HasChanges(DataRowState.Modified)) { DataTable dtChanges = dsSalaryslip.Tables; int iRow = dgSalarySlip.VisibleRowCount ;
by: Kannan s | last post by:
Dear Sir, Sub: help requred to build an Update Query using if or iif I am having two tables with the following fields I wish to create a single update query in MS Access Table1: code, qty_x, qty_y, qty_z, qty_o ( code:ch, qty_x,qty_y, qty_z, qty_o : n) Table2: code, qty, xyz ( code:ch, qty: n, xyz=ch) Relationship created between the two tables on code field
by: midlothian | last post by:
Hello Trying to update a memo field in an update query using the Replace function, and am getting a type conversion error. Here is my parameter: CStr(Replace(CStr(),"$",Chr$(13) & Chr$(10))) This fails. However, this also fails: CStr()
by: cty | last post by:
Title: Problem in session using php5 Good day, I use php5+mySQL4+IIS5.x Previuosly i use php4 and no error occur,
by: Tor Inge Rislaa | last post by:
Passing and using parameters How to get hold of the parameter value provided by the URL? When I open a web form with a DataSource I often include a parameter in the URL as below: myNewPage.aspx?myParam = 10
by: SQL Learner | last post by:
Hi Alex (Kuznetsov) and All, This is to follow up with my last post, "Link two tables using partial word match". How can I UPDATE table using partial word match? How can I write a SQL statement to do so? (I am using MS-Access.) The two tables and the expected result are listed below: Thank you in advance!
by: DC | last post by:
How can I update data using a Details view without using an AccessDataSource and its associated Insert, Update and Delete but using a DataReader instead?
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.