Entry
how do i send a send a variable to a new html page that will dynamically use it
Jul 15th, 2003 06:46
Lyon O, ben reece,
Well, you start off by passing a variable to the new web page either by
using a hidden value in a form or the URL. I usually use the URL like
this: $i is the variable you want to pass to web.html, so <a
href="web.html?i=yes">link</a> would cause $i to equal "yes" on
web.html.
To make the page dynamically pick up the variable, you would simply use
an if statement. Let's say you want to use $_SERVER[PHP_SELF]. This
comes in handy because you could then say if($i) { blah, blah } or if(!
$i) {}. This method works very well. Hope I helped.