Re: PHP calling PHP? - Mailing list pgsql-php

From Gyozo Papp
Subject Re: PHP calling PHP?
Date
Msg-id 039e01c0d57d$b8f70a80$4647c5d5@jaguar
Whole thread Raw
In response to RE: PHP calling PHP?  ("Christian Marschalek" <cm@chello.at>)
List 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@chello.at>
To: "'Gyozo Papp'" <pgerzson@freestart.hu>
Cc: "[PHP] PostgreSQL" <pgsql-php@postgresql.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@freestart.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@chello.at>
> To: "[PHP] PostgreSQL" <pgsql-php@postgresql.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
>



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




pgsql-php by date:

Previous
From: "Christian Marschalek"
Date:
Subject: RE: PHP calling PHP?
Next
From: "Christian Marschalek"
Date:
Subject: Sessions without cookies