pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gyozo Papp <pgerzson@freestart.hu>
To: Christian Marschalek <cm@chello.at>
Cc: [PHP] PostgreSQL <pgsql-php@postgresql.org>
Subject: Re: PHP calling PHP?
Date: Sat, 5 May 2001 18:09:10 +0200
Message-ID: <039e01c0d57d$b8f70a80$4647c5d5@jaguar> (raw)
References: <000001c0d579$c1874240$0200a8c0@server>

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
> 





view thread (17+ messages)  latest in thread

Message-ID: <039e01c0d57d$b8f70a80$4647c5d5@jaguar>
Permalink:  ../039e01c0d57d$b8f70a80$4647c5d5@jaguar/
Also on:    postgresql.org/message-id/039e01c0d57d$b8f70a80$4647c5d5@jaguar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: pgerzson@freestart.hu, cm@chello.at
  Subject: Re: PHP calling PHP?
  In-Reply-To: <039e01c0d57d$b8f70a80$4647c5d5@jaguar>
  References: <000001c0d579$c1874240$0200a8c0@server> <039e01c0d57d$b8f70a80$4647c5d5@jaguar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox