Jump to content

Recommended Posts

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
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?
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//

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 :)
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.