TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-29-2010, 05:36 PM   #1 (permalink)
The Visitor
Newcomer 
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
reverse is on a distinguished road
Default global variables

Hi all,

I need help on this:
How do I pass a value from one variable to another variable upon users click?

example:
I have following html site

Code:
<html>
<head>
</head>
<body>

<?php
myGloablVarA=var1;
myGloablVarB=var2;
myGloablVarC=var3;
?>

<?php
some php codes here

how do make a function here (onclick) change those Global Variable defined above(myGloablVarA,myGloablVarB,myGloablVarC)
to new values thats been generated upon user click?

currently I am posting the value to url location

echo'<a href=\"detail.php?id=$var1.$var2.$var3\">

instead of posting the values to url location I 
would like values to be stored in global varaibles and....
?>

<?php
.....read the values back here again

myVarnew1=myGloablVarA; // assign new values from myGloablVarA
myVarnew2=myGloablVarB;
myVarnew3=myGloablVarC;
?>
</body>
</html>

many thanks..I would be very glad on any tips
reverse
reverse is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Defining your World: All About Constants Wildhoney General 15 01-29-2013 12:32 PM
How to transfer javascript variables from one file to another file. sandhyagupta Absolute Beginners 1 08-05-2009 12:02 PM
global variables or not? allworknoplay The Lounge 6 05-25-2009 06:07 AM
Is there a function to list all "active" variables Dave Absolute Beginners 3 06-05-2008 04:03 AM
When was the last time you used the global construct? Wildhoney The Lounge 11 01-28-2008 08:41 PM


All times are GMT. The time now is 11:54 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design