Jump to content
Killersites Forums


Advanced Member
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Wickham

  1. If you use an image map you don't have to worry about @font-face. You use the photoshop image you already have linked in your first post complete with the black text and use it as the map image and then create hotspot links over the top of it. Stretching a page to suit all window resolutions is not a good idea. Just create it as a fixed width place it in a wrap div with a width: ??px; margin: 0 auto; position: relative; which will center it in large window widths.
  2. Wickham

    beginners php

    The php processing page that works from the submit button in the form action="..." is talosresponse110209.php and the one working from the Query link is talosform_response110209.php so look for the corresponding places where the codes are in the page with the form talos110209.php
  3. Wickham

    beginners php

    I've edited the submit button response to add in the other input boxes.
  4. Wickham

    beginners php

    I've downloaded your code and I think you are doing two things (I was only thinking about the submit button, not the Query String). I've tested these codes, I used the main file with the form and then one PHP file to operate the submit button and another to operate the query string. I'm not sure if they can be combined. Try this http://www.wickham43.com/forumposts/talos110209.php filling in the input boxes and using the submit button for one result or using the query string link for the preset result with stefan and email for the other:- talos110209.php <!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" /> <title>Untitled Document</title> <style type="text/css"> body { background-color: #FFC; } </style> </head> <body> <br> <form method="post" action="talosresponse110209.php"> <div class="form_element_div"> First Name: <br> <input name="name_first" type="text" size="50" maxlength="200"/> </div> <div class="form_element_div"> Email: <br><input name="email" type="text" size="50" maxlength="200" /> </div> <div class="form_element_div"> Favorite colour: <INPUT type=radio value="red" name="colour"/> red <INPUT type=radio CHECKED value="yellow" name="colour"/> yellow <INPUT type=radio value="blue" name="colour"/> blue </div> <br> <div class="form_element_div"> Favorite Website: <select name="favorite-website"> <Option value="" selected>Please Select</Option> <Option value="www.killerstes.com">killersites.com </Option> <Option value="www.killerphp.com">killerphp.com </Option> <Option value="www.google.com">google.com </Option> </select> </div> <br> <div class="form_element_div"> Comments: <br> <textarea name="comments" cols="50" rows="2" id="description" ></textarea> </div> <br> <div class="form_element_div"> <input type="submit" name="submit_button" value="Submit Request >>" class="submit" /> </div> </form> </div> <div style="margin-top:25px;"> <a href="talosform_response110209.php?email=videos&name_first=stefan" >Query String</a> </div> </body> </html> The talosresponse110209.php for the submit button <!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" /> <title>Untitled Document</title> <style type="text/css"> body { background-color: #FFC; } </style> </head> <body> <div id="topbar"></div> <div id="navigation" class="container"></div> <div id="centerDoc" class="container"> <div style="margin-top:25px; margin-bottom:20px; "> </div> <div> <?php if(isset($_POST['submit_button'])) { // FORM PROCESSING CODE - USING 'SUPER GLOBALS' - KILLERPHP.COM $first_name = $_POST['name_first']; $email = $_POST['email']; $colour = $_POST['colour']; $website = $_POST['favorite-website']; $comments = $_POST['comments']; print "<p>First Name: $first_name with an email of: $email and Favorite Colour: $colour and Favorite Website: $website and Comments: $comments</p>"; } ?> </div> </body> </html> and talosform_response110209.php for the Query String link <!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" /> <title>Untitled Document</title> <style type="text/css"> body { background-color: #FFC; } </style> </head> <body> <div id="topbar"></div> <div id="navigation" class="container"></div> <div id="centerDoc" class="container"> <div style="margin-top:25px; margin-bottom:20px; "> </div> <div> <?php $first_name = $_GET['name_first']; $email = $_GET['email']; print "<p>First Name: $first_name with an email of: $email</p>"; ?> </div> </body> </html> Both the submit button (fill in the boxes with whatever you want) and the Query string (with preset entries)work. The two processing files are nearly the same except one uses POST and the other uses GET (if you switch them in either file you get errors).
  5. Wickham

    beginners php

    Two suggestions:- Never have a space in name="..." like in <select name="favorite webite"> , edit to <select name="favorite_webite"> or <select name="favorite-webite"> Also I think you don't need the curly { } brackets in print "First Name: {$first_name} with an email of: {$email}"; Try this print "First Name: $first_name with an email of: $email"; You can add p tags for correctness:- print "<p>First Name: $first_name with an email of: $email</p>"; but I'm not sure if those cure the problem with $email as the variables $first_name and $email look OK. Edit: there are coding errors in the html:- <div class="form_element_div"> First Name: <br> <input name="name_first" type="text" size="50" maxlength="200" /> </div> <div class="form_element_div"> Email: <br><input name="email" type="text" size="50" maxlength="200" /> </div> ......... <input type="submit" name="submit_button" value="Submit Request >>" class="submit" /> I added / inside the > at the end of input tags (should be for all of them when using XHTML doctypes, but not for HTML doctypes) and I added /> at the end of the email and submit input tags where the > was missing. As a last resort if the above fail, try editing the PHP code from <?php // FORM PROCESSING CODE - USING 'SUPER GLOBALS' - KILLERPHP.COM $first_name = $_POST['name_first']; $email = $_POST['email']; print "First Name: {$first_name} with an email of: {$email}"; ?> to <?php if(isset($_POST['submit_button'])) { // FORM PROCESSING CODE - USING 'SUPER GLOBALS' - KILLERPHP.COM $first_name = $_POST['name_first']; $email = $_POST['email']; print "First Name: $first_name with an email of: $email"; } ?>
  6. If you are using one image for all the black text on the background you can use an image map and then code coordinates for the link hotspots. See http://www.wickham43.net/imagemaps.php However, image maps seem to have gone out of favor so you could create your own font (or download it) and use @font-face which styles the text in normal h1 to h6 tags or p tags. http://www.wickham43.net/css3.php#font-face This would be better for SEO, but I don't know where you got the font from. Image maps just use the whole image with all the text and create separate links over each item. What white spaces? Around the side? Most people would leave as you have it but place it in a wrap div with a width: ??px; margin: 0 auto; position: relative; which will center it in large window widths.
  7. Wickham

    Favicon Question

    This url http://customhcg.com/favicon.ico still shows the Magento icon. I meant that you have to change the image uploaded into that directory because it's still the Magento image that I see in that link.
  8. Wickham

    Favicon Question

    Favicons can be in the root directory and also in a link in the page head section. In fact, a favicon should always be in the root directory and then you don't usually need it in the page head section link unless you want a different favicon for only that page. This link to the favicon.ico in your root directory http://customhcg.com/favicon.ico shows the Magento favicon, so change it in the root directory to your leaf icon (which must be called favicon.ico). Edit - it may take some time for a search engine to take the new favicon. http://www.thesitewizard.com/archive/favicon.shtml says "You don't need to upload one to every directory of your site if you don't want to waste space - simply put it in your root directory and the web browsers that support favicons will apparently locate it eventually." and "IE...tries to obtain that icon by first requesting for "favicon.ico" from the directory of your web page. If it cannot find such a file, it will try to obtain it from the root directory of your website" I found this which shows where to find the root dirctory when using a Magento theme:- http://www.magentocommerce.com/knowledge-base/entry/tutorial-changing-the-magento-favicon/
  9. That's a common question but the solutions can be a bit complicated. Here's one:- http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks and some more in items 16 to 19 here:- http://www.wickham43.net/firefoxbackground.php
  10. It's probably because if you are coding a website for a Client and it's got a few problems, you don't want a link to it in a forum that a search engine could get hold of, which might mean lots more people having a look at it and the Client, if he found out, might not like his unfinished website being online with lots of errorrs. So giving a tiny url or a plain text url which isn't a hyperlink is one way to allow a few people here to look at it without it being broadcast far and wide.
  11. Your action in the code above needs "> afer .cgi, but that may not solve the problem. We need to see the code in userform.cgi because that will have the code for the "From". If it says Nobody at present, change it to the url you want showing as the From address.
  12. The link in the head section should be <link rel="stylesheet" type="text/css" media="screen" href="root.css" /> Sometimes when you save a file from a text editor it gets saved with a .txt extension like root.css.txt so check in your file manager and delete the .txt extension if it's been automatically added on.
  13. As a general rule, you can code position: absolute elements anywhere in the body html markup part of the page code and it doesn't affect the position they show on the screen. Every position: absolute element should also have either top or bottom and left or right with a size and also a width and height. Your #navigation and #centerDoc don't have all of these. The position: absolute positions on the screen will relate to the corners of the body (the window) or a parent element that has position: relative, regardless of where they are coded in the body markup. If you code elements without position: absolute (no position) or with position: relative, the order of coding in the body section is very important as each element follows the one before and positions itself relative to the ones before and after in the coding sequence.
  14. No issues in Firefox 3.6.13, IE7 or Chrome (no rounded corners to Subscribe in IE7 as expected). Has Stefan got Firefox 4 beta?
  15. You should be able to do it if you code the images float: left; or float: right; and display: block; with sizes and then let the text in the middle move up into any space between them. See http://www.wickham43.net/threecolumns.php item 8 which allows text to wrap under either side element or item 9 where the central text is in a div with left and right margins to stop the wrapping if you do NOT state a width or float for the div with the text. Item 11 is the same but with flexible width and shows the middle div change width with different window widths. Images left and right should probably be #left { float: left; width: ??px; display: block; } #right { float: right; width: ??px; display: block; } #mid { margin-left: ??px; margin-right: ??px; /*no float: left; and no width; margins as image width*/ } <img id="left" src="left.jpg" alt="Left image"> <img id="right" src="right.jpg" alt="Right image"> <div id="mid"><p>Middle text</p></div> <!--this must be coded after the two floated images--> You will probably need clear: both; in the style of the first element lower down to clear the floats.
  16. HTML5 hasn't been released yet! It's still in draft stage http://dev.w3.org/html5/spec/Overview.html although many people are coding it and most browsers can process at least some of it. HTML5 goes hand-in-hand with CSS3 to offer new features which in many cases will avoid using javascript or Flash. It's still too early to judge the merits of HTML5 although I use some features of CSS3 which work in all major browsers and won't cause any serious harm if they don't.
  17. You can do that but the PHP code becomes a bit more complicated. You have to get the order of processing correct. The page has to be coded so that the action is ignored at first while the form input boxes are empty, then after clicking the submit button the action processes the same page again starting from the top again and this time the code knows that the boxes have content so it processes the action. Here is an example http://www.wickham43.net/formphptomysql.php The PHP is coded before the form, but is ignored on the first pass and only processed on the second pass after submission. You won't see the PHP code in the online page source code but it is shown on the page. The form submits to a database but you could adapt for sending an email.
  18. I thought I'd do a further test - is inheritance disabled if you mis-spell another style? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> body { font-family:arial, sans-serif; color: red; } h1 { font-family: arrrial; color: bluue;} </style> </head> <body> <h1>Test</h1> </body> </html> Here bluue spelling is wrong so Google Chrome DOES inherit red from body, but if font-family: arrrial is mis-spelt it does NOT inherit the body style. Very odd.
  19. Yes, there is an error. Spelling sans-sefif; but that's irrelevant as Arial is chosen first for the body. That's all very odd because the w3.org page says font-family is inherited. Edit I know why Bens test show serif. If the first example has the h1 style deleted it will show arial <style type="text/css"> body { font-family:arial, sans-serif; } h1 { font-family: /*"Unknown font"; */} </style> so it seems that inheritance only works where there isn't a style for the child. If the child's style is rubbish or an unknown font-family the inheritance doesn't happen.
  20. Item 5.2.2 here http://www.w3.org/TR/REC-CSS1/#font-family says inherited and this is the w3.org website, but of course, what does inherited really mean? As far as I know, browsers always ignore a style that they can't process, so the inheritance should mean from a parent , ie the body. Edit, just found this on the same page:- 1.3 Inheritance In the first example, the color of 'H1' elements was set to blue. Suppose there is an 'H1' element with an emphasized element inside: <H1>The headline <EM>is</EM> important!</H1> If no color has been assigned to the 'EM' element, the emphasized "is" will inherit the color of the parent element, i.e. it will also appear in blue. Other style properties are likewise inherited, e.g. 'font-family' and 'font-size'. There's your answer.
  21. I've got a tutorial for exactly that, 3 thumnails and larger popups appearing in the same place as each other:- item 2 http://www.wickham43.net/hoverpopups.php All the styles are in the stylesheet. See the /*THUMBNAIL HOVERPOPUPS*/ section in http://www.wickham43.net/tutorial.css Good luck. Edit: You may not need to look at the code in my tutorial because it's very similar to your code. I can get your code to work in IE7 and Firefox with the edits below. I can see a few things which are affecting IE7:- You have a missing </span> in the first image code <div style="float:left;width:300px;text-align:center;"> <div style="text-align:center;line-height:21px;font-size:14pt;padding-bottom:15px;padding-top:15px;"><strong><a href="#">start Your Own Group</a></strong></div> <div style="text-align:justify;padding:5px 5px 15px 5px;">Easily set up your own groups or join an existing group. You an even set up private groups that are only for people you invite and which you have total control over. Within your group you can manage your own forums as well.</div> <br /> <a class="thumbnail" href="#"><img src="#" width="300" height="171" alt="groups" /><span><img src="#" width="600" height="342" alt="join a group" /></span></a> <!--</span> added here before </a>--> </div> <!--<br /> <br />--> and delete the br tags between the three sets of code as it makes the three floated divs stagger in IE7 (the second is slightly lower than the first and the third lower than the second). I also think that a container width: 94% and divs inside width: 300px plus margins will cause trouble when the 94% of a small width window isn't wide enough. Don't mix px with %.
  22. I'm guessing because I don't know the answer either. If a browser looks for Verdana and can't find it, I think it will use the body style, the first one it can process.
  23. That's what happens in this link http://www.stunicholls.com/various/more.html when you click on "more" There are other scripts if you Google for Expand/contract or show/hide.
  24. I haven't got Expression Web so I don't know exactly what happens when you use Reformat HTML but if you use a simple editor like Notepad you type & # 6 4 ; (without spaces) and then save like that. Viewed in Notepad you still see & # 6 4 ; but when you view the HTML page, locally or online, you see @ and the email program processes it as @. So my question is, why do you have to use reformat HTML? As a matter of interest, has anyone used this method in the Killersites tutorial that substitutes the & # 6 4 ; for @ as I'm not confident about it. Why can't a spambot computer just compute & # 6 4 ; as @ and send an email? I used a javascript obfuscation in my early websites (not the one in the Killersites tutorial) and never knowing had spam and now I use a PHP form, but the @ method looks simple and I'd like to know if it really is safe.
  25. This raises a question I had some time ago. Why put a date after a copyright notice? I found that some of my old pages had a fixed date which was several years old, so I wondered whether to put a PHP code for the current year, so that even though the page was coded a few years ago the date would be current, or just to leave out the date. Copyright is for ever, isn't it? My websites now have a mixture of current date and no date. A question for those legal people among us.
  • Create New...