Jump to content

The Little Guy

Members
  • Posts

    6,675
  • Joined

  • Last visited

Everything posted by The Little Guy

  1. Maybe it will work this way [code]<?php $comic = $_GET['comicnum']; switch($comic){ case 1:     $image = '<img alt="alt text" src="Imagename1.jpg">'; break; case 2:     $image = '<img alt="alt text" src="Imagename2.jpg">'; break; case 3:     $image = '<img alt="alt text" src="Imagename3.jpg">'; break; } echo $image; ?>[/code]
  2. [code]Options +FollowSymlinks RewriteEngine on RewriteRule ^user/(.*)$ /user_index.php?uname=$1 [nc][/code] That works, but that isn't how I want users to type it into the addressbar (mysite.com/user/name) I would like them to type it in like so (mysite.com/name) the problem I am getting are these: - Internal Server Error - File Not Found Here is a full version: http://www.webdeveloper.com/forum/showthread.php?t=127371
  3. I don't know if this is relavent to this board, but is it an Apache thing, or a ISP thing, where people of the outside world not being able to connect to my web server? ISP: Charter Communications. If ISP is the problem, how do they know if I'm running a web server, or a game server? I can run a game server, but not a web server for some reason.
  4. http://us3.php.net/manual/en/language.operators.php#language.operators.precedence
  5. Your welcome.... Is that what you wanted?
  6. [code]<?php switch($_GET['comicnum']){ case 1:     $image = '<img alt="alt text" src="Imagename1.jpg">'; break; case 2:     $image = '<img alt="alt text" src="Imagename2.jpg">'; break; case 3:     $image = '<img alt="alt text" src="Imagename3.jpg">'; break; } echo $image; ?>[/code]
  7. Im not sure if it is just me, but... I don't think you even explained what the problem was that you are having.
  8. your way will require the page to be an number (page23.php), and mine doesn't, it allows you to define what each page that you want randomized.
  9. [code] <?php $rand = rand(1,3); switch($rand){ case 1: $page = "page1.php" break; case 2: $page = "page2.php" break; case 3: $page = "page3.php" break; } include "$page"; ?> [/code]
  10. [code]<? function name($lName){     if($lName == "Bill"){           $firstName = "Red";     }else{           $firstName = "Ted";     }     return $firstName; } $lastName = "Joe"; echo name($lastName); ?>[/code] If you were to run that code, This line: [b]echo name($lastName);[/b] will output "Ted" if you change the value of lastName, your output will be "Red".
×
×
  • 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.