473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Send variable to a page without sessions, post or cookies?

i want to send data one page to another page without session cookies arrey or post get so please tell me another way
Jul 23 '12 #1
5 2921
Rabbit
12,516 Expert Mod 8TB
I think you just eliminated every option.
Jul 24 '12 #2
lyodmichael
75 64KB
there is one last option save it in a database then load it, you don't have any choice :) .

#tip
Jul 24 '12 #3
computerfox
276 100+
You're REALLY limiting yourself there. Using a database to pass around data, I think, is a horrible idea because the database will grow and grow and you also have to make sure that you're keeping track.

Your main options are:

1-Get
2-Post
3-Cookies
4-Sessions

Get will keep all the data entered in the URL, not safe, not elegant.

POST will require some type of a form to pass the data around.

Cookies are probably the safest, but unless you give it an expiration, it will be there. You can also set the time to 0, which means that the cookie will be killed at the end when the browser is closed

Sessions are probably the safest because it generates a random id for the session, it automatically gets killed when the browser closes.

There's honestly no other method and these are the web standards. What is it exactly you are trying to pass around? 0_o
Jul 30 '12 #4
you can sent values through address bar..
using..
Expand|Select|Wrap|Line Numbers
  1. //index page
  2.  
  3. <form method="post">
  4. <input type="text" name="_text1">
  5. <input type="text" name="_text2">
  6. <input type="text" name="_text3">
  7.  
  8. <button type="submit" value="go">Submit</button>
  9. if(isset['go'])
  10. {
  11. header("location:two.php?val1=$_text1&val2=$_text2
  12. &val3=$_text3");
  13.  
  14. }
  15. //click the submit button
  16. //you get the three text vales in two.php
  17.  
Aug 2 '12 #5
Dormilich
8,658 Expert Mod 8TB
Sessions are probably the safest because it generates a random id for the session, it automatically gets killed when the browser closes.
to be precise, it’s the session cookie, that gets killed. the session itself is "killed" through the session garbage collector (GC), which depends on the session lifetime (the time after the last access, where the GC doesn’t touch the session) and some GC settings (how often the GC is invoked)

sessions still are the best option.
Aug 6 '12 #6

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

Similar topics

6
by: Anonymous | last post by:
Hi! I've got an unusual problem here. I'm trying to write a PHP script that behaves like a web client. Why? I want to automatically check specific URLs for changes. I'm using...
5
by: Ikke | last post by:
I have to share a variable between browser sessions. One session for example changes the variable, the other sessions must see the changes (get the new value instead of the original value) it's...
5
by: RICHARD BROMBERG | last post by:
I am already using ASP/Cdonts to send the contents of a Form by e-mail and would like to include a link on my page to send the page itself by e-mail to a named recipient. Can anyone start me in...
7
by: Atte André Jensen | last post by:
Hi I'm developing a site where I'd like to store information during a users visit. So far I've been using sessions, but as far as I can tell it's not possible to control for how long a session...
10
by: Aj Blosser | last post by:
Hey guys, I have a question for you, I have a setup where I'm sending files through the POST to a php web page, I read the file contents, put that file contents as text into the POST string, and...
5
by: frothpoker | last post by:
Guys, I have a couple of issues which I am hoping you can provide guidance on... First one:- Is there any way to retain the $_POST values when a user navigates between pages without using...
3
by: ziana | last post by:
Hi all, What is the disadvantages of using GET/POST/COOKIES in php? What's the different when i use global below included in each files?, i can pass all the parameter without $_POST etc. and...
5
by: Sin Jeong-hun | last post by:
Hi. I would like to let users send bug reports or other messages to me. Maybe the easiest way to send e-mails from my application is just use the default e-mail agent by executing a link...
1
by: everlives | last post by:
Hello Please help me any one. i am trying to send variable from scroll pane in Flash 8 to PHP But i am not getting the value "undefined": the code as follows: // create an xml object...
1
pradeepjain
by: pradeepjain | last post by:
Hii, I am starting to learn about sessions and cookies...i need some help or suggestions I have a form where in a user fills the form and then previews the page which is the second page...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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
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
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...
0
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
isladogs
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...

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.