Click to See Complete Forum and Search --> : prase error


kproc
11-12-2006, 08:08 AM
below is code that I'm trying on my for action. I cannot get the variable to work at the end of the url. The problem is with the ' $row_get_buddy['first_name']

any ideas how to fix this


<form name="setgiver" method="post" action="<?php echo "../wishlist/codesetgiver.php?wish=$row_get_buddy['first_name']";?>">


I get this error


Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\xampp\htdocs\familyclick\wishlist\buddywishlist.php on line 84

so_is_this
11-12-2006, 08:43 AM
action="<?php echo '../wishlist/codesetgiver.php?wish='.$row_get_buddy['first_name']; ?>"

Zipline
11-12-2006, 08:56 AM
This would work also


action="<?PHP echo("../wishlist/codesetgiver.php?wish={$row_get_buddy['first_name']}"); ?>"


or


action="../wishlist/codesetgiver.php?wish=<?PHP echo($row_get_buddy['first_name']); ?>"