coolearner Posted January 30, 2007 Share Posted January 30, 2007 Hi,I am currently running Xamp or Wamp and now on a few occasions, identical Php scripts sometimes don't respond the same. I am training myself with a Php books the code is from there.Anyway, how 2 identical Php scripts (about a simple form) one works the other one doesn't?Did anyone experience that? Has David Copperfield retired because there might be some work left for him :-\,echo =---= Pascal Quote Link to comment https://forums.phpfreaks.com/topic/36253-identical-php-scripts-forms-one-is-working-another-one-is-not/ Share on other sites More sharing options...
AndyB Posted January 30, 2007 Share Posted January 30, 2007 I bet that you're expecting register_globals to be on ... and the more up-to-date php version came with register_globals set to OFF (the more secure setting). How are these identical scripts retrieving data? Quote Link to comment https://forums.phpfreaks.com/topic/36253-identical-php-scripts-forms-one-is-working-another-one-is-not/#findComment-172368 Share on other sites More sharing options...
coolearner Posted January 30, 2007 Author Share Posted January 30, 2007 It might have to do with this register global.I am not very confortable on how to configure things through Xamp, I find it easier Php, MySql, Apache as standalone modules but my last installation wouldn't work so I had to install Xamp if I didn't want to lose time on this as I am learning Php by writting as many scripts a I can and some scripts from my previous installation are now working on this installation and oddly vice versa.Here is the line that make my head spin a little:<form action ="<?=$_SERVER['PHP_SELF']?>" method="POST">should be?<form action="<?php echo($_SERVER['PHP_SELF']); ?>" method="POST">Until lately the first one wasn't working and since this eveningn it's working.I am too tired now to give it more than 2 sec long thoughts// Quote Link to comment https://forums.phpfreaks.com/topic/36253-identical-php-scripts-forms-one-is-working-another-one-is-not/#findComment-172379 Share on other sites More sharing options...
AndyB Posted January 30, 2007 Share Posted January 30, 2007 Ah, and [b]short tags[/b] might be enabled on one setup and not the other. Code as if register_globals is OFF. Code as if short_tags don't work. Your code will then work on far more server set-ups, and you won't lose sleep or hair :) Quote Link to comment https://forums.phpfreaks.com/topic/36253-identical-php-scripts-forms-one-is-working-another-one-is-not/#findComment-172404 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.