Jump to content

Max Castril

Members
  • Content Count

    30
  • Joined

  • Last visited

Everything posted by Max Castril

  1. Sorted it! Changed submit from <input type="submit"> to <input type="button" value="Click me" onclick="msg()"> https://www.w3schools.com/tags/att_input_type_button.asp https://www.w3schools.com/css/tryit.asp?filename=trycss_form_button Works anyway but I still hate CSS😝.
  2. I have been trying to change the size, font, colour etc. of the submit button as it is too insignificant in my page. I tried this in W3Schools Tryit Editor but doesn't work: <!DOCTYPE html> <html> <head> <style> .submit { border-radius: 10px; width: 60%; font-family: "Times New Roman", Times, serif; } </style> </head> <body> <form action="/action_page.php"> First name: <input type="text" name="fname" value="John"><br> Last name: <input type="text" name="lname" value="Doe"><br><br /><br /> <input type="submit" value="Submit form"> </form> </body> </html> in https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_value Any ideas?
  3. @Ingolme - I thought all programmers used SciTE. What is the most popular one?
  4. Well, I copied and pasted the text to Notepad and uploaded it and got: string(2) "á" DONE!áTeclado: áRepuesta 1: áRepuesta 2: á Thanks to all for your help
  5. I am using SciTE This is the header for SciTEDoc.html (I cannot find how to see the text editor encoding.): <?xml version="1.0" encoding='utf-8'?> <!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 name="generator" content="HTML Tidy, see www.w3.org" /> <meta name="generator" content="SciTE" /> <meta http-equiv="Content-Type" content="text/html" /> <title> SciTE </title> <style type="text/css">
  6. string(1) "�" DID NOT!Teclado: �Repuesta 1:Repuesta 2:
  7. SciTE.exe donesuk - I tried this: <!doctype html><html lang = "es"><head><meta http-equiv="content-type" content="text/plain"></head><body> but no juice. Now have: <?php header('Content-type: text/html; charset=utf-8'); $char = 'á'; var_dump($char); $char2 = htmlspecialchars($char); $char3 = htmlentities($char); if($char3 == '&aacute;') { echo 'DONE!' . $char3; } else { echo 'DID NOT!'; } echo 'Teclado: ' . $char . '<br /><br />'; echo 'Repuesta 1: ' . $char2 . '<br /><br />'; echo 'Repuesta 2: ' . $char3; echo ' </body>'; ?> Still no juice
  8. I'm rapidly getting out of my depth here.
  9. Thanks Ingolme but it still doesn't work. I have tried evading the browser by this: <?php $char = 'á'; $char2 = htmlspecialchars($char); $char3 = htmlentities($char); if($char3 == '&aacute;') { echo 'DONE!' . $char3; } else { echo 'DID NOT!'; } ?> This code shouldn't be affected by the browser at all, but one interesting thing is that the browser doesn't even recognize the character: DID NOT!Teclado: �Repuesta 1:Repuesta 2:
  10. Just an oldie trying to keep his brain active by frying it in php! 

  11. Can you get https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_string_htmlentities to work on your computer?
  12. Hi everyone. Anyone noticed that htmlentities() aren't working in php? Nor are htmlspecialcharacters. See: https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_string_htmlentities Any ideas?? I have also written a quick and dirty test routine which I have run on my server: <?php if(isset($_POST['char'])) { $char = $_POST['char']; $char2 = htmlspecialchars($char); $char3 = htmlentities($char); echo 'Teclado: ' . $char . '<br /><br />'; echo 'Repuesta 1: ' . $char2 . '<br /><br />'; echo 'Repuesta 2: ' . $char3; } echo '<form action = "char_test.php" method = "post"> <input type = "text" name = "char" size = "6"> <input type = "submit" name = "submit" value = "Search!" /> </form>'; It runs but doesn't return any ASCII entities. HELP!! Max
  13. Hi there I am using MySQL in "phpmyadmin.eu.ionos.host" and want to change a column to 'UNIQUE' as I don't want to accidentally fill the table with repeat data using an erroneous php loop and each image must be unique. The table is: 2 Image char(200) utf8_unicode_ci SQL won't let me change the column to 'UNIQUE' as it says that there is a duplicate column 'Image'. The phpmyadmin SQL seems to be trying to add another column, which is what I dont want. 1and1 have very recently changed their software and there seem to be a lot of gremlins in it. Any comments?? Regards Max
  14. Hi everyone Nowadays, when one calls a website on a mobile device, the server will load an alternative web page. E.g. if one calls www.examplewebsite.com on a mobile, then the page that one will see is something like www.m.examplewebsite.com. How does HTML identify the type of device, beit PC, laptop, iphone, tablet etc. ?? I have read the w3schools pages on the subject and followed their advice, but am interested in at least modifying my CSS specifically ofor a mobile device. Thanks in anticipation. Max
  15. Thanks, dsonesuk. I will work on your advice. The FastStone looks really good - I will probably just use that in future instead of MS Paint. I think the imagick is a bit beyond my powers of understanding, to be honest. Thanks Max
  16. Hi there I have a website ( www.beautifulcastril.com ) which has approx 1,400 images of the area. I have just included a 'view images' section which displays thumbnails whch you can then click on to see the full sized image. The images from which I am producing the thumbnails are 512 x 384px and the large images are 1600 x 1200px. As I am displaying the images at a width of 150px, I would like to use php to reduce the 512px images to 150px before download to reduce server load and screenfll time. I have looked through the code from justsomeguy but it seems awfully complex (to a simple soul like me!). Is there no php instruction such as 'resize('myimage.jpg',150) ?? I don't need to test for the existence of a file as I have just found it with glob(). I have trawled through the imagick manual but just get more and more baffled, apart from the fact that it seems that my server (1and1.es) doesn't support imagick. I can always trawl through 1,400 images and load them individually into MS Paint, resize them, save them on the PC and then upload them via FileZilla but it will take hours and is not very elegant. All advice will be much appreciated. Regards from a very sunny Spain. Max all_images.php
  17. Hi all, Some forum type websites show how many people are viewing at any one time - can you do that in php or do you have to use JavaScript? HOW??? Any advice would be gratefully accepted. Max
  18. Isn't using Dreamweaver cheating? I like SciTe.
  19. Max Castril

    Favicon

    Hi Just a question to satisfy my curiosity. I have a favicon which is 16 x 16px. I link it in the <head> section like this: <link rel="shortcut icon" href="http://www.beautifulcastril.com/BC/favicon.GIF" type="image/icon" /> <link rel="icon" href="http://www.beautifulcastril.com/BC/favicon.ico" type="image/vnd.microsoft.icon" /> and have the favicon saved twice, as .GIF and .ico in the correct directory as above. Now, when I load a new page the icon doesn't appear but if I refresh the screen about 5 times it eventually does. I'm using Google Chrome as a browser. The odd thing is that if I click on 'view page source' then the code listing immediately gets the favicon! Could it be that the two <link>s are inhibiting the favicon in some way? Regards Max
  20. Many thanks for everyone's help.
  21. I just want to apply some CSS to certain anchors and nothing else. I suppose I could use <a style = "width:.....etc.... ...or would <a class = "area1" href.....etc> ?????
  22. Thanks again dsoneuk. Seems a strange rule to have, to me. It works live as well. I have utterly NO IDEA how to resolve this.
  23. Interesting problem with the W3 schools checker 'Nu Html Checker'. I am using a CSS file that I have written which includes a reference 'area1'. I am calling it on many occasions e.g. <a href="mountains.php" id = "area1">Mountains</a> as I only want 'Mountains' to be affected by this particular CSS. When I run Nu Htnl Checker, I get this: Error: Duplicate ID area1. From line 330, column 148; to line 330, column 185 ></td><td><a href="mountains.php" id = "area1">Mounta Surely I can use a piece of CSS more than once in an html document??
×
×
  • Create New...