Re: PHP calling PHP?

From: "Gyozo Papp" <pgerzson(at)freestart(dot)hu>
To: "Christian Marschalek" <cm(at)chello(dot)at>
Cc: "[PHP] PostgreSQL" <pgsql-php(at)postgresql(dot)org>
Subject: Re: PHP calling PHP?
Date: 2001-05-05 16:09:10
Message-ID: 039e01c0d57d$b8f70a80$4647c5d5@jaguar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hello,

your last question is more than interesting.
You can try the code below and just look what is happening!

Seriously, If you use either $HTTP_POST_VARS or $HTTP_GET_VARS (respect to the action)
1: you can access the variable with its original name ($HTTP_POST_VARS['foo*bar'], in my example),
2: but you can't refer to it as a common global variable like : $foo*bar.
3: much more interesting with variable variables, try and see. I don't say annything ... :)

<?php
var_dump($HTTP_POST_VARS['foo*bar']); // example for 1
var_dump($foo*bar); // syntax error: constant bar is not defined
$var= 'foo*bar';
var_dump($$var); //work around with variable variables
?>
<form method=post action="<? echo $PHP_SELF ?>">
<input type="text" name="foo*bar" value='a'>
<input type="submit">
</form>

----- Original Message -----
From: "Christian Marschalek" <cm(at)chello(dot)at>
To: "'Gyozo Papp'" <pgerzson(at)freestart(dot)hu>
Cc: "[PHP] PostgreSQL" <pgsql-php(at)postgresql(dot)org>
Sent: 2001. május 5. 17:40
Subject: RE: [PHP] PHP calling PHP?

That's excatly what I needed :)

Thanks.

Another one:

If I have a html form an in it a text field with the a name like this:
name="foo*bar"
How would I refer to it in my php script? Normaly variable names have no
* in them, do they?:)

Chris

> -----Original Message-----
> From: Gyozo Papp [mailto:pgerzson(at)freestart(dot)hu]
> Sent: Saturday, May 05, 2001 3:33 PM
> To: Christian Marschalek; [PHP] PostgreSQL
> Subject: Re: [PHP] PHP calling PHP?
>
>
>
> if (! $ok )
> {
> // register your variables with the current session
> // in order that you are able to use it in the other page
> (fillin.php)
> Header("Location: fillin.php");
> exit;
> }
>
> see header() function in the manual!
> and I
>
> ----- Original Message -----
> From: "Christian Marschalek" <cm(at)chello(dot)at>
> To: "[PHP] PostgreSQL" <pgsql-php(at)postgresql(dot)org>
> Sent: 2001. május 5. 14:51
> Subject: [PHP] PHP calling PHP?
>
>
> > Hi!
> >
> > Let's say I want to insert some data into my db and I want
> to be sure
> > that the user fills out alle the requiered fields.
> >
> > I'm thinking of that: I want to pass the data to a PHP
> script and if
> > there's something missing I want to call the input PHP script again
> > but this time with the already inserted data. I can I call a link
> > inside a PHP script without having the user to click on it?
> >
> > Tia Chris
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
>

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Christian Marschalek 2001-05-06 22:21:58 Sessions without cookies
Previous Message Christian Marschalek 2001-05-05 15:40:47 RE: PHP calling PHP?