Jump to content

Xtazy

Members
  • Content Count

    140
  • Joined

  • Last visited

Everything posted by Xtazy

  1. Xtazy

    my website

    I afford to turn off my computer because I don care if I have much visitators or not, I just wanted to install myself an Apache server and to show a friend of mine (who is also good at web programming) at I have done...Then I'll use a paid host to keep my website and I'll buy a domain too...I usually don't play many games neither download too much files on my computer, but I always turn on the server when I', turning on the computer....
  2. Xtazy

    Guestbook Script

    i used this one...so, you create a new PHP file named addbook.php , which code is this: <?php(isset($_POST['message']))?$message=$_POST['message']:$message='';(isset($_POST['name']))?$name=$_POST['name']:$name="";if ($message != ''){ $message = str_replace ("\n","<br>",$message); $message = strip_tags ($message, '<br>'); $newRow = '<div class="viewGuestbook">' . ($message) . '<br>' . date('d.m.Y H:i') . ' - ' . strip_tags ($name) . '</div>'; $oldRows = join ('', file ('guestbook.txt') ); $fileName = fopen ('guestbook.txt', 'w'); fputs ($fileName, $newRow . chr(13) . chr(10) . $oldRows); fclose ($fileName);}include ("readbook.php");?> next one: readbook.php : <div class="guestbookTop"><a href="postform.php">Write</a> to a guestbook<br><br></div><?php$fileName = file ("guestbook.txt");$rows = count ($fileName); if ($rows > 10){ if (!isset ($row) ) { $row = 0; } print ("<table class=\"guestbookLinks\"><tr><td width=\"50%\">"); if ($row > 0) { echo "<div class=\"nextPage\"><< <a href=\"readbook.php?row=" . ($row - 10) . "\">Next 10</a></div>"; } print ("</td><td width=\"50%\">"); if ( ($rows - $row) > 10) { echo "<div class=\"previousPage\"><a href=\"readbook.php?row=" . ($row + 10) . "\">Previous 10</a> >></div>"; } print ("</td></tr></table>"); for ($i = $row; $i < ($row + 10); $i++) { echo $fileName [$i]; }}else{ for ($i=0; $i < $rows; $i++) { echo $fileName [$i]; }} ?><div class="guestbookUp"><br><br><br><br> <a href="postform.php">Write</a> to a guestbook</div> and postform.php : <div class="normalText"><form action="addbook.php" method="post">Message<br><br><textarea name="message" cols="50" rows="7" class="textbox"></textarea><br><br>Name<br><br><input type="text" name="name" size="48" class="textbox"><br><br><input type="submit" value=" Submit " class="textbox"></form></div> And also create a .txt file named guestbook.txt , where the messages from your guestbook will be saved...It's not smth sophosticated, but it's good enough
  3. Xtazy

    switch banners

    Ah well, I've finally found a good script. Take a look: <?php $banner[1]['link'] = "http://something.com"; $banner[1]['img'] = "picture.jpg"; $banner[2]['link'] = "http://something.com"; $banner[2]['img'] = "picture.jpg"; $banner[3]['link'] = "http://something.com"; $banner[3]['img'] = "picture.jpg"; $banners=3; srand((double)microtime()*1000000); $random = rand(1,$banners); echo "<a href=\"".$banner[$random]['link']."\"><img src=\"".$banner[$random]['img']."\" border=\"0\"></a>"; ?>
  4. Xtazy

    switch banners

    Maybe, but I was wondering how .
  5. Xtazy

    switch banners

    ok, so I have two banners for my website (till now), and I want them to be changed everytime the guest moves from one page to another one...even though he is in index.html, when he refreshes the page i want the banner changed...i think i should have posted this on the javascript category, dunno...thanx in advance!xtazy
  6. Xtazy

    Guestbook

    nope, that code was broken too, this one is correct, i'm sure of it: <?php(isset($_POST['message']))?$message=$_POST['message']:$message='';(isset($_POST['name']))?$name=$_POST['name']:$name=""; if ($message != ''){ $message = str_replace ("\n","<br>",$message); $message = strip_tags ($message, '<br>'); $newRow = '<div class="viewGuestbook">' . ($message) . '<br>' . date('d.m.Y H:i') . ' - ' . strip_tags ($name) . '</div>'; $oldRows = join ('', file ('guestbook.txt') ); $fileName = fopen ('guestbook.txt', 'w'); fputs ($fileName, $newRow . chr(13) . chr(10) . $oldRows); fclose ($fileName);}include ("readbook.php");?> i added this two lines:(isset($_POST['message']))?$message=$_POST['message']:$message='';(isset($_POST['name']))?$name=$_POST['name']:$name=""; instead of$message = $_POST['message'];and this line is good:'<br>' . date('d.m.Y H:i') . ' - ' . strip_tags ($name) .$name is correct, $message was broken...instead of name tou get your message...duh!
  7. Xtazy

    my website

    Thanx a lot...well, the other pages from members.html are not valid because I didn't finish them ...yet...I don't want to copy and paste some information from other sites on my own website, so I'm trying to make myself the information inspiring from other sites...and i have no clue about what "wow effect" I should use ...
  8. Xtazy

    my website

    I restarted my computer and than I watched TV, so i forgot to turn on the apache server...try now, i'm sure it works...
  9. Xtazy

    my website

    Maybe, cuz I'm always downloading something and it may take from the website's speed...and today i was idle
  10. Xtazy

    my website

    Yeah, so probably when you tried to access it , I was sleeping ...
  11. Xtazy

    Guestbook

    Yeah, that did it...but it looks like the line 9 was broken as well, but I managed to fix it...i mean this one: '<br>' . date('d.m.Y H:i') . ' - ' . strip_tags ($name) . but instade of $name, it should be $message...anyway, thanx a lot, it's really appreciated...Xtazy!
  12. Xtazy

    my website

    hi guys...i'm curently working on an AC/DC website (AC/DC is a hard rock band ) and I just want to tell me your opinion about. it....it's not completely finished, but i'm working on it...it's done completely in notepad and it's my second website... i maed another one with Rocky, but i didn't put it on the web...website -> http://86.104.117.159:32167/cheers!xtazy
  13. Xtazy

    book

    I learned HTML and CSS from w3schools and had no problem with it...just have a look on what w3schools offers, have a look on the HTML examples, and start building a simple website so that you get used with HTML...and when you have an idea and you don't know how to fit it in your website, come here and maybe we we'll be able to help you...i know it's really fustrating when you want to learn something, but you just simple can't...cheers!
  14. Xtazy

    Guestbook

    when i put that code in my addbook.php, i receive this error: and when i post a message using the postform, i can't see it in readbook.php ...
  15. Xtazy

    Guestbook

    ok, so i have found smth....now, i have three PHP files: addbook.php, readbook.php and postform.php, and a .txt file: guestbook.txt.The codes are:addbook.php : <?php if ($message != '') { $message = str_replace ("\n","<br>",$message); $message = strip_tags ($message, '<br>'); $newRow = '<div class="viewGuestbook">' . ($message) . '<br>' . date('d.m.Y H:i') . ' - ' . strip_tags ($name) . '</div>'; $oldRows = join ('', file ('guestbook.txt') ); $fileName = fopen ('guestbook.txt', 'w'); fputs ($fileName, $newRow . chr(13) . chr(10) . $oldRows); fclose ($fileName); } include ("readbook.php");?> readbook.php : <div class="guestbookTop"><a href="postform.php">Write</a> to a guestbook<br><br></div><?php $fileName = file ("guestbook.txt"); $rows = count ($fileName); if ($rows > 10) { if (!isset ($row) ) { $row = 0; } print ("<table class=\"guestbookLinks\"><tr><td width=\"50%\">"); if ($row > 0) { echo "<div class=\"nextPage\"><< <a href=\"readbook.php?row=" . ($row - 10) . "\">Next 10</a></div>"; } print ("</td><td width=\"50%\">"); if ( ($rows - $row) > 10) { echo "<div class=\"previousPage\"><a href=\"readbook.php?row=" . ($row + 10) . "\">Previous 10</a> >></div>"; } print ("</td></tr></table>"); for ($i = $row; $i < ($row + 10); $i++) { echo $fileName [$i]; } } else { for ($i=0; $i < $rows; $i++) { echo $fileName [$i]; } } ?><div class="guestbookUp"><br><br><br><br> <a href="postform.php">Write</a> to a guestbook</div> postform.php : <div class="normalText"><form action="addbook.php" method="post">Message<br><br><textarea name="message" cols="50" rows="7" class="textbox"></textarea><br><br>Name<br><br><input type="text" name="name" size="48" class="textbox"><br><br><input type="submit" value=" Submit " class="textbox"></form></div> when i access this address: http://86.104.117.159:32167/addbook.php , I receive this error: so this means that this line is broke:if ($message != '') and i should type something between ' and '...but what? i'm a beginner in PHP, so I don't know lots about it...when you see this message, my website could be open, so you should access this addresses and see for yourself:http://86.104.117.159:32167/addbook.phphttp://86.104.117.159:32167/readbook.phphttp://86.104.117.159:32167/postform.php10x a lot,xtazy
  16. Xtazy

    Guestbook

    anyone knows how can I create a guestbook using HTML so that I can fit it in my website? I don't want a website where I can make free guestbooks, i want smth to put in an html page on my website...thanx, xtazy
  17. Xtazy

    photo gallery

    Yep, I used Simple Viewr and it worked.Thank you so much guys!Cya!
  18. Xtazy

    photo gallery

    Hi guys!I want to make a gallery on my website, but I don't want just to drop some images there, a want something like this: a panel with the thumbnails pictures on the left side, and when you click on one of them, on the right side the picture will open in big size...how can i make something like this? i hope I posted this message in the right category...thank you in advancecheers!
  19. Xtazy

    Login/Register System

    I'm kinda n00b in PHP so I need a little bit of help on this one.How can I create a system with register and login ? and what should I know beside PHP?Thank yoiu for your time!
  20. Xtazy

    problem

    Yey, finally, it worked...thanx a lot!
  21. Xtazy

    problem

    hey, i've got a problem...i want to place text near a photo like on this website...There is some text: and near this text is always an advertising for a game, a movie or whatever...how can i do that?
  22. You can put it all in you html file...just copy and paste it there :)but i see an error in it...after finishing with the style, there suddenly comes some javascript code, ending in </script>, but there's no "introduction", like <script type="text/javascript">...anyone?
  23. some java script: <style type="text/css">ul { margin: 0; padding: 0; list-style: none; width: 150px; }ul li { position: relative; }li ul { position: absolute; left: 149px; top: 0; display: none; }ul li a { display: block; text-decoration: none; color: #777; background: #fff; padding: 5px; border: 1px solid #ccc; border-bottom: 0; }ul { margin: 0; padding: 0; list-style: none; width: 150px; border-bottom: 1px solid #ccc; }li:hover ul { display: block; }</style><navRoot.childNodes.length; i++) {node = navRoot.childNodes[i];if (node.nodeName=="LI") {node.onmouseover=function() {this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replaceĀ» (" over", ""); } } }}}window.onload=startList;</script><ul> <li><a href="#">Main Menu</a></li> <li><a href="#">Home</a></li> <li><a href="#">Pictures</a> <ul> <li><a href="#">Picture one</a></li> <li><a href="#">Picture two</a></li> </ul> </li> <li><a href="$">Forum</a></li> <li><a href="">News</a></li> <li><a href="">Link</a> <ul> <li><a href="#">Google</a></li> <li><a href="#">another link</a></li> </ul> </li></ul>
  24. Xtazy

    menu problem

    Hey! I have a problem with my web site's menu. I don't know if I should have posted this in the Javasccript forum, but well...So, here's the problem: I'm working on a web site with Rocky Balboa, so I made up a menu for it. It works just fine in Firefox, but now I see that if I open the menu with IE it's totally messed up. The options have a large space between them. And for the menu I used some Javascript so that when I put the mouse over some of the options, it should open a palate of some new options. Here's the code: <style type="text/css">ul { margin: 0; padding: 0; list-style: none; width: 150px; }ul li { position: relative; }li ul { position: absolute; left: 149px; top: 0; display: none; }ul li a { display: block; text-decoration: none; color: #777; background: #fff; padding: 5px; border: 1px solid #ccc; border-bottom: 0; }ul { margin: 0; padding: 0; list-style: none; width: 150px; border-bottom: 1px solid #ccc; }li:hover ul { display: block; }</style><script type="text/javascript">startList = function() {if (document.all&&document.getElementById) {navRoot = document.getElementById("nav");for (i=0; i<navRoot.childNodes.length; i++) {node = navRoot.childNodes[i];if (node.nodeName=="LI") {node.onmouseover=function() {this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replaceĀ» (" over", ""); } } } }}window.onload=startList;</script><ul> <li><a href="index.html">Home</a></li> <li><a href="#">News</a> <ul> <li><a href="#">Sly the Man</a></li> <li><a href="#">Movies</a></li> </ul> </li> <li><a href="gallery.html">Gallery</a></li> <li><a href="">The Movies</a> <ul> <li><a href="#">Rocky</a></li> <li><a href="#">Rocky II</a></li> <li><a href="#">Rocky III</a></li> <li><a href="#">Rocky IV</a></li> <li><a href="#">Rocky V</a></li> <li><a href="#">Rocky Balboa</a></li> </ul> </li> <li><a href="rockyscript.html">Rocky Script</a></li> <li><a href="#">Shopping</a> <ul> <li><a href="#">4ROCKY.com</a></li> <li><a href="shopping.html">Amazon.com</a></li> </ul> </li> <li><a href="http://4rcoky.proboards82.com/">4ROCKY Forum</a></li> <li><a href="contact.html">Contact</a></li></ul> When you put the mouse over the News option (in Firefox), it opens up two more options: Sly the Man and Movies. But in IE, nothing happens. And there is that annoying laaarge space between menu's options. What should I do? Thank you in advance,Xtazy
×
×
  • Create New...