hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Interesting Script Issu
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Interesting Script Issu

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 12-09-2003, 07:04 PM
WLHosting WLHosting is offline
Web Hosting Guru
 
Join Date: Mar 2003
Location: South Bend, Indiana, USA
Posts: 320

Interesting Script Issu


Hello,

A part of a clients script is not passing the variables correctly. The code is used on many other servers and it is not working on this. I am sure there is a server config issue. So the problem is that if you have some code that looks similar to the following it will not go to the $action=="login" part.

PHP Code:
if($action=="login") {
echo 
'bla bla';
} else {
echo <<<END
<form action="$PHP_SELF?action=login" method="post">
form contents ....
<input type="submit">
</form>
END;

This is similar to the code and it works on every other server I have worked with but not this. Any thoughts.

Thanks!

__________________
Daniel
WLScripting.com - php scripts and tutorials

Reply With Quote


Sponsored Links
  #2  
Old 12-09-2003, 07:56 PM
kostagr33k kostagr33k is offline
WHT Addict
 
Join Date: Jan 2003
Posts: 124
If your accessing the variable $action globally .. that could be the problem if that's disabled ... do a phpinfo so we can see please =]



Kosta

Reply With Quote
  #3  
Old 12-09-2003, 08:05 PM
WLHosting WLHosting is offline
Web Hosting Guru
 
Join Date: Mar 2003
Location: South Bend, Indiana, USA
Posts: 320
I was not thinking now and I finally remembered that I could try a $_GET['action'] instead of just $action and that works now. So I now have to go code things a little differently now. Thanks for your help.

__________________
Daniel
WLScripting.com - php scripts and tutorials

Reply With Quote
Sponsored Links
  #4  
Old 12-09-2003, 08:10 PM
kostagr33k kostagr33k is offline
WHT Addict
 
Join Date: Jan 2003
Posts: 124
no problem =]

Reply With Quote
  #5  
Old 12-10-2003, 01:53 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
The bigger issue here is that register_globals has been disabled by default on newer PHP installs (because of inherent security problems with register_globals). That's why your variable isn't being created. New arrays that are always global (autoglobals or superglobals) that are available are $_GET $_POST $_SERVER $_REQUEST $_FILES $_COOKIE and $GLOBALS which contains variables that are defined globally by you. I think that's all of them but you can verify at the manual.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Cisco Researcher Discovers Possible Exploit Vector for DarkLeech Attacks Web Hosting News 2013-04-26 10:19:35
Pingdom Talks Top Web Hosting Cities and Countries Web Hosting News 2013-03-27 18:49:54
Whistleblower Site Cryptome Hacked, Infects PCs with Drive-By Exploits Web Hosting News 2012-02-14 14:48:24
Control Panel cPanel Launches New Apache Configuration Script Web Hosting News 2011-12-28 19:41:39
Web Host JaguarPC Adds Auto-Installer Softaculous to Hosting Plans Web Hosting News 2011-07-27 18:55:46


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?
Advertisement:
Web Hosting News:



 

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?