Andrew,

Close :-)

    <a href='page_two.php?id=1'>click</a>

OR to complicate matters, add multiple names/values  :

    <a href='page_two.php?id=1&foo=stuff&blah=shoes'>click</a>

Where on page_two.php if you had :

    echo "$id $foo $blah";

Will print the following :

    1 stuff shoes

Note the ? for first name=value and & for the proceeding ones.  Or you may
have been trying to do :

    $id = 1;

    echo "<a href='page_two.php?id=$id'>click</a>";

OR can also be written as :

    $id = 1;

    <a href='page_two.php?id=<?php echo $id; ?>'>click</a>

And both the above will turn into :

    <a href='page_two.php?id=1'>click</a>

That's the gist.  Check out devshed.com for some basic php tutorials.
Also, be sure to check out :

    http://www.zend.com/zend/tut/using-strings.php

For various forms of syntax with strings.


Philip


On Wed, 17 Jan 2001, andrew wrote:

> How can I pass an anchor tag attribute to a page?
> e.g. If I want to echo "1" on page_two:
> 
> 
> page_one.php contains:
> 
> <a href="page_two.php" > <? $id="1"?>click</a>
> 
> 
> page_two.php contains:
> 
> <? echo($id); ?>
> 
> but page_two is coming up blank after a delay... what I am doing wrong?
> 
> 
> thanks,
> andrew
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to