Mailinglist Archive: opensuse (769 mails)

< Previous Next >
Re: [opensuse] Submitting parameters to php
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Thu, 05 May 2016 20:59:46 +0200
  • Message-id: <ngg572$2k9$2@saturn.local.net>
Wolfgang Mueller wrote:

On 05/05/16 19:08, Per Jessen wrote:

Wolfgang Mueller wrote:

By default submitting parameters to php is not possible.

Wolfang, can you explain what you mean by "submitting parameters to
php"? As we are in apache mode, parameters to php are usually
specified on the URL:

http://your.site/phpscript?parm1=wolfgang&parm2=anton

This URL gives an excellent example of what I mean with "submitting
parameters to php": The data submitted to phpscript are:

$parm1 = "wolfgang"; $parm2 = "anton";

You access those through $_GET[]

So, if I understand you well, I have to write $_GET["parm1"] and
$_GET["parm2"] instead of simply $parm1 and $parm2. Is that correct?

Yep, that is correct.

Previously, this option could be turned on by setting

register_globals = On

Register_globals is gone as of php 5.4.0.

That's a pity because the $_GET[] syntax is a little bit lengthy.
Anyway, thanks a lot.

Are you new(ish) to PHP? I've been using PHP on apache for maybe ten
years and I've never used "register_globals", I've always considered it
a bad practice.



--
Per Jessen, Zürich (15.1°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >