Jump to content
Stef's Coding Community

Wickham

Advanced Member
  • Content Count

    1,114
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Wickham

  1. ...but lots of people are using HTML5 as it gives some extra benefits. When you use a validator you just get a warning Using experimental feature: HTML5 Conformance Checker. The validator checked your document with an experimental feature: HTML5 Conformance Checker. This feature has been made available for your convenience, but be aware that it may be unreliable, or not perfectly up to date with the latest development of some cutting-edge technologies. If you find any issues with this feature, please report them. Thank you. Personally, I am using HTML5 but I don't use all the new
  2. Here's another tutorial showing how to set up php.ini file to send emails from localhost on your computer: http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html
  3. This w3.org page http://www.w3.org/html/wg/drafts/html/master/Overview.html uses par 8.1.1 uses capitals but I cannot believe it make any difference to use lower case, apart from raising a validation error.
  4. Will this Safari tutorial help? http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/AudioandVideoTagBasics/AudioandVideoTagBasics.html You have used <source src="serendipity_libtheora_008.ogv" type="video/ogg" /> <source src="serendipity.m4v" type="video/mp4" /> I use .oggv type="video.ogg" and I haven't noticed a problem, but I haven't used .m4v I just use .mp4 but you may be correct. This page is for Safari http://caniuse.com/#feat=mpeg4 This page is for all browsers http://caniuse.com/#feat=video so check
  5. w3schools is a reasonably good tutorial for beginners but remember that even tutorials can be wrong. Look at the mistakes listed on http://w3fools.com/ w3schools was completely updated a year or two ago and has now got rid of the HTML 4.01 and XHTML 1.0 doctypes and uses the HTML5 doctype, but has kept the old HTML coding separate from the new HTML5 stuff. http://www.w3schools.com/html/default.asp You need to be aware that some elements were removed in HTML5, see http://www.w3schools.com/html/html5_new_elements.asp near the page bottom, and HTML5 is still in beta (officially hasn't be
  6. In addition to Eric's five solutions, here's another which is slightly different. In your solution at present each li tag is 16.666% wide so the space between Moloney Family and Media is smaller than between Media and Gallery. Item 4 on http://www.wickham43.net/dropdownmenus.php has no width for the li tags or for the whole ul tag so the li tags only use what they need and the spacing is equal padding. It does mean that the menu doesn't fill the whole width in a large window, but it always centers even if text in li tags is different. It uses two 50% positions, one positive and the oth
  7. Essentially, you just have to add the mail function last, after the submission to your database. See if you can work it out from here to suit your code:- $result=MYSQL_QUERY("INSERT INTO villagehall (id, day, month, year,date,starttime, endtime, club, room, who, phone, email, message, book)". "VALUES ('NULL', '$day', '$month', '$year', '$date', '$starttime', '$endtime', '$club1', '$room' , '$who1', '$phone1' , '$email1' , '$message1', '$book')")or die( "<p><span style=\"color: red;\">Unable to select table</span></p>"); mysql_close(); mail( $email, "Vil
  8. Wickham

    Css Vs. Css3

    This is the official CSS3 page from w3.org http://www.w3.org/TR/css3-selectors/ which has changes from CSS2 in item 1.3
  9. Start with simple code to test out what each position can do. Forget static, hardly ever actually stated as it's the default. Position: relative and position: absolute are essential to learn and position: fixed is more or less self-explanatory except that it doesn't work in old IE browsers. See http://www.wickham43.net/divboxes.php and http://www.wickham43.net/threecolumns.php or Google div boxes. The float principle is often hard for beginners especially the need to clear floats. See http://www.wickham43.net/firefoxbackground.php because floats can affect the way a background doe
  10. There could be three reasons: 1. Did you upload the images into the host server using the same directories and subdirectories as your folder and subfolder framework & names? 2. A conflict between lower and upper case. Your browser and WordPress may be case insensitive but your host's server is case sensitive so image.JPG is not the same as image.jpg so make sure the image filename and the img code in the HTML are the same case. 3. A path problem. Are the img codes relative like <img src="image.jpg" alt="Image 1" /> or absolute like <img src="http://www.your-domain.com/
  11. Wickham

    Replacing tables

    I hadn't noticed before, but you have a block element h3 inside an inline element "a" which is not allowed and could therefore get a different display from different browsers as they try to guess what the correct display should be. I gave the .column text-align: center; and made it bigger with a background to see what the effect was: .column { text-align: center; float: left; background: pink; padding: 10px; width: 500px; height: 300px; } h3 { font-weight: bold; background: lime; } p { background: yellow; } You could have no block elements at all, then the "a" tag and the img wo
  12. Wickham

    Replacing tables

    It was badly worded by me. Div h3 and p are all block elements but I meant to refer to what you put inside them. You can have a few words of text then an img tag then a few more words of text and they will all be on the same line, running together, inside a block element, unless the img has a display: block style which breaks the inline state. <p>A few words <img src="image.jpg" alt="Image 1" /> a few more words.</p> See http://www.htmlhelp.com/reference/html40/inline.html and http://www.htmlhelp.com/reference/html40/block.html So if you want a line of text t
  13. Wickham

    Replacing tables

    It's worth remembering that the img tag is an inline element tag and treated like a text unless it has display: block in the style. If the h3 and img tags were both inside a div which had text-align: center it would align both the text and the img.
  14. I wouldn't be surprised if the control panel menu just creates a 301 redirect automatically. You just don't see the 301 code or know that it's happening.
  15. Why has #msg got padding-top: 300px? Record added will move up if you delete that.
  16. What happens if you add clear; both; to #msg (and possibly to #updateForm as well)? #msg { clear: both; float:right; padding-right:250px; padding-top:300px; font-size:15px; font-weight:bold; color:#C00; } #updateForm { clear: both; float:right; margin-top:120px; } You also need a doctype at the very top of the page, above the <html> tag. <!doctype html>
  17. That article is mainly about HTML emails but mine are just plain text where I wanted line breaks. I've seen some topics that say that Outlook does have problems with \r\n and now I've added a double \r\n\r\n to the last position before the $message $body=$day . "/" . $month . "/" . $year . ", " . $starttime . " to " . $endtime . "\r\n" . $room . ", " . $book . "\r\n" . $club . "\r\n" . $who . ", " . $email . " " . $phone . "\r\n\r\n" . $message; which adds a full line space instead of a line break. It adds a full line space in Outlook and webmail so at least it's consistent and in my c
  18. There's more information here http://www.webconfs.com/how-to-redirect-a-webpage.php at Redirect old domain to new domain Check that Godaddy uses a Linux server and check any Godaddy help pages. Also http://www.squidoo.com/301#module156239770 which says "Secondly, when you 301 redirect an old domain to a new one, be aware that you'll have to keep paying for the annual domain renewal and server account of the old domain name." http://blog.hubspot.com/blog/tabid/6307/bid/7430/What-is-a-301-Redirect-and-Why-Should-You-Care.aspx
  19. A 301 redirect in .htaccess will quite simply redirect someone who tries to open the old site in a browser to the new site. The old site can be deleted, edited or left as it is, no one will see it. You will have to copy over any files that are still valid to a new root directory for the new domain or if you just want the whole of the old site to remain unchanged, change the host server to point to the new domain and all the old files will stay as they are. I'm asuming that both domain names are hosted on the same server. You don't need a .htaccess file for every file, just one for the wh
  20. The \r\n works in all cases except at the end of teh second mail function so I don't think using only \n will cure it. As a further experiment I added another \r\n like this:- $body=$day . "/" . $month . "/" . $year . ", " . $starttime . " to " . $endtime . "\r\n" . $room . ", " . $book . "\r\n" . $club . "\r\n" . $who . ", " . $phone . ", " . $email . "\r\n" . $message . "\r\n" . $who; mail( $email, "Village Hall booking", "$day/$month/$year $starttime to $endtime\r\n$room $book\r\n$club\r\n$replymsg", "From: $admin" ); mail( $admin, "Village Hall booking", $body, "From: $admin" );
  21. width="45%" or width="45px" are teh old method of styling and perhaps HTML5 is objecting to a deprecated method. You should use a class or id and separate styling in the styesheet for the width. Img tags used on their own need display: block for width, height, margin etc. to work. .imgright { width: 45%; display: block; border: 5px ridge; background: #655A46; padding: 2px; margin-left: 2%; float: right; } Delete width="45%" in the markup. Does that work?
  22. For addresses there is the address tag http://htmlhelp.com/reference/html40/block.html http://www.w3schools.com/tags/tag_address.asp but you have to style it how you want as it has deafult styling which you may not like. Most browsers render it in italic unless you change that.
  23. I have an online form which sends two emails, one to the user and one to the admin. mail( $email, "Village Hall booking", "$club\r\n$room $book\r\n$day/$month/$year $starttime to $endtime\r\n$replymsg", "From: $admin" ); mail( $admin, "Village Hall booking", "$club\r\n$room $book\r\n$day/$month/$year $starttime to $endtime\r\n$who $phone $email\r\n$message", "From: $admin" ); The \r\n works in all cases except one which is the last in the second email between $email and $message but it does work between all the others including the $endtime and $replymessage in the first email. So in
  24. Thanks, that's something I would never have guessed. Editing for all three fields works now, but the New Entry page doesn't add a new id and data. I changed $stmt->bind_param("ss", $room, $who, $book); by adding an extra s but it doesn't work. When everything is set up for id plus 2 fields like your tutorial, the New Record page does create a new record, but adding the extra s in the above code didn't work for me for id + 3 fields. EDIT Got it. I had to add an extra ,? in if ($stmt = $mysqli->prepare("INSERT villagehallbooking2 (room, who, book) VALUES (?, ?, ?)")
  25. I've been setting up a booking system and I used Ben's topic "basic-php-system-view-edit-add-delete-records-with-mysqli/" http://www.killersites.com/community/index.php?/topic/3064-basic-php-system-view-edit-add-delete-records-with-mysqli/ I've tested with Wampserver and online with three fields (id plus two like Ben's tutorial) and it works, but if I add in an extra field to the database, view.php file and the edit file, I get these warnings "Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of elements in type definition string doesn't match number of bind variables in
×
×
  • Create New...