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="resulta at.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_global s 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_global s on?
I tried (being a newby) $_GET["teller'] but that did not work.
Thanks in advance, Edward 2 2042
"edward hage" <ed**@xs4all.nl > wrote in message
news:3f******** *************@n ews.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="resulta at.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_global s 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_global s 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
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******** ************@tw ister.nyc.rr.co m... "edward hage" <ed**@xs4all.nl > wrote in message news:3f******** *************@n ews.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="resulta at.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_global s 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_global s 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 a form via POST
From that I get a results list screen, based on data I submit via a
form from the search screen
In the results list screen, I have a button next to each record for
|
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 something like this.
I bring up the first site and navigate around. Everything is okay. The
stylesheets are correct and so on and so forth. When I click on a link to go
to the other site from the first site (I create a new instance of the
browser),...
|
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 but what method would I
use to load the entries from the xml file into memory and make them quickly
accessible globally in the web code? Just need to know what functions
specifically I should start reading about!
Thx
|
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 event is fired by one of the controls contained in the User Control, these variable are reset. Here is my current code (I have a little more to add later, right now I am just concerned about the variables getting reset):
Public Class DatePicker2...
|
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 variable(s) data assigned to
them. I can't figure out why. I've read that other people are having this
problem too but I haven't found a resolution yet. Can someone please tell me
how I might go about fixing this?
Thanks
| |
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 happening?
For example (VS2005, IE6/7, running in filesystem):
- In the Page_load of page1.aspx:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Throw New Exception("Error is thrown")
End Sub
|
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 $MYVAR, $a;
?>
|
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 created and then added to "component" objects to
build up the component definition.
My dilemma comes in deciding how to read/write data to the "item"
|
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), inside the
Session_Start event of the global.asax.vb file, since this variable is
accessed by almost all the pages in the project. Besides this
variable, there are other session variables which are set in the
various aspx pages, as needed.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |