seany123 Posted May 14, 2009 Share Posted May 14, 2009 echo "<b><font color=\"$color\"><a href='../profile.php?id=" $username \"'></b></td>"; am I missing a \ or something?? Quote Link to comment Share on other sites More sharing options...
Zhadus Posted May 14, 2009 Share Posted May 14, 2009 Forgot to escape the first double quote before the username variable. <?php echo "<b><font color=\"$color\"><a href='../profile.php?id=\"$username\"'></b></td>"; ?> Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted May 14, 2009 Share Posted May 14, 2009 echo "<b><font color=\"".$color."\"><a href=\"../profile.php?id=".$username."\"></b></td>"; or PHP5 echo "<b><font color=\"{$color}\"><a href=\"../profile.php?id={$username}\"></b></td>"; Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted May 14, 2009 Share Posted May 14, 2009 Forgot to escape the first double quote before the username variable. <?php echo "<b><font color=\"$color\"><a href='../profile.php?id=\"$username\"'></b></td>"; ?> this works too but i prefer to have definition actualy thats still wrong <a href='../profile.php?id=\"$username\"'> WRONG CORRECT <a href=\"../profile.php?id=$username\"> <a href=\"../profile.php?id=".$username."\"> <a href=\"../profile.php?id={$username}\"> Quote Link to comment Share on other sites More sharing options...
Zhadus Posted May 14, 2009 Share Posted May 14, 2009 Yeah, I didn't read through it as well as I should have, instead of forgetting the escape, should have just removed it completely. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted May 14, 2009 Share Posted May 14, 2009 Yeah, I didn't read through it as well as I should have, instead of forgetting the escape, should have just removed it completely. yeh i guess the more you have to do it the easier its to spot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.