Jump to content

ggkolfin

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by ggkolfin

  1. @justsomeguy, it seems you are right. I changed the password of root user for phpmyadmin (through phpmyadmin -> my_database -> privileges -> edit privileges -> change password AND I changed the $cfg['Servers'][$i]['password'] in C:\wamp64\apps\phpmyadmin4.5.2\config.inc.php to have the new value) and now I cannot get to connect to the database any more. The code line: $link = mysqli_connect("localhost", "root", "[mynewpassword]", "my_database"); returns "Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)" (I can still manually connect to the phpmyadmin though). But when I try: $link = mysqli_connect("localhost", "root", "", "[myDatabase]"); //no password, like it was before it does connect somewhere and returns the same data as always, which is probably not the right place. So I am assuming that I was always seeing the data from another place and that is why my manual changes did not show up in the front-end...??? I still don't get it though. I used to host this site on goDaddy but it is not there any more. Is it possible that my site is trying to connect to another place and not phpmyadmin? And how can I check for that? (Sorry it takes me so long to answer, I am between different places these days and I do not always have access!)
  2. @justsomeguy, the code displays everything correctly -just not the current version of the data, an earlier version. If I add a new row now it will not show up at all: neither the image, nor the title/the description/etc, nothing will show up in the front-end as if the row was not in the table. I first noticed the issue with the image field because it was the one that was updated. When I manually (through phpmyadmin) change some data in my table, the change is not picked-up by the front-end. The previous data is still getting shown. This says "caching" to me. Maybe I am wrong, but I am not getting any errors from the queries, I just get old data...
  3. Code wise everything works fine - I do not get any errors nor anything returns false. The browser caching is not to blame either. As I mentioned in my original message, I've tried everything to clear the browser's cache and tried different browsers too, but no difference was made. @dsonesuk, I tried copying the entire table and used the new table instead and everything seemed fine. When I added a new row at the new table though, the new entry did not show up in the front-end. Again, I can only assume that there is some caching going on, and I am not referring to the browser's caching... Any ideas?
  4. Hi Don E, Thank you for your reply. Yes, the database is updated, I have checked in phpmyadmin, I am not getting any errors. There is only one database to connect to, the one with the updated names so I am positive that I am connecting to the right database. When I try to insert a new row the image is saved correctly into the table (file name only) but the new entry does not show up in the front end, as if nothing has been added to the database. So it seems that it is not limited to the images. It looks like caching is involved but I cannot figure it out. Any ideas?
  5. Hello everyone, I am not sure if this is the right place to post since I do not know for sure if it is PHP that causes my issue, so I apologize in advance if I shouldn't have posted here. I am using WampServer Version 3.0.0 64bit (Apache: 2.4.17 | PHP: 5.6.16 | MySQL: 5.7.9) on windows10. I am updating a website and I am keeping the database the same, except from some small optimizations here and there. I have a query that selects all active rows of a specific category, then I fetch the results and show the rows: if(mysqli_stmt_prepare($stmt, "SELECT * FROM myTableName WHERE _category=? AND _approved='1' ORDER BY _id DESC LIMIT ?, ?")) { mysqli_stmt_bind_param($stmt, "iii", $category, $offset, $rowsPerPage); mysqli_stmt_execute($stmt); mysqli_stmt_bind_result($stmt,$id,$title,...,$image,...); //all fields are binded, including image while(mysqli_stmt_fetch($stmt)) { //show recipes } } The query is correct and everything shows up fine, except from the image returned by the query. My old database used to store the image with the path, eg "/this/is/the/path/to/image.jpg" but I have updated the image table column to only store the file name so now $image variable should contain only the file name, eg "image.jpg". But it does not. The $image variable still contains the full path, although the table is updated! I though it was some kind of caching, but clearing the browser's cache, going incognito, hard refreshing, changing browser did not change anything. I also tried running: SET GLOBAL query_cache_size = 0; in mySql terminal but that did not change anything as well. I also tested php.ini for Op Cache but it was already disabled: opcache.enable=0 I do not know what to do about this and it is driving me crazy! Any help will be very much appreciated. Thank you all, georgia
  6. Again, thank you very much!
  7. Even if I remove all whitespace and line breaks between the elements the gap remains. I ended up using "position: absolute;" as a last resort to address this gap problem, but you are right this is the reason for this topic's original problem. After removing absolute positioning, the only way I can get rid of the gap is by seting relative position to the footer div and also a negative top, eg position: relative; top: -150px; but I've read that this is a bad practice.
  8. Thank you dsonesuk, this does solve it. The problem is that if I change that, a gap appears between contentDiv and footerDiv. But I will look into this. Thank you very much!
  9. Hello everyone, I have been developing a site for fun lately (using Wampserver v. 2.5 on windows 8), and yesterday I was happy to realize that I have finished it! For the next logical step, I decided to check the site on other browsers (I was working with Chrome all the time), i.e. on Firefox and IE for the start. Everything works great except that my bottom div is not appearing at all at the two browsers. Even worse, on firefox only, the div does appear on a single page (contact.php) but it does not appear at any other of the almost 40 pages. I did check for differences between this certain page and any other and as far as I can see there is none! Also, on IE the footer is absent even in contact.php. I searched online and found that adblock plugin maybe causing the block, depending on the div's name, but my div is called "footer"! The stylesheet is common for every page, thus I do not believe it is a CSS related problem, but I do not know for sure. I would love some help and it would be very much appreciated. Thank you all, Georgia PS: Here is the basic html page and the related CSS (of course there is more CSS (for the other divs) but I think it is not relevant. I can post it if you like but not all pages have the same divs, so there is some styling for each page. The code I post is a basis that exists in all pages): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" type="text/css" href="style.css"><title>Something</title></head> <body> <div id="holderDiv" style="min-width: 1200px; margin: 0 auto;"> <div id="headerDiv"> <!--some things and more divs here--> </div> <!--end of headerDiv --> <div id="navigationDiv"> <!--a navigation menu here--> </div> <!--end of navigationDiv--> <div id="contentDiv" align="center"> <!--some content and more divs here--> </div><!--end of contentDiv--> <div id="footerDiv"> <p class="footerLinks"> <a href="terms.php">Terms of use</a> <a href="help.php">Help</a> <a href="contact.php">Contact</a></p> <p style="font-size:12px; color: #000000"><br /><br />Copyright 2014 Something</p> </div> <!--end of footerDiv--> </div> <!--end of holderDiv--> </body></html> //CSS: body { background-image: url("back.png"); background-repeat: repeat; background-position: left top; height: 100%; margin: 0; padding: 0; font-family:"Courier New", Courier, monospace; } #holderDiv { min-height: 100%; width: 100%; position: relative; } #footerDiv { clear: both; position: absolute; bottom: 0; width: 80%; height: 100px; margin-left: 10%; margin-right: 10%; margin-bottom: 5%; margin-top: 0%; padding-bottom: 3%; background-color: #99cccc; display: inline-block; overflow: hidden; text-align: center;} .footerLinks>a { color: #000000; font-size: 14px; } .footerLinks>a:hover { color: #000000; font-size: 14px; } .footerLinks>a:visited { color: #000000; font-size: 14px; }
  10. Was this supposed to be my first post? Anyway, I guess it is better to be late than absent! Full name: Georgia GkolfinopoulouAlternative name(s): GogoBirth date(dd/mm/yyyy): 15/06/1987Gender: FemaleZodiacal sign: GeminiCountry of residence: CyprusCity of residence: NicosiaHeight: 1.70Weight: 65 kgEyes: light brownHair: wavy, long, light brownSmoking/Drinking/Drugs: No/No/NoFavorite Music: Greek rembetiko, Greek rock Favorite Movies: Too many... "Una pura formalita" is the one I can recall right now.Interest: Yoga, Cooking, Anime, Literature, Music, Movies and series and the WebPets: Markos, Greek shepherd dogAdditional comments: Computer engineer graduate, I lost my road and I am trying to get back on the rails!
  11. Thank you for your answer! Placing the two backgrounds in two separate containers did work without requiring min-width to be set. I placed the first background in body and the second in header div. My only problem was that because my second background image was too high, the header was either too high or (if i set the header to be as high as I wanted) the bottom of my background image was covered by the content div, which is right bellow header div. I ended up redesigning the second background image, and although it required some photoshop labor time, I am very happy with the end result.
  12. I finally changed my second background image so that it can fit the header without exceeding the height I wanted for the header. I guess there is no way to make it stick to the upper right corner of the page whilst in the body: the top right of the body is supposed to be the top right of the viewport.
  13. No clues at all? I am really struggling with this! I have tried a ton of things, but nothing seems to work. The second background image keeps coming left on resize. The only think that make it stick to the right top corner is if I remove the second background image from the body style and add it to the header style: #headerDiv { width: 100%; height: 600px; /*as the height of the image*/ display: inline-block; overflow: hidden; background-image: url("wood.png"); background-repeat: no-repeat; background-position: right 0px top; } But now the header is too big, because I set the height to be 600px, so the content bellow the header is pushed down too much! But if I change height to something smaller then the bottom of my image is cropped!!! Anyone please??? I could really use some help here! Georgia
  14. Hello all! I am trying to make a main page with two background images: the first one should repeat vertically and horizontally and the second should be fixed in the upper right corner of the page. I have a login menu over the second background image. Also I have a regular image (not background) in the upper left corner of the page, and this is the logo of the site. My problem is that when I resize (size down) my browser's window the second background image moves to the left, and as I further size the browser's window down it keeps moving to the left until it completely moves below my logo. The login menu stays where it should, at the upper right corner of the page and as I resize the window I have to use the scroll bars to get to the menu (and this is what I want). How can I make my second background image stick to the upper right corner and not moving left on resize??? Here is the body of html: <body> <div id="holderDiv" style="min-width: 1024px; margin: 0 auto;"> <div id="headerDiv"> <div id="logoDiv"> <img src="logo.png" width="562" height="396" align="left" /> </div> <!--end of logoDiv --> <div id="loginDiv"> <form action="login.php"> <input type="text" name="usernm" placeholder="Username" /><br /> <input type="text" name="passwd" placeholder="Password" /><br /> <input type="submit" value="login" /> </form> </div> <!--end of loginDiv --> </div> <!--end of headerDiv --> <div id="contentDiv"> <!-- some things here --> </div> <!--end of contentDiv --> <div id="footerDiv"> <!-- some more things here --> </div> <!--end of footerDiv --> </div> <!--end of holderDiv --> </body> And this is the css: html { height: 100%; }body { background-image: url("wood.png"), url("back.png") ; background-repeat: no-repeat, repeat; background-position: right top, left top; height: 100%; margin: 0; padding: 0 px; font-family:"Courier New", Courier, monospace; }#holderDiv { min-height: 100%; width: 100%; position: relative; }#logoDiv { float: left; margin-right: 5%; display: inline-block; overflow: hidden; } #loginDiv { float: right; margin-top: 5%; margin-right: 5%; display: inline-block; overflow: hidden; }#contentDiv { width: 80%; height: 70%; margin-left: 10%; margin-right: 10%; margin-bottom: 5%; background-color: #fff; display: inline-block; overflow: hidden; }#footerDiv { width: 100%; height: 10%; background-color: #99ffcc; display: inline-block; overflow: hidden; } Can anyone help please? I have tried several things suggested online for what appears to seems a similar problem but nothing worked so far! Thanks in advance, Georgia
  15. Thanks for the catch! Btw solved. The problem was the relative positioning of the div containing the links.
  16. Hello everyone, I am building a website using WampServer v2.5 on Windows 8. I created a page with some content and a couple of links and it worked fine. In order to fix some layout problems I edited the css file (but actually not the links style) and since then the links do not work at all! I mean the mouse cursor does not change when hover, if I click on the links nothing at all happens and of course the style described in my css is not displayed. This is driving me crazy! I googled the problem but I didn't find anything that helped at all! Can you have a look? This is the html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" type="text/css" href="myPage.css"><link href='http://fonts.googleapis.com/css?family=Droid+Serif:400,700' rel='stylesheet' type='text/css'><link href='http://fonts.googleapis.com/css?family=Calligraffitti' rel='stylesheet' type='text/css'><title>My title</title></head> <body><div id="holder" style="min-width:1000px; margin: 0 auto;"> <div id="wrapDiv1"> <div id="headerDiv"> <a id="home" href="index.html">Home</a> <!--THIS DOES NOT WORK--> <h3>lorem ipsum</h3> </div> <!--end of headerDiv --> <div id="cornerDiv"> <a id="firstLink" href="aPage.html">First link</a> <!--THIS DOES NOT WORK--> <a id="secondLink" href=anotherPage.php">Second link</a> <!--THIS DOES NOT WORK--> <img src="imagescornerImage.png" width="384" height="192" align="right" hspace="70" /> </div> <!--end of cornerDiv --> <div> <!--end of wrapDiv1 --> <div id="wrapDiv2" align="left"> <h2>lorem ipsum</h2> <p>lorem ipsum</p> <h2>lorem ipsum</h2> <p>lorem ipsum<p> <h2>lorem ipsum</h2> <p>lorem ipsum</p> <h2>lorem ipsum</h2> <p>lorem ipsum</p> </div> <!--end of wrapDiv2 --> <div id="footerDiv"> <p align="center" style=" height:4em; line-height:4em;">Add me on <a href="https://someaddress" target="_blank" style="text-decoration:underline; color:#ffffff ">SomeWhere</a></p> <!--THIS IS THE ONLY LINK THAT WORKS--> </div> <!--end of footerDiv --> </div> <!--end of holderDiv --></body></html> And this is the css: @charset "utf-8";html,body{ height: 100%; background-color: #f1eaee; font-family: 'Droid Serif', serif; color: #505051; }body {margin-top: 7%; }#holder{ position:relative; overflow: hidden; }#wrapDiv1{ height: 15%; width: 100%; padding: 10px; padding-top: 3%; position:relative; }#wrapDiv2{ height: 50%; width: 100%; padding: 10px; padding-bottom: 7%; position:relative; margin-left: 7%; }#headerDiv { width: 50%; height: 15%; float: left; margin-right: 0%; margin-bottom: 7%; display: inline-block; }#cornerDiv { width: 50%; height: 15%; float: right; margin-left: 0%; margin-bottom: 7%; display: inline-block; }#home { margin-left: 14%; color: #505051; font-size:2.8em; text-decoration: none; } #home:hover { color: #00b200; font-family: 'Calligraffitti', cursive; text-decoration: none; }#home:visited {color: #505051; }#firstLink { margin-left: 40%; text-decoration: none; color: #505051; }#secondLink { text-decoration: none; color: #505051; }#firstLink:hover { color: #ff0066; }#secondtLink:hover { color: #ff0066; }#firstLink:visited {color: #505051; }#secondLink:visited {color: #505051; }h3 { margin-left: 15%; }h2 {color: #ff0066}span {font-weight: bold; }#footerDiv { position: absolute; bottom: 0; left: 0; width:100%; height: 7%; background-color: #0066ff; color:#ffffff; font-size:0.75em; } The links are not "clickable" at all!!! Any ideas please?
  17. Oh, this is weird! Having configured everything as per http://yogeshchaugul...e-sendmail-wamp article and still not working.Then I just added headers optional parameter to my mail() function call and then mail returns true and mail is sent!!! Thanks Don E for the help!
  18. Thank you for your reply. I deleted my original sendmail directory from wamp/ and started from the beginning following the instructions of the article. I also changed my php $to variable to my gmail account eg me@gmail.com in order to do the same changes as the author. I installed stunnel and changed the conf file and the sendmail.ini and php.ini as instructed. Double checked the author's file references to be sure... Unfortunately the mail() still returns false and of course the mail is not sent. :-( Any other suggestions?
  19. Waiting for an answer...

  20. Hello! I am trying to make a contact form and hoping for some help because I cannot make the thing work! The data entered by the user should be sent to my hotmail account eg me@hotmail.com. I have created this html form: <form method="post" name="contact_form" action="doContact.php"><input type="text" name="name" placeholder="Name" size="50" autocomplete="off" autofocus><br /><input type="text" name="mail" placeholder="e-mail" size="50" autocomplete="off" required><br /><input type="text" name="subject" placeholder="Subject" size="50" autocomplete="off"><br /><textarea name="message" placeholder="Message" maxlength="1000" cols="43" rows="6" autocomplete="off" required></textarea><br /><input type="submit" value="SEND"></form> The doContact.php file contains the following code: <?php ini_set('display_errors', 1); error_reporting(E_ALL);$name=$_POST['name'];$mail=$_POST['mail'];$subject=$_POST['subject'];$message=$_POST['message'];$message = str_replace("n.", "n..", $message);$message = wordwrap($message, 70, "rn");$to="me@hotmail.com";$body="From ".$name." with e-mail: ".$mail." message: ".$message;if (mail ($to, $subject, $body)==TRUE) { echo "<p>Your message has been sent!</p>"; }else{ echo "<p>Something went wrong, please try again!</p>"; }?> I am working in Windows8 x64 with WampServer v2.5, so at the beginning I was getting a: mail():Failed to connect to mailserver at "localhost" port 25 error and my <p>Something went wrong, please try again!</p> was "echoing". I did a lot of search and I discovered that this was because I didn't have any mail server installed. Instead of installing a mail server, and after I unsuccessfully tried to edit the php.ini with hotmail's smtp, port and my account credential (it didn't make any difference, I was still getting the mail():Failed to connect to mailserver at "smtp.live.com" port 465) I chose to first try the solution pointed here. So I downloaded the sendmail app and changed my php.ini and sendmail.ini accordingly (meaning with the smtp and pop3 data of hotmail and my account credentials, as instructed). I restarted wamp and tested again: now it does not return any error but the mail returns false, so I get the "<p>Something went wrong, please try again!</p>" message and the mail is not sent. Do you know how to fix this? Also, if I cannot make this work and I try to install a mail server locally to test my code, does that mean that after uploading my site in an actual hosting server online (not localhost) the local mail server will NOT be required anymore? I know this is a noob question but I am very new to this... Any help will be very much appreciated! Thank you all!
×
×
  • Create New...