Re: can't work out the syntax error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Ross wrote:

Hi,

The line was 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...

try this:

echo "<TD WIDTH=\"25%\" ALIGN=\"CENTER\">
<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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux