Page 2 of 3

Posted: Sat Feb 05, 2005 7:52 pm
by Rattrapmax6
.ASP?? what the heck is that?? :)

Posted: Sat Feb 05, 2005 7:58 pm
by Mitth'raw'nuruodo
It's for the internet...specifically for the server-user connection. You know what one person does will affect the site. Like this forum, or an online-multy player game.

Posted: Sat Feb 05, 2005 8:02 pm
by Rattrapmax6
Hehe, like my counter AOL gave me?? one gets on it goes up,. say since thats in HTML,. can you make forums in HTML like in that .ASP??

I think I heard about such things.. :)

Posted: Sat Feb 05, 2005 8:09 pm
by Mitth'raw'nuruodo
:shock:

Not to my knowlege, why you saying that? How could anyone do something like that?

Posted: Sat Feb 05, 2005 8:14 pm
by Rattrapmax6
Hmm,.. oh well,. I've heard of fill-out forums in HTML,. havn't read up on it yet tho.. :)

Posted: Sat Feb 05, 2005 8:25 pm
by Mitth'raw'nuruodo
GA! that's crazy!

Posted: Sat Feb 05, 2005 8:39 pm
by Rattrapmax6
Umm,. I'll go look it up,. :wink: ,. just to see what its about. :)

Posted: Sat Feb 05, 2005 11:19 pm
by Nodtveidt
Mitth'raw'nuruodo wrote:BTW, How do you know .asp sucks?
Because I used to develop in ASP before I discovered the wonderful world that is PHP. :D Classic ASP only has five user objects and they're very limited...aspx (asp.net) is exceptionally slow except on very fast servers but it such a convulted language (like all of .net) that it's very difficult to code in to accomplish even the basics. On the other hand, anyone who knows C can pick up PHP in an afternoon, and anyone who doesn't know C can pick it up over the weekend with little difficulty.

Posted: Sun Feb 06, 2005 12:06 pm
by Mitth'raw'nuruodo
I'm not arguing on that because I never did .asp before. I wanted to but I didn't 'cause I was tired from learning Javascript.

:shock: Hey I know C!

So I guess you suggest that for server-user thing that .php is the way to go?

Hmmm...I'll have to try it. You know that also if .php is simular to C and C is simular to Javascript then .php is simular to Javascript too! Ooooh, I wonder if they're compatiable, hehe. :D

Posted: Sun Feb 06, 2005 1:03 pm
by MystikShadows
Nekrophidius wrote:
Mitth'raw'nuruodo wrote:BTW, How do you know .asp sucks?
Because I used to develop in ASP before I discovered the wonderful world that is PHP. :D Classic ASP only has five user objects and they're very limited...aspx (asp.net) is exceptionally slow except on very fast servers but it such a convulted language (like all of .net) that it's very difficult to code in to accomplish even the basics. On the other hand, anyone who knows C can pick up PHP in an afternoon, and anyone who doesn't know C can pick it up over the weekend with little difficulty.
Amen to that old timer....;-). A.S.P. (Anhialation of any Structured Programming). ewwwwww. lol

Posted: Sun Feb 06, 2005 1:03 pm
by Rattrapmax6
PHP n C,. lol,. I was thinking that when I saw a source in one of the QBE tuts,... had that " { ..... } " thing in it... :)

I might just look into it now,. If its like C... :D *Thinks dreamingly,..

Posted: Sun Feb 06, 2005 2:03 pm
by Nodtveidt
PHP and javascript aren't the same...PHP is server-side, javascript is client-side. Their syntaxes are similar but not directly portable between each other. For server-side processing though, PHP is definately the way to go though.

Posted: Sun Feb 06, 2005 2:22 pm
by Rattrapmax6
:( Server-side??

Um, If I wrote it into my HTML code, loaded it to my FTP Space,. it still work right??

Posted: Sun Feb 06, 2005 2:55 pm
by Mitth'raw'nuruodo
I hope so.

As long as you wrote it inside the correct tags.

for example if you wanted to write a javascript code in HTML it would be:

Code: Select all

<html>
<head>
<script type = "text/javascript">
  //everything in here is Javascript 
  IntSite (parameters){
       //do Int stuff
    }
   KeyHandler (parameters) { 
      //do key handler stuff
   }
</script>
</head>
<body onload = "IntSite(parameters)" onkeyup = "KeyHandler(parameters)">
<!--This is a comment in HTML-->
</body>
</html>
I guess .php works something like this.

BTW I'm confused on the code system reading thing. You know when a program executes 1 line then executes another line. I'm confused in which line it executes next, its not like QB.

Aparently you can be inside two functions at the same time....

But oh well...

Posted: Sun Feb 06, 2005 3:47 pm
by Rattrapmax6
Hmm,. sorta like that,. here is some code from 19day's PHP tut in QBE #5

Code: Select all

<html>
<body>
<?php

//determines the factorial of $val, 0 if $val is not an integer
function factorial($val)
{
  if (is_int($val) == false || $val <= 0) return 0;
  if ($val == 1) return 1;
  return $val * factorial($val - 1);
}

$num = 6;
echo ?The factorial of $num is ?;
echo factorial($num) . ?<br />?;

/* now for something odd */
$num = ?boink?;
echo ?The factorial of $num is ?;
echo factorial($num);

?>
</body>
</html>
What it does I don't yet know... but its what PHP looks like in HTML, :wink:

As for your last Q, don't understand what your coming from?

PS: is "//" a REM line in HTML?? :)

Posted: Sun Feb 06, 2005 7:22 pm
by {Nathan}
The fill-out thingies are called forms... they are MADE in html but are processed it PHP, VBScript, ASP(SUCKS!!!), and Javascript.

Posted: Mon Feb 07, 2005 4:59 am
by Nodtveidt
This is a short snippet of PHP code used in one of the new V Planet scripts...

Code: Select all

<?php
  $genre = $_GET['genre'];
  switch($genre)
  {
    case "rpgs":
    case "strategy":
    case "puzzle":
    case "arcade":
    case "platform":
      break;
    default:
      die('Illegal genre specification. Script terminated.');
  }
  $language = $_GET['language'];
  switch($language)
  {
    case "qb":
    case "fb":
      break;
    default:
      die('Illegal language specification. Script terminated.');
  }
  $handle = fopen("genres/" . $language . $genre . ".txt","r");
    $gamecount = fgets($handle);
  fclose($handle);
  include('includes/encoder.php');
?>
It gets two variables from the URL (called GET variables) and checks to see if they're legal (and kills script processing if they're not, hence the "die" function), then it opens a local file to get the number of entries for a particular genre, and then finally loads an encoder script which is used elsewhere. As you can see, this is very C-like. :D

// is a REM line in PHP, not in HTML.

Posted: Mon Feb 07, 2005 3:47 pm
by Rattrapmax6
:D , Very C? K%L,. Say, then what a REM in HTML?? be nice, I could lable my code so not to confuse any thing, like puting QB News in my x.t.r. News,. :wink: , or vise versa...

Posted: Mon Feb 07, 2005 6:35 pm
by Nodtveidt
<!-- this is an html comment -->

Posted: Mon Feb 07, 2005 6:58 pm
by Rattrapmax6
Hay, yeah thanks!! :wink: