Jump to content

dan_t

Members
  • Posts

    137
  • Joined

  • Last visited

Everything posted by dan_t

  1. OK, so lets say I wanted an if else statement that said: if answer were blue echo good job else Try again. How would I go about that? Dan
  2. Hi, Somehow I lost my last post. I took a class last year on php where we worked with a form. we did it so fast that I never really understood what we did. My question is how do I get my input from the text box in the form to an if - else statement? here is a small example: <html> <head> <title>Forms!!</title> </head> <body bgcolor="#cccccc"> <?php if ($_GET['form.php']) { echo ('data = '.($_GET["name"])); } ?> <form action="form.php" method="get"> <p>This is to be sent:<input type="text" name="value" /></p> <input type="submit" name="submit" value="send" /> <input type="reset" name="reset" value="redo" /> </form> </body> </html> I used the get method so I could view it in the browser. It says value= whatever I type in, but how do I grab it? Please help me understand, if you wouldn't mind. Thanks Dan
  3. dan_t

    centering

    Hello, I know probably a million people have asked this question, But Everyone says not to use tables, but to use CSS instead. I can center a web page with no problems at all with tables. But I can not for the life of me center a site with CSS. I have tried putting the main page in a div tag named container and everything else inside(in div tags), but it just won't center. I've read up on it, googled it, tried zeroing out the margins. I just can't do it! What's the trick? I sure could use the help. Thanks
  4. Actually, I found two things looking it over (a half-a-million times). 1. I spelled length wrong. 2. The non-capital Zip on the function. I am sure there are many more. I am not up to speed on javascript yet, so I haven't learned a lot about regex yet. Thanks Dan
  5. Hello, Could someone take a look at tis and see where I went wrong? I tried validating it, it did not show anything that made a difference. Thanks Dan <script language="javascript" type="text/javascript"> <!-- begin function validateZip(field) { var valid = "0123456789-"; var hyphencount = 0; if (field.lenght!=5 && field.lenght!=10) { alert("Please enter your five digit or five digit +4 zip code"); return false; } for (var i=0; i < field.lenght; i++) { temp = "" + field.substring(i, i+1); if (temp == "-") hyphencount++; if (valid.indexOf(temp) == "-1") { alert("Invalid characters in your zip code. Please try again."); return false; } if ((hyphencount > 1) || ((field.lenght == 10) && ""+field.charAt(5)!="-")) { alert("The hyphen character should be used with a properly formatted 5 digit+4 zip code like '12345-6789'. Please try again."); return false; } } return true; } //end--> </script> </head> <body> <form name="zip" onsubmit="return validateZIP(this.zip.value)"> Zip: <input type="text" size="30" name="zip" /> <input type="submit" value="submit" /> </form>
  6. dan_t

    Text wrapping

    The line in the middle is the cursor.
  7. dan_t

    Text wrapping

    Hi, I have an image on the left, and am putting my text on the right. My first line of text does fine, but when I break, it throws the next line under the image. I cannot reduce the size of my cursor be side the image either. Dan http://img.villagephotos.com/p/2008-12/1330692/reduce.jpg
  8. I wasn't really sure where to ask this question. If I have a site (not online) or a page, and wanted someone to check it and give advice. How would I go about showing it, with it offline? Thanks
  9. dan_t

    Table

    Hi, Thanks haku. I think I have some pretty decent stuff in the works, For an amatuer that is.
  10. Hello, Thanks, I was in the middle of making a new structure with CSS. I will put your advice to good use. Any ideas would be helpful. For contentor what ever. Thanks
  11. oh, and what in the world is that "zz" thing? I have never seen that before. Dan
  12. Darn you guys are good! OK, even though I don't quite understand it, it worked. But why didn't it work without that?
  13. Hello everyone, I was fiddling with what I thought would be simple, but I can't get it to work. I would like some one to check it out andtell me why. Thanks <select name="find"> <option value="a">I'm a regular customer</option> <option value="b">TV Advertising</option> <option value="c">Phone directory</option> <option value="d">Word of mouth</option> </select> <?php if ($find == "a") { echo "<p>Regular customer.</p>"; } elseif ($find == "b") { echo "<p>Customer referred by TV advert.</p>"; } elseif ($find == "c") { echo "<p>Customer referred by phone directory.</p>"; } elseif ($find == "d") { echo "<p>Customer referred by word of mouth.</p>"; } else { echo "We do not know how this customer found us.</p>"; } ?>
  14. in Firefox, I am missing the 'Product Information' section. Hello, For some reason i foxfire, it takes the third row and puts it down in the header section(bottom- left side) Do you have any idea why it would do that? Thanks
  15. Hello, OK, I have made a lot of suggested changes to the site. Please tell me if I am going in the right direction. I completely changed everything except the pictures, and I think I am going to change those also. I did change the logo as suggested. I used the Fireworks I purchased on Ebay, for the first time. I ofcoarse wasn't really that smooth with it , but it's a start. I am brand new at using PHP. Only took a class. And I don't do this for a living, so I don't get a lot of practice, that's why I look to you guys for help. And I really do appricate it! Thanks Dan
  16. dan_t

    Table

    This is probably a dumb question, but can you do a table with CSS? Also I heard you can put a background image in a table. How? I would like to see what that looks like.
  17. That worked great!! Thanks very much. That really helped! Dan
  18. I am trying to center my sites shell without centering the text inside. Any right ways? Every time I try, no matter what way, it centers all the text inside. It even centers my nav bar, which looks terrible centered. Any ideas would help. Thanks Dan
  19. What exactly do you mean by single links? Could you elaborate just a little more.
  20. ILMV, What makes one site amature, and another not. Is it simplicity, or errors, or lack of content. This would be very useful information in updating the site.
  21. maq, When you said id needed more content, what type do you mean? News, Tips, pictures, ads? Last site, I really felt I over did with useless stuff. It didn't take long to muddy it up, and make it all very confusing.
  22. Thanks, That helps quite a bit.
  23. While I'm trying to learn what seems to be 100 years of stuff, here is a burning question that I just can not figure out. Although I know where to use it (sort-of), I don't know why or what. Here is the piece of the code: if (!isset($_REQUEST['content'])) The question: If WHAT isn't set? Above it, below it, What am I looking for? I just don't get it.
  24. Actually, PHP is the new one, and quite a bit more complicated, at least for now. Possibly for a long time to come. I'm a fairly slow learner, it takes quite a while to sink in. My last site was 95% HTML, and I really overdid it. I am trying to keep this one simple and NOT over do it. But to simple is boring. Where is the proper stopping point? If it is a natural born talent, I'm afraid I don't have it.
  25. No, you used PHP, Html and CSS. PHP simply sends html to the browser, your browser then interprets that html to make the page. And no, not all browsers work the same unfortunately. Yes, I forgot about that. Thanks, I guess it will never look the same in all of them.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.