hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : content of forms not sent
Reply

Forum Jump

content of forms not sent

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Disabled
 
Join Date: Jul 2002
Posts: 100

content of forms not sent


Im having a strange problem...

I have moved a few sites to a new server, and suddently the forms have stopped working.

The forms were working fine on all my other severs but on this one the content that is filled in online on the form is not included in the mails i get.

Have any of you seen this problem before?

Ive pretty sure its not a scripting problem, ive tried with several scripts, all with the same result.

I really need your help here - so pls get back to me if you've got the slightest idea

thanks



Sponsored Links
  #2  
Old
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
Ah this one again

Let me guess you are trying to call a form field called 'test' via $test and it doesn't work?

Try calling it as $_POST['test']

The method of calling variables such as this was changed in php 4.1.0 and set to the new method by default in PHP 4.2.0.

http://www.php.net/manual/en/languag...predefined.php

  #3  
Old
Web Hosting Master
 
Join Date: Nov 2001
Posts: 857
EDIT: Well it seems someone answered just before me...


Regards,
Michael

__________________
<?
header("Location: http://www.hostevolve.com/");
?>

Sponsored Links
  #4  
Old
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
Quote:
Originally posted by michaeln
EDIT: Well it seems someone answered just before me...

  #5  
Old
Web Hosting Master
 
Join Date: Nov 2001
Posts: 857
Actually register globals is what I meant to put. However seeing as I only got a few hours of sleep safe mode seems to have come out instead. Which I suppose in a certain light that would be safe mode... LOL

__________________
<?
header("Location: http://www.hostevolve.com/");
?>

  #6  
Old
Web Hosting Master
 
Join Date: Jan 2002
Location: Atlanta, GA
Posts: 1,249
Quote:
Originally posted by Rich2k
Ah this one again

Let me guess you are trying to call a form field called 'test' via $test and it doesn't work?

Try calling it as $_POST['test']

The method of calling variables such as this was changed in php 4.1.0 and set to the new method by default in PHP 4.2.0.

http://www.php.net/manual/en/languag...predefined.php
Why was this done?
If my shared enviroment is upgraded all 100,000+ lines of code I've written on my site would become dead and useless...

When was this a standard for coding in forms?
What is the difference btwn accessing $stupid_var and $_GET['stupid_var'] or $_POST['stupid_var']?
Why didn't they make the new version backword compatiable?

__________________
char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 }main (){void (*f)() = x;f();}
I wear a gray hat

  #7  
Old
Web Hosting Master
 
Join Date: Nov 2001
Posts: 857
Well the server owner can go into the php.ini file and turn register_globals on.

__________________
<?
header("Location: http://www.hostevolve.com/");
?>

  #8  
Old
Web Hosting Master
 
Join Date: Jan 2002
Location: Atlanta, GA
Posts: 1,249
Quote:
Originally posted by michaeln
Well the server owner can go into the php.ini file and turn register_globals on.
Is there a command I can place in a header.php file that will turn on this option during the execution of my script...?

__________________
char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 }main (){void (*f)() = x;f();}
I wear a gray hat

  #9  
Old
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
No only your server admin can change this directive.

It has been possible to use this method since PHP 4.1.0 when they informed programmers they were going to change it.

It has been done as a matter of security and here is the answer direct from the PHP.net manual

Quote:
By turning off the ability for any user-submitted variable to be injected into PHP code, you can reduce the amount of variable poisoning a potential attacker may inflict. They will have to take the additional time to forge submissions, and your internal variables are effectively isolated from user submitted data.

While it does slightly increase the amount of effort required to work with PHP, it has been argued that the benefits far outweigh the effort.
In saying that however, most hosts I have come across still run PHP with Register_globals turned on... however I suspect that eventually they will turn it off as well.... however the default PHP installation setting is to turn it off.

  #10  
Old
Junior Guru Wannabe
 
Join Date: Sep 2002
Location: Canada
Posts: 35
Quote:
Originally posted by Studio64

Why was this done?
Well before let's say you wanted to get the data from a cookie called lets say "qwe" you would simply use the variable $qwe but imagine if someone wanted to mess up with your script and find security holes he would be able to type Page_Name.php?$qwe=fake_cookie_data. It could make serious security holes when you think of logins and use cookies and such...

__________________
EZScripts - Quality PHP Scripts, Low Price (includes Custom Scripting on request.)
http://www.EZScripts.net/

  #11  
Old
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
And it still makes it securer even if you do have register globals on if you program correctly... e.g.

$cookievar = $_COOKIE['cookievar']

That way no one can fake a cookie using a query string.

Reply

Related posts from TheWhir.com
Title Type Date Posted
Swarmify's New Approach to Content Delivery Uses Site Visitors to Accelerate Content Web Hosting News 2014-05-01 08:34:03
Apple to Build Content Delivery Network: Reports Web Hosting News 2014-02-04 09:26:34
Lead Generation Part 4 – Go it Alone Blog 2014-08-14 15:20:55
Lead Generation Part 2 – Content Syndication Blog 2012-12-12 12:37:59
Lead Generation Part 1 – Form Fills Blog 2012-11-16 09:03:48


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?