-
Posts
396 -
Joined
-
Last visited
-
Days Won
1
Everything posted by LeonLatex
-
Strider, can you please tell me why you set up block 2 and 3 like this? : .logo-div, .translate-div { display: inline-block; vertical-align: middle; } .logo-div { background-color: red; color: #fff; text-align: left; Both blocks have a reference to "logo-div". Why? I ask before I try because I want to understand what I am doing when doing it. Will the result not be determined by what is written in block 3 regardless of what is written in block 2 because block 3 is read after block 2? I mean: Therefore, the values for. logo-div in block 2 are overridden by the values of block 3 for ". logo-div" no matter what. I'm just asking because I got a little confused now. I have never set up CSS like this before, and I didn't know you could do it this way. Therefore, I need an explanation.
-
Thanks to all of you. I will look into it and all the advice you are giving me. There has been a downtime of about 10 hours on the server, and I didn't have a copy on this site locally, so I haven't been able to work on the site. Again, thank you so much π
-
I've lost my way, and now I can't find the right solution again. I've managed to do this before, but now I can't find the right combination. I have 1 DIV that contains two other DIVs. One is on the left side, and one is on the right side. The right side is the google translate drop down menu. The right one is a div that contains the logo and company name. The problem is that the DIV for the google translate dropdown menu stays at the top, while the DIV for the logo is placed on the line below. Which "display: inline" option should I go for each individual DIV when i want them aligned left and right on the same line?
-
I don't remember how I did this last time. Should the 1st line point to php.exe and the 2nd line point to phpdbg.exe or both pointing to php.exe? After i bought me a new laptop, VSC won't work because i have to re-configure it. Can you guys please tell me witch of the lines should include what? I cant make it work no matter what. But before I move on I have to get these two lines right, be sure it's right. This is how it is now: "php.validate.executablePath": "C:\\laragon\\bin\\php\\php-8.1.10-Win32-vs16-x64\\phpdbg.exe", "php.debug.executablePath": "C:\\laragon\\bin\\php\\php-8.1.2-Win32-vs16-x64\\phpdbg.exe", I have tried this too: "php.validate.executablePath": "C:\\laragon\\bin\\php\\php-8.1.10-Win32-vs16-x64\\php.exe", "php.debug.executablePath": "C:\\laragon\\bin\\php\\php-8.1.2-Win32-vs16-x64\\phpdbg.exe",
-
Thanks Kicken
-
Please, look at the first 2 lines. I can't find it my self. Where is the ERROR? <?php try { $pdo = new PDO('mysql:host=*****;dbame=*****'; charset=utf8', '*****','*****'); $pdo->setAttribute(PDO::ATT_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = 'SELECT' `article` FROM `articleText`'; $result = $pdo->query($sql); while ($row = $result->fetch()) { $article[] = $Β€row['articleText']; } $title = 'Matsnakk'; $output = ''; foreach ($article as $article) { $output .= '<blockquote>'; $output .= '<p>'; $output .= $article; $output .= '</p>'; $output .= '</blockquote>'; } } catch (PDOException $e) { $title = 'An ERROR has occurred.'; $output = 'Database ERROR: ' . $e->getMessage() . ' in ' .$e->getFile() . ':' . $e->getLine();'; } include __DIR__ . '/../templates/layout.php';
-
Yes, I know, but this was something I remembered from those days long ago. Thank you for your tip and advice πππ
-
I have a TABLE called article. In this table I have 4 columns which is articleid, articletext and and articledate . Time has come to upgrade the TABLE with one more COLUMN. That's not the problem, how to create it. The problem is what values/parameters I need to enter/set. I am not storing the images in the database. I will just store the link to the picture that is stored in its own directory (images) given its own name on upload to the directory where the pictures are stored. This is how far I have come til now: ALTER TABLE article ADD [COLUMN] articleimage column_definition |AFTER articletext]; To start somewhere to move on, I think the best thing is to create the path that will be converted to a link in a PHP script including href="http://www.******.tld /images/article_images/ As you understand, the link to the images directory will be fixed in PHP/HTML, but when it is loaded, the name of the file will be inserted after article_images/ So, when the page loads PHP and HTML, the link will be created and printed out to be shown visitor's browser. Since the name of the image will be arbitrarily/automatically entered, I am not sure which values/parameters I should enter for the column I will create/have created since the image can then consist of all kinds of letters and characters. If I'm completely lost here, please tell me how this is normal and how to do it. Because it's been so long, at least 15 years since I've done something like this. Whoops, this must have gotten messy, but I hope you understand what I'm trying to figure out.
-
It's not a recommendation. Who told you that? This is taken from one of the first chapters describing/teaching about how it's possible to do an html or php site/file unreadable for visitors of the site by direct access through the browser. This chapter also describes he use of templates and the In later chapters, they are changing this to the "normal way". It's just to do It more readable and understandable for the reader. So, since I am reading and learning from the book (and the other freaks in here) I feel I am more appropriate to rate this book than one who has not. But, out on your experience and knowledge, I understand your reaction. It's easy to be the first in line to throw the first word about something or somebody. The book Is good. And I learn a lot from it. Some chapters I have to use more time on, but that is my own fault, not the book. Maxxd, I wish you a beautiful Saturday morning, day, and evening. Greetings from Thailandπ
-
As I thought but I was soooo unsure because it was so poorly explained for me. But anyway, thanks again.
-
Thanks, kicken. I was confused because I am used to seeing a double underscore with a little space between them. Because of you, I am not confused anymore. You gave a list showing double underscores with space between them. Thanks. You earned that medal for a god and clear answer.
-
There's a reason for asking. On my computer this is a single underscore and dont look like the one in the example _ , and this is a double underscore that looks like the one in the example __ This makes me confused π€ππ΅βπ«
-
I am reading a book about PHP and came into a problem. I can translate it well from English to Norwegian, it's not that. It's because of a lack of information and things the writer has not said/ given enough information about, or I can have overseen it. Anyway, I can't find the answer anywhere in the book. So, please help me out here. In the English text below, do they mean a level up outside the www directory when they say up a level? Do they mean I have to create i new directory/folder outside the www directory/folder named "project, or is the project directory/folder? This is in connection with security and should ensure that visitors to a website do not get direct access via the web browser to the file "count.html.php .Can anyone tell me what is meant here? "This is the text: Go ahead and move count .html.php up a level into the project directory and amend count.html.php to reference the new location". Thankful for a explanation ππ
-
-
I paste my script here. It won't connect, and I can't find the reason. Can you see where the bug in the script is? I appreciate your help if you can see it. <?php try { $pdo = new PDO('mysql:host=127.0.0.1;dbname=mydb; charset=utf8', 'myuser', 'mypass'); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $output = ('Databasetilkobling er opprettet.'; } catch (PDOException $e) { $output = 'FΓ₯r ikke kontakt med server, eller kan ikke koble til databasen:' . $e; }; ?>
-
As told in the heading, am I struggling with a dropdown menu that won't place where I want. I want it to move all over to the right, but for some reason, it won't. The CSS can be a little messy since I have changed it forth and back in many attempts to make it work. Thanks for trying! ππ Here are some of the HTML and CSS HTML <body> <div class="header_container"> <div class="logo_bar"> <div class="logo"> <div id="google_translate_element" style="margin-top:11px; margin-left: 32px;"> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'no', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element'); } </script> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> </div> </div> </div> <div class="menu_bar" style="background-color: #ffffff;"> <div class="menu"> <a href='<?=$HOST?>index.php' class='w3-bar-item w3-button w3-round-tiny w3-hover-white'>Hjem</a> <a href='<?=$HOST?>index.php' class='w3-bar-item w3-button w3-round-tiny w3-hover-white'>Hjem</a> <a href='<?=$HOST?>index.php' class='w3-bar-item w3-button w3-round-tiny w3-hover-white'>Hjem</a> </div></div></div> CSS div.logo_bar { background-color: #003333; /*box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;*/ margin: auto; margin-top: 0px; width: 100%; height: 64px; padding: 0px; position: fixed; } div.logo { display: inline-flex; flex-direction: row; align-items: baseline; background-image: url("../images/logo_bg_original.png"); width: 300px; height: 35px; margin-top:9px; margin-left: 10px; position: static; } div.translate { display:inline; flex-direction: row; align-items: baseline; width: 300px; height: 45px; margin-top:3px; margin-left: 10px; position: static; } div.menu_bar { font-size: 13px; /*font-weight: bold;*/ background-color: #ffffff; box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px; margin: auto; margin-top: 54px; width: 100%; height: 50px; position: fixed; } div.menu { background-color: #ffffff; display: inline-flex; flex-direction: row; align-items: middle; margin-left: 0px; margin-top: 8px; }
-
I was just asking for help to find the right place to find the solution to my problem. What is wrong with that? And if we who are the visitors here on PHP Freaks can't ask for help, I don't understand what this site is for if we can't ask questions which is in connection with the many categories here at PHP Freaks.
-
Thanks cyberRobot. Just what I was looking for.
-
What was that?
-
Website starts looks ok in 720px-740px and up. That's ok if it wasn't for the last button/link in my menu bar. I know I have seen the solution to this in w3 schools about "w3 schools CSS" responsive design so this option comes on the next line, but now I can't find it. Please help me someone. or, actually, I would like to have the menu show up like a button like this one: (Show Button) on mobile devices. But now I can't find that either. So, please, any? And search on w3schools.com is no point since all the results come's up is to other sites which have no meaning to what I am looking for.
-
I can't figure it out, and I can't find the answer. I thought it was an easy thing, like a walk in the park or cycling to the pub. I want to decide for myself how wide the <label> should be. What am I doing wrong? <label style="width: 200px;">Fornavn</label>
-
I don't π€ π€π€ͺ Thanks π
-
A person I met at a cafe told me he was hired into a project about some sensors for the pacific sea they are developing. About that he said he was developing the software for those sensors in python because python was faster than C# C+ What do you say? Hard to believe this, that's why I am asking.