473,403 Members | 2,071 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,403 software developers and data experts.

getting variables from one page to the other

Hello, I am new to PHP and I have the following problem.

In one php page I define some variables $teller, $budget. Also I ask for
some input from the user:

<FORM ACTION="resultaat.php" METHOD=POST>
<INPUT TYPE="Text" NAME="gemaakt" MAXLENGTH=3 SIZE=4 VALUE="0">
<INPUT TYPE="Text" NAME="verwacht" MAXLENGTH=3 SIZE=4 VALUE="0">
etc.

Now that I posted the input, resultaat.php is started. I can get the
variables $_POST["gemaakt"] and $_POST["verwacht"] but not $teller and
$budget.

Now I know that has to do with the setting register_globals that is set
off. That is for safety okay, my question:

Is there a safe way to get the variables $teller and $budget also usable
/known in resultaat.php without putting register_globals on?

I tried (being a newby) $_GET["teller'] but that did not work.

Thanks in advance, Edward

Jul 17 '05 #1
2 2022
"edward hage" <ed**@xs4all.nl> wrote in message
news:3f*********************@news.xs4all.nl...
Hello, I am new to PHP and I have the following problem.

In one php page I define some variables $teller, $budget. Also I ask for
some input from the user:

<FORM ACTION="resultaat.php" METHOD=POST>
<INPUT TYPE="Text" NAME="gemaakt" MAXLENGTH=3 SIZE=4 VALUE="0">
<INPUT TYPE="Text" NAME="verwacht" MAXLENGTH=3 SIZE=4 VALUE="0">
etc.

Now that I posted the input, resultaat.php is started. I can get the
variables $_POST["gemaakt"] and $_POST["verwacht"] but not $teller and
$budget.

Now I know that has to do with the setting register_globals that is set
off. That is for safety okay, my question:

Is there a safe way to get the variables $teller and $budget also usable
/known in resultaat.php without putting register_globals on?

I tried (being a newby) $_GET["teller'] but that did not work.

Thanks in advance, Edward

Yep, with sessions.

--
Sharif Tanvir Karim
http://www.onlyonxbox.net
Jul 17 '05 #2
If they're not sensitive, put them into the form as hidden fields and then
you should be able to get them through $_POST.

Peter.

"Sharif Tanvir Karim" <sh****@nyc.rr.com> wrote in message
news:bD********************@twister.nyc.rr.com...
"edward hage" <ed**@xs4all.nl> wrote in message
news:3f*********************@news.xs4all.nl...
Hello, I am new to PHP and I have the following problem.

In one php page I define some variables $teller, $budget. Also I ask for
some input from the user:

<FORM ACTION="resultaat.php" METHOD=POST>
<INPUT TYPE="Text" NAME="gemaakt" MAXLENGTH=3 SIZE=4 VALUE="0">
<INPUT TYPE="Text" NAME="verwacht" MAXLENGTH=3 SIZE=4 VALUE="0">
etc.

Now that I posted the input, resultaat.php is started. I can get the
variables $_POST["gemaakt"] and $_POST["verwacht"] but not $teller and
$budget.

Now I know that has to do with the setting register_globals that is set
off. That is for safety okay, my question:

Is there a safe way to get the variables $teller and $budget also usable
/known in resultaat.php without putting register_globals on?

I tried (being a newby) $_GET["teller'] but that did not work.

Thanks in advance, Edward

Yep, with sessions.

--
Sharif Tanvir Karim
http://www.onlyonxbox.net

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steve | last post by:
I'm working in PHP, but am also using JavaScript, so perhaps there is a better way to do this using more PHP code...... I setup a search screen for my database, the user enters data and submits...
4
by: Rahul Chatterjee | last post by:
Hello All I have 2 websites both using different style sheets (.css). The stylesheets are stored in a session variable and get set at the time the site gets invoked. What is happening is...
17
by: Davíð Þórisson | last post by:
now in my web I have some global variables to be used in many different subpages, in the old ASP I simply loaded a variables.asp file into memory using the eval() function. Now I'd like to use XML...
5
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
9
by: Randy | last post by:
Hello, I'm having a strange problem. I've got a .NET web app which uses Session variables. Sometime, not all the time, they get cross threaded...that is...one user will have another user's Session...
2
by: ronchese | last post by:
I'm noticing this since I started developing a website project: my session variables are getting empty! I did a real easy test, and I checked my session variable is getting empty!! What is...
5
by: Sandman | last post by:
I dont think I understand them. I've read the section on scope in the manual inside out. I'm running PHP 5.2.0 Here is the code I'm working on: //include_me.php <?php $MYVAR = array(); global...
41
by: Jim | last post by:
Hi guys, I have an object which represents an "item" in a CMS "component" where an "item" in the most basic form just a field, and a "component" is effectively a table. "item" objects can be...
0
by: tharika_c | last post by:
Hi, We have a simple ASP.NET web application where one of the Session variables, called Session("SSO_ID") gets created and assigned a value (equal to the HTTP_HRID request variable value),...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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,...

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.