Jump to content


Photo

My SAS wont use post.


  • Please log in to reply
3 replies to this topic

#1 godsdead

godsdead
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 July 2006 - 07:27 AM

This code isnt working in my stand alone server running:
Apache 2.0
PHP Version 5.1.1


<?php
switch($x){
case"":
echo"Hello";
break;

case"work":
echo"WORK DAMIT!";
break;
}
?>
Okie one of the most simplest codes and it wont WORK when i go to ?x=work
:@!
This should work as it works on my online server, but i really need it to work on my home server!
the script runs useing this:
<?php
$x = $_GET[x];
switch($x){
case"":
echo"Hello";
break;

case"work":
echo"WORK DAMIT!";
break;
}
?>
with the $x = $_GET[x]; variable, Also i realised i cant process any forms unless i use this! which is Sooooooooo Anoying! as all my scripts have basically ******!
please help!

#2 CheesierAngel

CheesierAngel
  • Members
  • PipPipPip
  • Advanced Member
  • 105 posts
  • LocationBelgium

Posted 07 July 2006 - 07:46 AM

You can try this:

switch ($_GET['x']) {
  case "work":
     echo "It's working!";
     break;
  default:
     echo "It isn't working!";
}


#3 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 07 July 2006 - 11:45 AM

This code isnt working in my stand alone server running:
Apache 2.0
PHP Version 5.1.1


<?php
switch($x){
case"":
echo"Hello";
break;

case"work":
echo"WORK DAMIT!";
break;
}
?>
Okie one of the most simplest codes and it wont WORK when i go to ?x=work
:@!
This should work as it works on my online server, but i really need it to work on my home server!
the script runs useing this:
<?php
$x = $_GET[x];
switch($x){
case"":
echo"Hello";
break;

case"work":
echo"WORK DAMIT!";
break;
}
?>
with the $x = $_GET[x]; variable, Also i realised i cant process any forms unless i use this! which is Sooooooooo Anoying! as all my scripts have basically ******!
please help!


Your example code will only work if register globals is turned on.

#4 godsdead

godsdead
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 July 2006 - 12:22 PM

register globals :D
why thank you ^_^!
Erm.. trying not to sound so noobish but what config file do i edit that from? :S




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users