Is using an HTML Form the ONLY way to post a $var to $PHP_SELF?
<p>IS there a way to post a <code>$var</code> to <code>$PHP_SELF</code> so that I can use it further down the script?  </p>

<p>After 2 hours reading dozens of questions which helpfully appear in the sidebar to the right,
it became apparent that they pretty much all assume an HTML Form has been / will be
activated.</p>

<p>But psuedo~code of what I need looks more like this:</p>

<pre><code> &lt;  php
 $someVariable=y;
 $otherVar=X;

 // and the usual setup for accessing the `$_POST` of php:
 $HokeyDino=`$_POST`["SendOFF"];
 $SendOFF=101;

// etc. and then come to a point where I need the script to just automatically post a value

[  the lack of knowledge ]

// which if I had tha codez!
// would permit the use of that $var,  $HokeyDino ...

 if($HokeyDino==100){
 // do stuff
    }
</code></pre>

<p>I don't like looking foolish, but gotta ask away, because I figure I have missed learning some elementary aspect of programming, being self-taught so far, but not knowing what might be lacking makes it hard to go look productively.</p>

<p>Thanks very much!</p>

<p>EDIT //  Clarification.</p>

<p>Wow, this is amazing.  half an hour, 24 people reading the question.  Blows my mind.</p>

<p>Right.  What I have gotten done so far to give more background:</p>

<p>A php script which uses fopen to create on the fly another php / html page, and all the
code on the <em>Authouring</em> originating script, to write (a+) to the newly created temp page, the whole thing.</p>

<p>From a loop on the authouring page, I have code for retrieving POSTS I send TO that temp page, and that code gets written to a very temp page... then I cause the first part of the page to be written, to get placed on the Temp page, by put<code>_</code>contents etc.,</p>

<p>Next, from another loop on the Authouring page, I write code which item by item matches the things which were included in the <code>&lt; head &gt;</code> of the Temp page.</p>

<p>Anyhow, without graphics, it's a bit tough to explain.  What I have at the point I have gotten to so far, is the newly created/assemble Temporary page, can be accessed as a WebPage,, and a button click on it, will successfully POST a value back to the originating/Authouring script.</p>

<p>Here's the tricky part:  There isn't any way I was able to devise, to dynamically create code ON THE AUTHOURING page, to recieve POSTS from the Temp Page.</p>

<p>But I realized that if, in the Loops on the Authoring Page, I was able to <code>$PHP SELF</code> post a
string which would be the code for creating <code>a *  $Var = $ POST;</code> to catch the values from button clicks on the TEMP page, it would work.</p>

<p>Critical, is that the Authoring Page, doesn't know how many buttons will be made over on the Temp Page ~ that depends on the number of items in the database, which the loops are reading and translating into code which builds the Temp Page.</p>

<p>So, there is no way to hard~code, on the Authouring Page, all possible code for recieving posts, but I could use one Universal <code>$Var= $ POST[ X ]</code> if I could generate it on the fly in the loop, on the Authoring Page.</p>

<p>Hence the need to write code which will <code>$SELF POST</code>, and have it triggered just by normal programme flow, and not the click of a button in a form.</p>

<p>Hmm....  clear as mud yet?   :)  the question still is pretty straight foreward.</p>

<p>Cheers!</p>

<pre><code>       ////  Loop
        Create  CViewerTemp
           read DB and manipulate data
             Loop B
           create, and write to VeryTempHead page
                    code which creates the top of CViewer, HEAD items
           create, and write to VeryTempBody page
                    code which will work there, items one by one matching head items
              end Loop B
        Write code which is 1ne time only stuff, to begin CViewer.
           then transfer the stuff from VeryTempHead page, into CViewer, kill
           VeryTempHead
           then transfer the stuff from VeryTempBody to CViewer, kill Very Temp Body.
        Open CTempViwer, click on a Button, a value gets posted to Authouring Page.

         Authouring Page doesn't recieve anything, no code to do so exists  [YET! :)]
</code></pre>
