Jump to content
Killersites Forums


  • Posts

  • Joined

  • Last visited

Everything posted by dms

  1. Is there Sitemap Generator you would recommend for a Mac user? The list that Google supplies only has one for Mac users; several for Windows though for anyone interested... http://code.google.com/p/sitemap-generators/wiki/SitemapGenerators Thanks, Mark
  2. Since you are using $_POST in your form, you might be better served to use it in your PHP script to capture the user input instead of $_REQUEST. Ben example looks good to me, but I'm curious about one item in the mail(). [mail("email@yahoo.com", "Message from the Website", $message, "From: $email" );] Does ["From: $email"] need to be ["From:" . $email]?
  3. I think what your looking to do is to have your navigation in a that you would float: left;. Then have the main content of your page to the right. If so, create a for the main content and set the left-margin to where it will clear the right margin of the float left area. Your navigation will be the same on each page, but the main content will change. eg. if your float left area is 300px wide, you need to set the left-margin of the main content to at least 300px and set your left-padding to meet your needs. You may have to wrap all in a and set the width of the wrapper and the float:left;. I believe this is the basis of what your looking for - hope it helps.
  4. I believe character encoding names are case sensitive, so you might also be sure to capitalize "UTF-8" If you are using an older browser, it may be wise to consider one of the other character encoding specs, such as...
  5. There may be absolutely no use for this, but if you ever do need to insert an item at the beg/end of an array; you could give the key a name with a low sort value, such as... ['1_dinner'] or a high sort value... ['zzz_dinner'], and then use the ksort() along with array_flip(). The only problem I see is that if you have different keys with the same value, you will lose all but the last key/value pair. e.g. <?php $example['breakfast'] = 'ham and egg'; $example['lunch'] = 'steak'; $example['snack'] = 'fish and chips'; $example['1_dinner'] = 'pizza'; ksort($example); foreach ($example as $key => $val) { echo "$key = $val\n"; } $example = array_flip($example); $example['pizza'] = 'dinner'; $example = array_flip($example); print_r($example); ?>
  6. Just learning myself, but if the warning is asking for two parameters, maybe by just adding a comma after $example will work. eg. [array_push($example, ['dinner'] = 'pizza');]. If that doesn't work couldn't you just use $example['dinner'] = 'pizza';
  7. You should be able to download Firefox, then have the option of using Firefox or IE as your browser. Your most likely aware of this, but just in case, here a link to Mozilla for the download; it's free. http://www.mozilla.com/en-US/products/download.html
  8. Can you use Firefox on your laptop and see if it looks better.
  9. The only way that I'm familiar with is to use a programming language such as PHP. Do a search for "php generate password" and you will see several examples. You may want to check out some of the PHP tutorials at the top of this page. Not sure if there is a tutorial on how to generate a password, but it would do you some good to go through the basics.
  10. The user is correct and you also have the same problem while using Safari and Opera while on a Mac. Could you code for Mac/Firefox and then use conditional comments to adjust for IE.
  11. the above code would redirect you in 5 seconds. Will this header function cause the new page to be refreshed every 5 seconds? If not, I like it.
  12. Since this method is being used to retrieve a form, not submit one; I don't understand how someone could inject something into the 'url', after the fact.
  13. You must have 'f' set to 0 (f=0) in you php script or not set at all. Then you must have an the if statement to where... if('f'=form1) the form is included in the page. So, within the link you are resending 'f' through the super global $_get and setting the value to 'form1' which would include the form within the page. Try this: click on your Form 1 link to display the form and then in the url change [?f=form1] to [?f=0] and see what happens. The page will be redisplayed without the form, because 'f' was reset to false which would cause the if statement not to elevate to true, so the form will not be displayed. I believe that [f] is the key in the $_GET array which corresponds to the variable $f in your php code. I hope this is making since, because I'm just learning this myself.
  14. Just learning PHP myself, but I do remember reading something about setting the include_path in the php.ini file. Maybe this is something worth looking into. I would think that [f] would be the index or key within the $_GET array, which is a variable, so you may trying placing double quotes around it. This is a bit over my head. Good luck.
  15. I guess it doesn't really matter, but I assume that single quotes around the [key] is preferred over double. When using a number for the [key], I don't think that you use quotes?
  16. This code is part of a lesson, where using "each() and list()" were required. Thanks for explaining how to clean up the code using the foreach loop. I"m not sure why I placed the double quotes around the two $value[] variables - I think I used an example from one of my books. I did notice that by adding single quotes around the [key] you can remove the double quotes and it works fine. Thanks Ben!
  17. Everything in this code seems to be working except for one desired result - I can not figure out why the total for $grand_total does not calculate. I'm trying to learn some php and I'm at a loss. Thanks in advance, Mark <?php $tax = 0.08; #tax rate is constant $sub_total = 0.0; ?> <?php //two-dimensional array... to hold the product name, price, shipping. $name = array( "Candle Holder" => array( "price" => 12.95, "shipping" => 0.0), "Coffee Table" => array( "price" => 99.50, "shipping" => 0.10), "Lamp" => array( "price" => 42.99, "shipping" => 0.10)); //function to populate the sub_total to include... price, tax, shipping. function tally($price, $shipping, $tax = 0.08) { $sub_total = ($price + ($tax * $price) + $shipping); return $sub_total; } /*using list() and each() to traverse the array and capturing the function return and setting the $sub_total value. while (list($key, $value) = each($name)) { echo "$key: ". "$value[price]". "\n"; $tally_up=tally($price, $shipping); $sub_total += $tally_up; } $grand_total = $sub_total; ?> Total (including tax and shipping): $<? echo $grand_total; ?>
  18. Using Firefox, both links start as green with a lighter green on hover. Both turn brown after clicking. Look again at the post from... falkencreative.
  19. Thanks everyone. Since I use TextMate, and e-texteditor is very similar - we are going to give "e" a go. They offer a 30 day free trial. Thanks again!
  20. A friend is wanting to learn HTML/CSS/PHP and can has windows or linux. Which editor do you recommend. I use textmate, so I'm not familiar. Thanks.
  21. From an article today at stltoday.com... "V-Fluence helped the company (Hilton Hotels) provide an Internet identity to help eliminate hotel searches that pulled up sites featuring Paris Hilton". Googled Hilton Hotels and sure enough, no Paris Hilton in sight. Just curious, how would you go about doing that?
  22. Glad to see your back and that you had a good trip. Post away.
  23. "The vertical-align property sets the vertical alignment of an element".... http://www.w3schools.com/Css/pr_pos_vertical-align.asp eg. vertical-align:middle; or, It seems to me that you could give each link a class such as one_line and two_lines. Set the line-height and then use padding to adjust each class? Just my two cents, but I'm still very new to this. I'm sure others will have a more concrete solution, but the vertical-align property came straight from w3schools.com. Mark
  24. dms

    li ul hide sublist

    I think you should select the list like this, by selecingn the first ul... ul li a { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none; display: block; margin: 1px; padding: 7px; border: 1px solid #990000; background-color: #FFFFCC; color: #990000; size:200px; } ... and select the nested list or submenu by selecting the first ul and then the nested ul. ul ul a { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; text-decoration: none; display: block; margin: 1px; padding: 7px; border: 1px solid #990000; background-color: #FFFFCC; color: #990000; size:200px; } It seems to me that when dealing with nested list, you would need to specify which ul you are referring to. Good luck.
  • Create New...