Jump to content

Sniffy

Members
  • Posts

    403
  • Joined

  • Last visited

Posts posted by Sniffy

  1. Cool.....I've heard that Visual Basic has it's uses but can make you lazy as far as the big functions and such. For VBscript and ASP and those languages, I have nothing against them, they're very powerful, but I just find them so different.Like you have to make the variable then give it a value, and the if statements are stated the same.eg

    //javascriptvar myvar = 0;if(myvar == 0){//..............}

    //vbscriptdim myvarmyvar = 0If myvar == 0 Then //.........End If

    Just two different types.VBscript seems to be more logical and literal, but it can be confusing that way.

  2. what kind of person are you ? :)
    Not a very decorative/ graphical person, I can say that. It may be my lack of practice, or that I just don't have the talent in me. I guess that's what group projects (sourcefourge.net and such) is good for.
  3. vbscript is a waste of tie unless you are goign to learn ASP. Client side vbscript only works in IE
    Really?I don't know vbscript myself, I've only taken a glimpse at it, so thanks.Here's the best I can come up with if this is even correct. :)
    <script type='text/vbscript'>dim namename = "George";if name == "Joe"document.write("His name is Joe");elsedocument.write("His name is George");end if;</script>

  4. I've come back with even more of interest of programming and an understanding.My favorite programming language of all though is probably actionscript, used with flash. It's based on javascript but with a step up of features. Although I haven't covered object oriented programming(but will in the next month or two), it does have OOP in it. It has it's own unique features too to make games easily and to make cool business applications.It has some server-side and XML compatibility but they'll have to work on it before it really catchs on in that way.

  5. I really want to get my head around regular expressions but there's so much to knowI read about all the basic characters/sequences in THIS tutorial but there's still a lot of things that are unclear to me.First of all, what are the starting/ending delimeters and when/why would you use them?Also, what is a delimeter?Second, what are the paretheses used for? As in do(ugh)nut?For some reason it looks like it means maybe.Any other useful information would be create. Like how to use regular expressions and how ereg() can be used in a script and a detailed explanation of functions.justsomeguy already gave me the php.net reg expresion reference guide.Also after you answer my questions, if you don't mind posting some basic scripts using valid patterns.Hopefull by the end of this the matter will be cleared up.EDITI've just cleared up most of the matter on the delimeter. Correct me if I'm wrong. A delimeter is something that encloses the special characters in the regular expression. I could declare this string "^Sniffy$" and it would display ^Sniffy$. A delimeter would say that it's special text for a regular expression. A delimeter could be anything non-alphanumeric and that's not used in the expression, most commonly a backslash.But I believe I saw stuff like /\^Sniffy\\ and I don't know if that's just me imagining things or if a backslash can be used a long with a front slash to have a meaning.EDITI just read about the meanings of preg() and ereg().Please say if I'm correct.preg - For Perl Compatible regular expressions.ereg - PHP's Standard Regular Expressions.Note: I haven't really gotten into the differences between the two but that's what they're for I think.ereg would be quicker processed because there is less things to load; I saw something in one of the topics yesterday of which type is faster and that's my theory.EDITI just saw another code on the forum with /\ in it but I was mistaken, it's actually just a / followed by a character, but what character it was is what made me even more confused. It was posted by jesh and I hope he doesn't care that I question it. It's javascript, but it's still probably around the same rules.

    // replace [b] with <b>content = content.replace(/\[b\]/g, "<b>");// replace [/b] with </b>content = content.replace(/\[\/b\[/g, "</b>");

    When would [b be put like \[b\?

  6. BTW:

    <html><head><title>Files</title></head><body><style type="text/css">div.files{border:2px double gray;right: 5px;vertical-align:top;}table.files {border:3px double blue;right: 10px;vertical-align:top;height:70px;width:100px;}</style><?php$his = "<h1>";$ehis = "</h1>";$math = "<h2>";$emath = "</h2>";$sci = "<h3>";$esci = "</h3>";$eng = "<h4>";$eeng = "</h4>";$comp = "<h5>";$ecomp = "<h6>";$fhis = 0;$fmath = 0;$fsci = 0;$feng = 2;$fcomp = 0;$total = $fhis + $fmath + $fsci + $feng + $fcomp;echo "There are ".$total." files stored in our records";?><div id=files><table id="files"><tr><td><?php echo "History = ."$fhis." Math = ".$fmath." Science = ".$fsci". English = ".$feng." Computer= ."$fcomp"; ?>   </td></tr></table></div></body></html>

    Close the string and add a '.' to add a string inside a variable.E.G: echo "Hello".$some_var_containing_world;

  7. He means the tooltip/title attribute, not the link color.I've gotten as far as being able to access the attribute, but not skinning it, just the tag with the attribute.

    <html><head><style type='text/css'>*[title]{background-color: 000;}</style></head><body><a href='' title='hello world'>hi</a></body></html>

    I'll work on it though.NOTE: NOT SUPPORTED BY IE.

  8. Do you mean like layer the images?

    <!-- Put in head !--><style type='text/css'>#img1{ z-index: 1; top: 0px; left: 0px;}#img2{ z-index: 2; top: 0px; left: 0px;}</style>

    <!-- Put in body !--><img src='####.gif' id='img1'><img src='####.gif' id='img2'>

  9. Okay, I'll just post the correct code for adminCheck.php

    <?phperror_reporting(E_ALL);?><html><head><title>Bobville</title><link rel='stylesheet' type='text/css' href='style.css'></head><body><img src='logo.gif' width='100%' height='40'><br><table cellspacing='0' width='100%'><tr><td width='200'><div class='menu'><a href='index.php'>Home</a><br><a href='games/index.php'>Games</a><br><a href='movies/index.php'>Movies</a><br><a href='tutorials/index.php'>Tutorials</a><br><a href='links.php'>Links</a></td><td width='600'><div id='content'><font face="Comic Sans MS"><i><div id='titlebar'><font size="2">Updates</font>:</i></font></div><div id='main'><?php$adminID = $_POST['adminID'];$adminPass = $_POST['adminPass'];$entryTitle = htmlentities($_POST['entryTitle']);$content = nl2br(htmlentities($_POST['content']));$fName = "/home/www/sniffy.awardspace.com/updates.txt";$fHandle = fopen($fName, 'r+');if($adminID == "####" && $adminPass == "####"){fwrite($fHandle, "<div id='content'><div id='titlebar'>".$entryTitle."</div><div id='main'>".$content."</div></div>");}else{echo "Your Admin ID or Password was incorrect.";}fclose($fHandle);?></div></div></td><td width='200'></td></tr></table></body></html>

    Here's adminLogin.php

    <?phperror_reporting(E_ALL);?><html><head><title>Bobville</title><link rel='stylesheet' type='text/css' href='style.css'></head><body><img src='logo.gif' width='100%' height='40'><br><table cellspacing='0' width='100%'><tr><td width='200'><div class='menu'><a href='index.php'>Home</a><br><a href='games/index.php'>Games</a><br><a href='movies/index.php'>Movies</a><br><a href='tutorials/index.php'>Tutorials</a><br><a href='links.php'>Links</a></td><td width='600'><div id='content'><font face="Comic Sans MS"><i><div id='titlebar'><font size="2">Updates</font>:</i></font></div><div id='main'><div align='center'><form method='post' action='adminCheck.php'>Admin ID:<input type='text' width='200' name='adminID'><br />Admin Pass:<input type='password' width='200' name='adminPass'><br /><br />Entry Title:<input type='text' name='entryTitle' width='200'><br />Content:<br><textarea cols='65' rows='15' name='content'></textarea><br><input type='submit' value='Submit Entry'></form></div></div></div></td><td width='200'></td></tr></table></body></html>

×
×
  • Create New...