Re: html and php



J.O. Aho wrote:

Gaga wrote:
echo "<a href='user_edit.php?id={$row_dbUsers['id']}'>edit</a>";
If i want to add color or other effect to this link i get all the
time parse error.
I have tryed with normal font color, size, mouseover but all the
time... parse error.



echo "<a href=\"user_edit.php?id={$row_dbUsers['id']}\"
style=\"color: green; font-size: larger;\"
mouseover=\"javascript_function(); return true;\">edit</a>"

or

echo <<<EOF
<a href="user_edit.php?id=
EOF;
echo $row_dbUsers['id'];
echo <<<EOF
" style="color: green; font-size: larger;"
mouseover="javascript_function(); return true;">edit</a> EOF;

You could also present the second version like this:

echo <<<EOF
<a href="user_edit.php?id=${row_dbUsers['id']}" style="color: green;
font-size: larger;" mouseover="javascript_function(); return
true;">edit</a>
EOF;

--
Kim André Akerø
- kimandre@xxxxxxxxxxxxxxxxxx
(remove NOSPAM to contact me directly)
.



Relevant Pages

  • Re: html and php
    ... time parse error. ... I have tryed with normal font color, size, mouseover but all the ...
    (alt.php)
  • Re: html and php
    ... time parse error. ... I have tryed with normal font color, size, mouseover but all the ... echo <<<EOF ...
    (alt.php)
  • How to disable link to current page?
    ... Parse error: parse error, unexpected '"', expecting '}' in ... to it's own php file, then you have only one place to change things at, ... echo typeLink; ... I'm not supplying any different alt values, as alt are just used to tell ...
    (alt.php)
  • Re: Parse error from bad variable?
    ... > But somehow, I must have done something else wrong, again, I'm sure with the ... > brackets in the proper locations. ... I'm getting a parse error on a similar line. ... > echo "I'm sorry. ...
    (alt.php)
  • Re: html and php
    ... Gaga wrote: ... time parse error. ... I have tryed with normal font color, size, mouseover but all the ...
    (alt.php)