fonecave Posted November 7, 2007 Share Posted November 7, 2007 I HAVE A STANDALONE PHP FILE THAT IM TRYING TO GET TO PUT A HYPERLINK ON THE MAIN PAGE IF A VARIABLE IS TRUE. BUT I CANT FIGURE OUT HOW TO GET IT ON THE MAIN PAGE. ON THE MAIN PAGE i REFERENCE TO THE PHP FILE BY USING <SCRIPT>...BLAHBLAH WHICH WORKS FINE BUT WHEN IT COMES TO TRYING TO GET THE PHP FILE TO ECHO A LINK ON THE MAIN PAGE IT WONT WORK! I HAVE TESTED THE IF STATEMENTS ITS FINE I JUST CANT GET THE LINK TO PRINT I KNOW THAT THE CODE BELOW WOULD PRINT THE HREF TO THE FILE ITSELF AND NOT TO THE PAGE I LINK IT TO BUT I CNT FIGURE OUT HOW TO DO IT THE WAY I WANT : <?php if(isset($_COOKIE['user'])) { $username = $_COOKIE['user']; if ($username == "administrator") { echo"<a href="http://fonecave.110mb.com/" target="_self" ><b>Fonecave Control Panel</b></a>"; } } else { $msg = ""; } } ?> Link to comment https://forums.phpfreaks.com/topic/76303-solved-href-output-error/ Share on other sites More sharing options...
The Little Guy Posted November 7, 2007 Share Posted November 7, 2007 echo"<a href="http://fonecave.110mb.com/" target="_self" ><b>Fonecave Control Panel</b></a>"; to echo'<a href="http://fonecave.110mb.com/" target="_self" ><b>Fonecave Control Panel</b></a>'; Link to comment https://forums.phpfreaks.com/topic/76303-solved-href-output-error/#findComment-386277 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.