NYCPHP Meetup

NYPHP.org

[nycphp-talk] newbie - square one

John Lacey jlacey at att.net
Tue Dec 2 08:07:50 EST 2003



-sry wrote:


> So for this link, I know I would put "somepage.php?params=value"
> cause this is the syntax of a query string and how one passes params
> via HTTP, but.... in the somepage.php, what do I do? Where do 
> I put the first <?php ... ?> stuff? How do I extract "params" as
> a variable and get its user-selected value? 
> 
> The documentation seems to imply I would just put:
> 
> <?php
> $params=value;
> ...
> ?>
> 

> And since the assignment I want to do is in the BODY tag, how
> do I write the body tag with a PHP variable? like this:
> 
> <?php
> $params=value;
> echo "<BODY onLoad=\"myJavaScriptFunc(\" + $params + \");\" ";
> ?>

there's a lot going on here, but let's start with the body 
tag syntax example:

<body <?php if (isset($onload)) echo $onload; ?>>

the above is php embedded in an html tag rather than html 
being "embedded" (echo) in a php statement


so far as your debugging style, it seems to me that it is 
right on... I've always found that changing more than one 
variable at a time sometimes masks valuable information that 
could be gleaned with just a little more patience.

try putting a value in the $onload variable and observe 
results -- oftentimes that will lead to your next question 
along the discovery process

hope that helps a little
John








More information about the talk mailing list