LeonLatex Posted October 4, 2021 Share Posted October 4, 2021 I have a bit of a problem with one of many other scripts that barand has put together for me. I tried to customize it, but forgot to back up the file before I started, and when I tried to put it back together, I only partially managed to do so. The last line there is a error in/quotation marks (I think it is). Can anybody help me? <a id="nav-panel" href="<?=$HOST?>panel.php" class="w3-bar-item w3-button"><?=$disabl?>Diskuter</a> Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/ Share on other sites More sharing options...
ginerjm Posted October 4, 2021 Share Posted October 4, 2021 What is $HOST? Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590662 Share on other sites More sharing options...
LeonLatex Posted October 4, 2021 Author Share Posted October 4, 2021 (edited) 23 minutes ago, ginerjm said: What is $HOST? That is the domain/db_host/IP to the DB Host. It isn't there the error is. It is in the back of the line. Where to put the quoting marks around <?=$disabl1?> area. Or, i think it is around that area. Edited October 4, 2021 by LeonLatex Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590663 Share on other sites More sharing options...
ginerjm Posted October 4, 2021 Share Posted October 4, 2021 Try this <?php echo "<a id='nav-panel' href='{$HOST}panel.php' class='w3-bar-item w3-button'>{$disabl}Diskuter</a>"; Are you sure it's not $_HOST? Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590664 Share on other sites More sharing options...
ginerjm Posted October 4, 2021 Share Posted October 4, 2021 (edited) Perhaps $_SERVER['HTTP_HOST']? Edited October 4, 2021 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590666 Share on other sites More sharing options...
LeonLatex Posted October 4, 2021 Author Share Posted October 4, 2021 It works fine the way it is, and the way barand has set it up. define("HOST",'xxx.xxxx.xxxxxxxxxx.com'); // Default database host. $db = new PDO("mysql:host=".HOST.";dbname=$dbname;charset=utf8",USERNAME,PASSWORD); The error is where i alresdy have told. But i cant see where to put the quotes. Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590668 Share on other sites More sharing options...
LeonLatex Posted October 5, 2021 Author Share Posted October 5, 2021 (edited) The error has nothing to do with the globals/variables in the connection script/include file. It is a Quoting mark error nearby the text to be printed out by PHP on the screen. On the screen it should looks like this: Diskuter (the link text) But, it look like this: w3-disabledDiskuter Edited October 5, 2021 by LeonLatex Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590673 Share on other sites More sharing options...
ginerjm Posted October 5, 2021 Share Posted October 5, 2021 I gave you a correct replacement for your problem line. I think. Try it and see. Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590674 Share on other sites More sharing options...
Barand Posted October 5, 2021 Share Posted October 5, 2021 <a id="nav-panel" href="<?=$HOST?>panel.php" class="w3-bar-item w3-button <?=$disabl?>">Diskuter</a> Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590676 Share on other sites More sharing options...
LeonLatex Posted October 5, 2021 Author Share Posted October 5, 2021 Thanks Barand. Saved by you again 🙂 👏👌👍 I cant remember it was written that way before. Now it's working. Should have listen more to ginerjm to, so thanks to both of you 🙂 Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590677 Share on other sites More sharing options...
Barand Posted October 5, 2021 Share Posted October 5, 2021 w3-disabledDiskuter ^^^^^^^^^^^ Blatantly obvious that it should be with the other w3-xxxxx classes. Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590680 Share on other sites More sharing options...
ginerjm Posted October 5, 2021 Share Posted October 5, 2021 And I apologize for placing your last variable with the 'display' portion of the link instead of as part of the class-list. Quote Link to comment https://forums.phpfreaks.com/topic/313861-quotation-marks-error-again/#findComment-1590687 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.