Jump to content

hariskar

Members
  • Content Count

    98
  • Joined

  • Last visited

Community Reputation

0 Neutral

About hariskar

  • Rank
    Newbie
  • Birthday 05/20/1970

Contact Methods

  • Website URL
    http://www.mikroviologos.gr

Profile Information

  • Location
    Greece/Kavala

Recent Profile Visitors

7,166 profile views
  1. With php registered users have access, each to their own results when they click to www.site.com/results. The results are pdf. So when a user clicks on results he can see a page with the links to all the pdf of his results. The problem is that if someone copies and pastes this link he can also see the results even if he is not registered. How could I avoid this? Here is the code: Thank you! <?php if ($_SESSION['username']=="user1") { readfile("https://www.site.com/results/user1.html"); } elseif($_SESSION['username']=="user2") { readfile("https://www.site.com/results/user2"); } else
  2. I was not very clear: Problem solved. I have one db connection in included file and a second in the main file. I had to put $db->exec("SET CHARACTER SET utf8;"); in both files after each connection to solve the problem.
  3. In included config.php I changed $db->exec("SET NAMES 'utf8';"); to $db->exec("SET CHARACTER SET utf8;"); but the problem remains: Greek username is correct in mysql with Greek characters being correctly displayed, but last_login still does not update for usernames in Greek. Edit: I had to put it again, because I had a 2nd connection to the db. Thank you!
  4. Thank you but I can not understand what is happening: since there is $db->exec("SET NAMES 'utf8';"); in the included file, the username registers correctly in mysql and login/php works fine. The only problem is that when a user with Greek username logs in last_login in mysql does not update. Is there anything wrong with this line? : $sql = "UPDATE members SET last_login=now() WHERE username='$username' ";
  5. last_login in mysql is updated correctly when username is in Latin characters but not updated when in Greek. Here is the code: <?php //include config require_once('includes/config.php'); $username = $_POST['username']; $password = $_POST['password']; if($user->login($username,$password)){ $servername = "xxx"; $dbuser = "xxx"; $dbpass = "xxx"; $dbname = "xxx"; $conn = new mysqli($servername, $dbuser, $dbpass, $dbname); $sql = "UPDATE members SET last_login=now() WHERE username='$username' "; if ($conn->query($sql) === FALSE) {echo "Error updating record: " . $conn->error;}} //ch
  6. It works with display:block!I would never find this myself... I made the html this way, because I want the transparent non hover border and the blue hover border to be over the image edges and not around/externally of the image with the image smaller. Is there a simpler way to do this? Thank you!
  7. Why does the border on hover that appears on the 4 smaller pictures not fall exactly on the pictures edge, but at the bottom it is about 7px lower and leaves an empty space? http://www.mikroviologos.gr/test2 Thank you!
  8. In my webpage I would like to put an image in the text logo I have now. I would like the image to be in the right of mikroviologos.gr. Now the code is: <div id="logoArea" class="col-3" title="Μικροβιολογικό Εργαστήριο στην Καβάλα"><h1><a href=/><div id="l1">mikroviologos.gr</div><div id="l2">Εργαστήριο Μικροβιολογίας</div></a></h1></div> If I change it to <div id="logoArea" class="col-3" title="Μικροβιολογικό Εργαστήριο στην Καβάλα"><h1><a href=/><div id="l1">mikroviologos.gr<img src="image.png">
  9. I made my site www.mikroviologos.gr without any cms with the valuable help of w3schools lessons and this forum (I had almost no knowledge of html, css, javascript, php, mysql before). My site functions as it should but I think I don't like my design so much. Of course I still have no logo, but the rest of the design seems too simple and maybe old fashioned. Of course I would not like something very modern.. My problem is I can't decide what is wrong and what should I change.. I think I don't like the main picture being so big, but if I made it smaller, it would be narrower than the t
  10. I added $db->exec("SET NAMES 'utf8';"); in php and now usernames are stored correctly in mysql. Thank you!
  11. In a member register form how can I add a validation rule to allow only latin characters for username and password? Today a member registered and put in Greek characters and the result in mysql is Σοφία Δέδε ... (In mysql collation is utf8_general_ci). How can I avoid this? Thank you!
  12. <style> div.img {margin:5px;border:1px solid #ccc;float:left;width:220px;} div.img:hover {border:1px solid #777;} div.img img {width:100%;height:auto;} div.desc {padding:15px;text-align:center;} .img {cursor:pointer;transition:0.3s;} .image:hover {opacity:0.7;} /* The Modal (background) */ .modal { display:none; /* Hidden by default */ position:fixed; /* Stay in place */ z-index:1; /* Sit on top */ padding-top:100px; /* Location of the box */ left:0; top:0; width:100%; /* Full width */ height:100%; /* Full height */ overflow:auto; /* Enable scroll if needed */ background-color:rgb(0,0,0)
  13. I finished the mobile part and started the desktop part. My css is small, it seems that my only gain will be the elimination of 2-3 float:none.
  14. My css is follows Desktop-first design. Should I convert it to Mobile-first? Would there be any advantages? Would it be smaller? Is there a procedure to find the css parts used from mobile now, keep them and add as media query the desktop parts? Thank you! Here is my css: *{box-sizing:border-box} html{overflow-y:scroll;position:relative;height:100%} header.top{height:92px;width:100%;margin:auto;background-color:#1a3365;border-bottom:2px solid #6e98c2} header>.container{overflow:visible;white-space:nowrap} #nav a{color:#d2dce6;display:block;padding:3px 4px;font-weight:bold} #nav l
  15. I thought that if the css code for each screen would be eliminated, the message could go away. I have only one small 3366kB css. I can't understand why google suggests this. If I put the code of the css in the head, the message goes away and I get 100/100 for both Desktop and mobile. But noway will I put my css in every single page... This suggestion seems wrong to me.
×
×
  • Create New...