Re: can't work out the syntax error
| From: | Brad Bonkoski | Date: | Thu, 04 May 2006 12:38:40 +0000 |
| Subject: | Re: can't work out the syntax error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235490@lists.php.net to get a copy of this message | ||
Ross wrote:
Hi, The line was this..... echo "<TD WIDTH=\"25%\" ALIGN=\"CENTER\">try this: echo "<TD WIDTH=\"25%\" ALIGN=\"CENTER\"><A HREF=\"javascript:open_window('$PHP_SELF?action=view_record&userid=$userid');\">View</A> <A HREF=\"$PHP_SELF?action=delete_record&userid=$userid\" onClick=\"return confirm('Are you sure?');\">Delete</A></TD>\n";I have registered globals off so tried this... echo "<TD WIDTH=\"25%\" ALIGN=\"CENTER\"><A HREF=\"javascript:open_window('$_SERVER['PHP_SELF']?action=view_record&userid=$userid');\">View</A>I would go with your second option here...
<A HREF=\"javascript:open_window('".$_SERVER['PHP_SELF']."?action=view_record&userid=$userid');\">View</A>
-------------------------------------------^-------------------------------^
concatenate the $_SERVER variable to the string...
HTH
-Brad
What is the problem with it? R.