473,491 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Intitialize a session variable after onclick event is fired

16 New Member
hello,

i want to initialize a php session variable when user clicks on a link, using a php function or any other way.

for example
<a href="http://bytes.com/submit/g/#" onclick="phpfunction()"> link</a>
Aug 12 '13 #1
1 2258
Rabbit
12,516 Recognized Expert Moderator MVP
A link can not "run" a PHP function in the sense that javascript can. You can submit data to a PHP page and set your variable that way however.
Aug 12 '13 #2

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

Similar topics

7
4737
by: Keith | last post by:
I have a list of items drawn from a SQL DB and listed on an ASP page. This works fine. How can I make it so that when a user clicks a particular item, a session variable is set to the ID of the...
3
7690
by: Arulraja | last post by:
Hello, I have created 2 custom server controls, The parent custom control contains multiple child custom controls. The Child control has a button on it. If I Click the button control, it...
1
1355
by: simon | last post by:
If I put button into the header of my DataGrid: <asp:TemplateColumn> <HeaderTemplate><asp:Button ID=btnNew Text="New Type" Runat=server></asp:Button></HeaderTemplate> <ItemTemplate> ..... ...
4
2500
by: N. Demos | last post by:
Hello, I'm learning ASP.NET, and am having a strange problem with some example code from the book I'm using. The code increments and displays the value stored in a session variable when the "Add"...
2
3390
by: Mirovk | last post by:
Hi, I have a session variable wich value arrives from a previous .asp but in my actual page I need to modify it based upon a selected value from a radio button. I will try to figure out for...
5
13934
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a...
3
6476
by: Michael_R_Banks | last post by:
I'm trying to dynamically build a table that allows users to remove rows when they click a corresponding button. For some reason, whenever I add the button to the table, it never fires the onclick...
2
2812
by: =?Utf-8?B?Uml0YUc=?= | last post by:
I posted this question in the C# discussion group but am posting it here also since ASP is involved. I'm new to C# and need some help regarding an onClick event not firing. I have a data grid...
1
1831
by: =?Utf-8?B?Q0xFQVItUkNJQw==?= | last post by:
I have a project that uses a frameset. On the pageload event one frame calls an ASP.Net page that watches a message queue. The other frame has a page that allows a user to submit queries. ...
3
2599
ddtpmyra
by: ddtpmyra | last post by:
How can I assigned multiple varialble from my result query? example of my code is Parent Form: <input type=\"text\" name=\"contactid\" if $contact !='NULL' then value=\"$contact\" ...
0
6980
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...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7192
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7364
tracyyun
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...
0
5452
agi2029
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,...
0
4579
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
637
muto222
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.