Jump to content

Don E

Members
  • Posts

    996
  • Joined

  • Last visited

Everything posted by Don E

  1. Don E

    HTML form?

    Yeah, finished it. I found this HTML for dummies book in our house that once use to belong to my brothers' friend. I almost gave it away years ago thinking I wouldn't need it but kept it for some reason not knowing in the years to come I'll be getting into web design/development. I like books because you can always use them for reference, take them with you anywhere and sometimes it's easier on the eyes to read words on paper instead of a screen all the time. Today though, online references are everywhere but keeping a book around isn't a bad idea I'd say.. You'd be amazed what you can learn from a book.... Depending on the individual, their local library can turn them into a genius of sorts. Knowledge pertaining to all kinds of things in life can be found in many books. This has been like this for centuries. Today though if or when it comes to 'reading a book' for most, its books that keep people distracted, like many of the fiction books you see today that become movies. If I'm going to spend time reading a book, it's going to be one that I feel is constructive in some way and helps me progress in whatever I'm trying to accomplish where in the end it not only helps me, but others as well.
  2. The way I see that can be done is via a server side language like PHP, ASP, etc. If you have an idea as to how this is to be done, it's not that difficult. You'd just store the videos to a directory(folder) on the server when they upload, and save the video name in a database table, and depending on the user, you would retrieve the videos(file names; ie: myvideo.flv) from the database table and by doing that along with their video being in the directory, you can use the name to link to the file(video) and depending how you choose to allow them to play the video would be based on video player you will use, you link it to that.Perhaps others can suggest more ways but that's one way.
  3. I messed with it and got it to work via the code below if you're still interested. It worked for me based on your page etc. <!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>DivineDesigns1</title><link href="css/2011.css" rel="stylesheet" type="text/css" /><link href="css/2012.css" rel="stylesheet" type="text/css" /><script type="application/javascript">function ShowContent(div){ document.getElementById(div).style.display = "block"; var divContent = document.getElementById('content').firstChild.nextSibling; var getChildDivs = divContent.childNodes; for(var i = 0; i < getChildDivs.length; i++) { if(getChildDivs[i].nodeName == 'DIV') { if(getChildDivs[i].id != div && getChildDivs[i].className != 'jsmenu' ) { getChildDivs[i].style.display = "none"; } } } } </script></head><body><div id="wrapper"><div id="banna"><table width="1024" align="center"><tr><td width="227" height="161" align="left" valign="middle"><div class="loholder"><a href="www.divinedesigns1.com"><img src="layouts/logo.png" width="214" height="155" border="0" /></a></div><!-- logo --></td><td width="785" valign="top"><div id="slider"><div class="smallmenu"><ul><li><a href="#">DDS1.us</a></li><li class="last"><a href="http://www.divinedesigns1.net">DDS1.net</a></li></ul></div><!-- smallmenu --></div><!-- slider --></td></tr></table></div><!-- bana --><div id="menu"><div class="nav"><div class="mainmenu"> <ul> <li><a href="http://www.divinedesigns1.com">Home</a></li> <li><a href="http://www.divinedesigns1.com/services.html">Services</a></li> <li><a href="http://www.divinedesigns1.com/projects.html">Project</a></li> <li><a href="http://www.divinedesigns1.com/about.html">About Us</a></li> <li class="last"><a href="#">Contact Us</a></li> </ul></div><!-- mainmenu--></div><!-- nav --></div><!-- menu --><div id="content"> <div class="content"> <div class="jsmenu"> <ul> <li><a href="javascript:ShowContent('div1')">Lost</a></li> <li><a href="javascript:ShowContent('div2')">Found</a></li> <li><a href="javascript:ShowContent('div3')">Place</a></li> <li><a href="javascript:ShowContent('div4')">Cover</a></li> <li><a href="javascript:ShowContent('div5')">Welcome</a></li> <li><a href="javascript:ShowContent('div6')">Busy</a></li> </ul> </div><!-- jsmenu --> <div id="div1" style="display:block;">gallery one goes here</div><!-- gallery 1 --> <div id="div2" style="display:none;">gallery two goes here</div><!-- gallery 2 --> <div id="div3" style="display:none;">gallery three goes here</div><!-- gallery 3 --> <div id="div4" style="display:none;">gallery four goes here</div><!-- gallery 4 --> <div id="div5" style="display:none;">gallery five goes here</div><!-- gallery 5 --> <div id="div6" style="display:none;">gallery six goes here</div><!-- gallery 6 --> </div><!-- .content --></div><!-- content --><div id="footer"><table width="1024"><tr><td width="394" height="38" style="font-size:10px; font-weight:300; color:#CCCCCC; padding-left: 2px;">COPYRIGHT (C) 2011 DIVINEDESIGNS1.COM ALL RIGHTS RESERVED.DDS1.SITES</td><td width="480"></td><td width="134"><div class="footnav"><ul><li><a href="#">Policies</a></li></ul></div><!-- footmenu ---></td></tr></table></div><!-- footer --></div><!-- wrapper --></body></html>
  4. Black page? That's strange. The code works perfectly for me as intended in Chrome and Firefox and not getting any errors from Firebug. When I click on Lost, 'gallery one goes here' shows. When I click on Found, 'gallery one goes here' disappears and instead 'gallery two goes here' appears. etc etc..
  5. DDs, Are you simply trying to show one div when clicking on it and closing all the others? If so, here's a suggestion if you're interested: <!doctype html><html><head><title>DDs1</title><script type="application/javascript">function ShowContent(div){ document.getElementById(div).style.display = "block"; var divs = document.getElementsByTagName('div'); for(var i = 0; i < divs.length; i++) { if(divs[i].id != div && divs[i].className != 'jsmenu') divs[i].style.display = "none"; } } </script> </head><body><div class="jsmenu"> <ul> <li><a href="javascript:ShowContent('div1')">Lost</a></li> <li><a href="javascript:ShowContent('div2')">Found</a></li> <li><a href="javascript:ShowContent('div3')">Place</a></li> <li><a href="javascript:ShowContent('div4')">Cover</a></li> <li><a href="javascript:ShowContent('div5')">Welcome</a></li> <li><a href="javascript:ShowContent('div6')">Busy</a></li> </ul> </div><!-- jsmenu --> <div id="div1" style="display:block;">gallery one goes here</div><!-- gallery 1 --> <div id="div2" style="display:none;">gallery two goes here</div><!-- gallery 2 --> <div id="div3" style="display:none;">gallery three goes here</div><!-- gallery 3 --> <div id="div4" style="display:none;">gallery four goes here</div><!-- gallery 4 --> <div id="div5" style="display:none;">gallery five goes here</div><!-- gallery 5 --> <div id="div6" style="display:none;">gallery six goes here</div><!-- gallery 6 --> </body> </html>
  6. Don E

    What's wrong with this?

    I think why they are saying 'you're connecting wrong' is because if all the info is correct, you never end up making a connection with the above if that's your intent. If the 'if' or 'elseif' is FALSE, because you have it if it's TRUE if they are FALSE, but if all the info correct, the if and elseif get skipped it just returns $err if it's set or not. The only way $err gets set to one of the error messages in the switch is if it enters the 'if' or 'elseif'. When you call it like this and then echo and all info correct, meaning connection info, password, db etc, when echoing $error, it will be blank: $error = dbConnect('yourhost','user','pass','yourdb'); echo $error; Just my two cents.. I could be wrong.
  7. Don E

    HTML form?

    I actually(physically) have that book. Pretty good book.
  8. Don E

    PHPMyADMN?

    He means for you to try and LOG IN by using 'root' as the username and 'blank'(meaning empty, nothing in the password field) for the password field..
  9. From the looks of it, it's still send the email regardless because if you look at this part(see comments): if($display_form){ // If this is true, it means any of the form fields are empty; this should display FIRST when a user comes to the page to begin with. ?><table border="0" align="center" width="405"><tr><td width="399"><form method="post" action="<?php $_SERVER['PHP_SELF']; ?>"> <label for="subject">Subject of email:</label><br /> <input id="subject" name="subject" type="text" size="30" value="<?php echo $subject; ?>"/><br /> <label for="divineblast">Body of email:</label><br /> <textarea id="divineblast" name="divineblast" rows="8" cols="40"><?php echo $text; ?></textarea><br /> <input type="submit" name="Submit" id="submit" value="Submit" /> </form></td></tr></table><?php } // This is the end of the IF statement. After this, everything below will run thus sending the email regardless if the form fields are empty or not $dbc = mysqli_connect(ty, ty, ty', 'ty') or die('Error connecting to MySQL server.'); $query = "SELECT * FROM newsletter"; $result = mysqli_query($dbc, $query) or die('Error querying database.'); while ($row = mysqli_fetch_array($result)){ $to = $row['email']; $first_name = $row['fname']; $last_name = $row['lname']; $msg = "Dear $firstname $lastname,\n$text"; mail($to, $subject, $msg, 'From:' . $from); echo 'Email sent to: ' . $to . '<br />'; } mysqli_close($dbc);?> What you have to do from the looks of it is ONLY send the email when ALL the form fields are not empty(!empty()).
  10. Don E

    HTML form?

    Hey Rizwan, User Err responded to your thread about that giving you an idea as to how to go about doing that: http://w3schools.invisionzone.com/index.php?showtopic=42899
  11. Don E

    HTML form?

    After opening your file in notepad++, this is what I get. Is that what you're referring to Eduard?{\rtf1\ansi\ansicpg1252\deff0\deflang3082{\fonttbl{\f0\fnil\fcharset0 Courier New;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fcharset0 Arial;}}{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\f0\fs20 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\par"http://www.w3.org/TR/html4/strict.dtd">\par\lang2057\f1\fs24\par<html>\par<body>\par\par<form action="form_action.asp">\parFirst name: <input type="text" name="FirstName" value="Mickey" /><br />\parLast name: <input type="text" name="LastName" value="Mouse" /><br />\par<input type="submit" value="Submit" />\par</form>\par\par<p>Click the "Submit" button and the input will be sent to a page on the server called "form_action.asp".</p>\par\par\lang3082 </body>\par</html>\par\f2\fs20\par}
  12. Have you tried the htmlspecialchars_decode() and/or html_entity_decode() functions? http://www.php.net/manual/en/function.htmlspecialchars-decode.phphttp://www.php.net/manual/en/function.html-entity-decode.php
  13. From the looks of it, you did your layout with tables. According to today's standard, use div's, sections, etc to layout your page and only use tables for displaying tubular data. With div's, you can use padding, margin, floating, etc to do your layout. As many would suggest on this board, do not use the CSS positioning to layout your page but only if it's absolutely necessary, especially absolute positioning. You're already using div's in a lot of places with your tables, it shouldn't be difficult to rearrange things around. But just a suggestion. IF you really don't want to do any re-do, just add a "wrapper" around everything and give it a width of 960px to try and center everything. CSS: #wrapper { width: 960px; margin-right: auto; margin-left: auto;} <body><div id="wrapper">all your tables and divs in here </div></body> Note: Adding: margin: 0 auto; to the first table style attribute should center that table on the page.(Same as doing: margin-left: auto; margin-right: auto;)
  14. Yeah, basically post your html and css here, like this poster did here: http://w3schools.inv...showtopic=42856 You have the options of surrounding your code between code blocks(you paste your code in here if you want) as well.
  15. If the content is inside a wrapper div, in your CSS you can try something like: #wrapper { width: 960px; /*fixed width*/ margin-right: auto; margin-left: auto;} Probably posting your code would be a good idea giving others the opportunity in helping you further.
  16. For the forms, you have to have the name attribute for the input element in order for $_POST to work after submitting. Try this instead: <form name="login" action="index.php?do=login" method="post"><input type="hidden" id="do_rblogin" value="1" /><table border="0"><tr><td>Username:</td><td><input type="text" name="user_text" /></td></tr><tr><td>Password:</td><td><input type="password" name="user_pass" /></td></tr></table><input type="submit" value="Submit" /><input type="reset" value="Clear" /></form> .... instead of id. <form name="register" action="index.php?do=register" method="post"><input type="hidden" id="do_rbreg" value="1" /><table border="0"><tr><td>Username:</td><td><input type="text" name="user_text" /></td></tr><tr><td>Password:</td><td><input type="password" name="user_pass" /></td></tr><tr><tr><td>Confirm Password:</td><td><input type="password" name="user_cr_pass" /></td></tr><tr><td>Email:</td><td><input type="text" name="user_email" /></td></tr></table><input type="submit" value="Submit" /><input type="reset" value="Clear" /></form> Then if you want once the form(s) is submitted, you can assign variables like so:$username = $_POST['user_text'];$user_email = $_POST['user_email']; etc...
  17. DDs, You mean the value of a variable is being shown(outputted) when using something like this(single quotes): echo 'Hello, my name is $name and I'm $age years old.'; ?Which part were you referring to with it working with single quotes?
  18. <a href="\http://www.mywebsite.com/index.php?id=$id\"><b><? echo $title</a>;?></b></a> <br> The / is because of the highlight above. In order to get the $id to work, you can try something like: <? echo '<a href="http://www.mywebsite.com/index.php?id=' . $id . '"><b>' . $title . '</b></a> <br/>'; ?>
  19. jQuery is JavaScript, yes can do same. Are you trying to place opacity over the image when clicked on Display and only on the image itself? In other words, you want to wrap opacity over the image itself when clicked on Display?
  20. Are you a web designer? You're suppose to know this if you are and especially if you want to earn money making websites for people.
  21. Thanks for that explanation. It seems that nowadays wordpress "type" sites are everywhere. I have noticed that a lot of people who have web design companies use wordpress for making their clients' websites. This is basically okay, but in your opinion, would you recommend/advise people who are serious about web design/development to stay away from such things at first? Also with things such as jQuery? I personally think jQuery is great but I told myself to stay away from it for now and focus on JavaScript itself. I understand these are "time savers" but what if one day a client asks for something that these libraries don't have? I know that would be rare with jQuey because it has a lot going on, but if someone goes to work for a company and they ask you to make a simple sliding div and they say no jQuery, you'll be scratching your head... (when saying "you", I'm generally speaking)Thanks again.
  22. JSG, when you say "basic" web programming, what do you mean exactly? Design side? Development(back end)? OR.. do you mean basic as in HTML/CSS?Thanks.
  23. Thanks for the responses. Interesting observations by everyone, even Shadow's remark about the gment. ;)Jsg, thanks for the links.From the looks if it.. it boils down basically to a variety of things as to why IE is the way it is... varies from Microsoft themselves and the internet users(not upgrading, or/and having illegal copies of Windows). So in the future soon, we won't have to worry about writing specific code for IE, ie: attachEvent etc.. but basically use the "standards" like we do for other browsers now like FireFox, Chrome etc..
  24. Hey everyone, As everyone knows, IE has some issues... I don't know if this has been asked before or not since I can't search because of the search not working at the moment, but what is the deal with IE and why doesn't Microsoft get with the game? Why does it seem like they like or enjoy being "jerks" when it comes to their web browser? It just makes everything complicated for everyone. Is there a particular reason why they are like this? Perhaps it's because most of the world uses Windows and they think the world should comply with their standards of what a browser is or should be like? Or... does all this go back to the 'browser wars'(IE vs. Netscape) days? As their versions progress, they seem to be getting in the game, slowly, but when are they officially going to be like the other browsers? IE10? IE20? IE50? ;)I would appreciate everyone's input on this, especially those who have been in the game of web design/development for awhile now. Thank you!
×
×
  • Create New...