The Little Guy
-
Posts
6,675 -
Joined
-
Last visited
Posts posted by The Little Guy
-
-
put the [b]header("Location: page.php");[/b] before anything is outputted to the browser.
-
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] -
[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 -
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. -
http://us3.php.net/manual/en/language.operators.php#language.operators.precedence
-
Your welcome.... Is that what you wanted?
-
[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] -
Im not sure if it is just me, but... I don't think you even explained what the problem was that you are having.
-
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.
-
[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] -
[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".
plz help with code
in PHP Coding Help
Posted