473,320 Members | 1,829 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,320 software developers and data experts.

$_POST variable

3
Hi,

When i'am working (php) in my office and i execute a submit the variables are accessible just typing $variable, but home i have to type $_POST['variable']


What change do i have to do in php.ini to use only the variable names after a form submit

thanks in advance
Oct 1 '05 #1
5 2331
hello

i dont know if this will help, but you can try

[PHP]$variable = $_POST['variable'];[/PHP]
Jul 28 '07 #2
kovik
1,044 Expert 1GB
hello

i dont know if this will help, but you can try

[PHP]$variable = $_POST['variable'];[/PHP]
FYI, you shouldn't use variables blindly without first checking if they are set.
Jul 28 '07 #3
kovik
1,044 Expert 1GB
Hi,

When i'am working (php) in my office and i execute a submit the variables are accessible just typing $variable, but home i have to type $_POST['variable']


What change do i have to do in php.ini to use only the variable names after a form submit

thanks in advance
Then the people at your office are likely not very experienced with PHP, security holes, or proper coding standards. They have register_globals turned on, which is an extremely careless compromise of security.

I'd suggest that you direct your superiors at your office to my article on the dangers of using register_globals in PHP.
Jul 28 '07 #4
yatin
5
Hi,

When i'am working (php) in my office and i execute a submit the variables are accessible just typing $variable, but home i have to type $_POST['variable']


What change do i have to do in php.ini to use only the variable names after a form submit

thanks in advance
You can do this by using the
exec() function
Jul 28 '07 #5
kovik
1,044 Expert 1GB
You can do this by using the
exec() function
... That doesn't even make sense. :-/ What would the exec() command do?

Besides, don't encourage anyone to use register_globals, as they are unnecessarily putting themselves at risk.
Jul 28 '07 #6

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

Similar topics

10
by: Jack | last post by:
How would I add a variable that I will assign to a list of $_POST variables that I extract from a form? My form passes a value for $q. That works fine. What I want to do is run an if/else on it...
10
by: arun.kumar.varma | last post by:
Hi, I'm learning PHP and prepared a simple login form. validate.php does the validation and it was behaving erratically. So, I did var_dump of $_POST variable and it's NULL. Did I miss anything...
15
by: zorro | last post by:
greetings... I'm wondering what more advanced coders would think ot this: $_POST = clean($_POST); and now I can use POST directly: $sql= "select * from T1 where myvar='$_POST' " ;
5
by: lorenzdominic_ | last post by:
Hi Recently I have been developing a form that uses the _POST variable. Today the _POST variable was empty everytime I submitted my form however I changed the post method to be GET and the...
17
by: john | last post by:
All: I'm a long-time developer, new to PHP.... Is there an idiom used in PHP to construct SQL statments from $_POST data? I would guess that in many applications, the data read from $_POST...
7
by: amygdala | last post by:
Hi all, I'm starting this new project in which I'ld like to implement sort of a design pattern I have seen being used in the CodeIgniter framework. Basically, the site will examine the URI and...
2
by: keeps21 | last post by:
I have a script that recieves an id number via the address bar when a link is clicked. ie . index.php?id=1 if the link was for the story whose ID is 1. My script checks if a user is logged in,...
10
by: Mason Barge | last post by:
I have a standard POST form consisting of two types of input: text input and textarea. The form downloads current settings from a mysql database. The user can update the information by modifying...
7
by: lawpoop | last post by:
Hello all - Is there a way to get a nested array in a $_POST variable? I have a form where there are several questions, each one corresponding to a database row. On submission of the form, I...
32
by: Bill H | last post by:
I wouldn't consider myself a newbie to PHP since I have never written one line of code in it (am a perl guy myself), but part of a team I am working with is writing some php interfaces into a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.