Quote:
Originally Posted by NullPointer
I see three things wrong here, the main one is that you forgot to call echo (or print).
The second one is that you are using short tags (<?), this won't cause a problem in your case, but you still shouldn't do it (some PHP installations do not have short tags enabled).
The third is that it is unnecessary to surround your variable with quotes. This also won't cause a problem, but there is no point in doing it.
This is what the code should look like:
PHP Code:
<?php echo $id; ?>
|
Thanks for your reply.
If I do not use href situation I can see the ID value.
<span class="style2><?php echo $id ?>"></span>
even without this ;
Immediatley I add the href, disappears the ID value
I've tried...
1.
<span class="style2"><a href="main3.php?id=<?php echo $id; ?>"></a></span> FAIL
2.
<span class="style2"><a href="main3.php?id=<?php echo "$id"; ?>"></a></span> FAIL
3.
<span class="style2"><a href='main3.php?id=<?php echo $id; ?>'></a></span> FAIL
4.
<span class="style2"><a href='main3.php?id=<?php echo '$id;' ?>'></a></span> FAIL
The Dream Weaver keeps giving me the code with yellow color underneath sayni that is en error.
But I cannot find where.
|