|
Hi again
My site has multiple pages and different bits of .
How do i pass a variable from one page to another ??? would global variables work or are they distroyed at the end of .
Really sorry for keep quizing you !!!
Thanks SO much
John
|
|
|
|
|
That is no problem. The easiest way to do this in PHP is through session variables.
Basically it relies on cookies but stores the data on the server side. This is not a perfect way to do it but unless you use databases it is very good.
Here is the gist of it:
First Page:
<?php
session_start();
$_SESSION["example"] = "Hello World";
?>
<a href="secound_page.php">Click here to go the secound page.</a> Secound Page:
<?php
session_start();
echo $_SESSION["example"];
?>
You can find more out at: http://www.php.net/manual/en/ref.session.php[^]
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
hello,
i am working on an asp project.
The database is given by the client.
The client has stored imgaes in datbase in binary format.
I want to extract that data and store it in image file and dispaly the file on my page.
Any idea how can i do this?
Any help is appreciated.
Regards,
Nilesh Hapse.
|
|
|
|
|
|
Hi,
I'm beginner in ASP.NET and I want to implement a voice conferencing chat on internet
any idea would be appreciated
|
|
|
|
|
ASP.NET has nothing to do with a voice chat/voice technologies; maximum that you can do is a simple (text) chat.
Creating a voice chat involves creating a client/server software with something like C++/C#. Just Google for "writing Voice Chat client".
-------------------------
Don't worry, be happy )
|
|
|
|
|
Can someone please explain what code i need to add to keep a set of links at the bottom of a pop up window?
I need it in a page where people post comments. It is a pop up window, of about 500x400 where peoople post comments, and can read the previous and next ones.
I have tried aligning it to the bottom of the window, in a table using the "space" keys, and the align bottom etc. however what happens is that if someone posts some lines of text or a very long message, and you read the comment, you have to scroll to the bottom of the message for the links to be visible. This is not the solution because if the buttons are at the bottom to begin with, then they go down the same distance after the last line of text.
If i align them to appear right after the last line of text, then if someone posts only a few words or one line, means that the links appear in the middle of page, ie. right after the last line of text agains.
I want a situation, whereby, the buttons are fixed at the bottom of the pop up window, no matter how short or long the message. ie. if the message is long, there can be scroll bars but on opening the pop up commenting windows the "previous next" buttons should always be there.
Just to further clarify, it is a pop up page and it is an .asp page.
|
|
|
|
|
Is there a way to access the .Text value of a Textbox control on the Masterpage from one/all of its Contentpages. If not, what is the best way to share data between pages.
I am using VWD Express.
Thanks,
RickD
|
|
|
|
|
Are all the pages open at the same time?
Brad
Australian
- unknown PHP Developer on "Job Prospect"
Requirement: * Experience working with XML, XSL, XPath
Comment: and other things starting with X.
|
|
|
|
|
Yes, both pages are open (being displayed) at the same time.
Any Ideas?
|
|
|
|
|
<code>Control ctrl = this.Master.FindControl(textboxID);
TextBox txt = ctrl as TextBox;
if(txt!null)
{
text = txt.Text;</code>
}
Other way could be exposing TextBox's text via public property of masterpage, cast this.Master to exact type of masterpage and access that property.
It gets tricky when you need to do this before masterpage is created, e.g in InitializeCulture() in my case, best I came up in that case was hack using hidden fields and Reqest.Form .
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
That looks like it will work, I will give it a go.
Thanks
|
|
|
|
|
Could anyone recommend a decent JavaScript obfuscator. The obvious ones suggested by Google do not seem to be working.
|
|
|
|
|
I prefer ESC, which works perfectly and is nicely documented.
-------------------------
Don't worry, be happy )
|
|
|
|
|
|
I am using php 5 and getting an error message like this
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
plz. help me how to solve it.
Bharat Bhusanam
|
|
|
|
|
Basically (and as very clearly stated), PHP Global variables no longer effect the session. What appears to have happened is that somewhere in the script there is the code:
global $GlobalVariable = "<small>In earlier versions of PHP the global variable scope used to include the session array, however that has been disabled for security reasons.</small>";
echo $_SESSION['GlobalVariable'];
Brad
Australian
- unknown PHP Developer on "Job Prospect"
Requirement: * Experience working with XML, XSL, XPath
Comment: and other things starting with X.
|
|
|
|
|
Hello,
I have a standard DHTML File Upload form (transporting the file over the post command). Now when a user clicks the submit button I don't want a new page to be loaded, I want the file to be uploaded over an AJAX call. So that not the whole page needs to be reloaded! XMLHttpRequest Object can deal with POST data, but how can I give it the POST data of the file?
With best regards,
Ben
|
|
|
|
|
|
Hello Friends,
I have a problem with recordsets.
I m getting Rs.RecordCount = -1 while calling a store procedures
here is code -
Set cmd = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.RecordSet")
cmd.ActiveConnection = myCon
cmd.CommandText = "SP_Name"
cmd.CommandType = 4
cmd.CommandTimeout = 300
cmd.Parameters.Append cmd.CreateParameter("@par1",20,1,10,1)
cmd.Parameters.Append cmd.CreateParameter("@par2",20,1,10,1)
cmd.Parameters.Append cmd.CreateParameter("@par3",20,1,10,20)
cmd.Parameters.Append cmd.CreateParameter("@par4",20,1,10,Null)
Rs.CursorLocation = 3
Rs.LockType = 1
Rs.CursorType = 3
Set Rs = cmd.Execute
Response.Write "<br>RecordCount = " & Rs.RecordCount
pls give some usefull solution.
Thanks,
Ankur Bakliwal
|
|
|
|
|
The -1 means the database driver does not support record-counts for record sets.
A quick way of achieving a record count is to use the recordset GetRows() method to extract the data into a two-dimensional array. Then you can do Ubound(arr, 2) to get the number of elements in the 2nd dimension.
Regards
Andy
|
|
|
|
|
Hi to All
I would very much like to get the width and height dimensions of the window my asp.net app is running in.
Please help !!!
Oliekrokenosterpikkelikkeastrysvoel
|
|
|
|
|
If you are getting the dimensions to size your controls or layout the page it would be best to do it in javascript so you can handle the resize event also.
document.body.clientHeight
document.body.clientWidth
only two letters away from being an asset
|
|
|
|
|
screen.availWidth and screen.availHeight
|
|
|
|
|
Thanx for the advice
I have compiled some javascript that is multibrowser compatible, if you'd like to see it look under the thread HTML Valign
Oliekrokenosterpikkelikkeastrysvoel
|
|
|
|