Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[Idiot Mistake] Need Help

Name: Anonymous 2010-06-02 2:02

Ok, So I am using a $_GET function as a main navigation tool. Yes, I am using PHP, I did not come here to get ridiculed, I came here for assistance.

So I have the script something like:

<?php
$page = $_GET['p'];

if ($page == ""){
require 'index.htm';
};

if ($page == "about"){
require 'aboutme.htm';
};

if ($page == "links"){
require 'links.htm';
};
?>

And I have seen this work before, However I am running this off a different server on my own IP address instead of on a host. Basically the error I keep getting is that "p" is not defined. So, simply "page.php" will not load, however "page.php?p" will load. I have never had this happen before. Usually if the $_GET is set to '', then running page.php by itself will just cause the index page to show up instead.

I really don't understand what I did wrong. Please help /prog/.

Name: Anonymous 2010-06-04 5:20

>>40
Is this where we go wooosh and you delete your comment before the downvotes begin?

Name: Anonymous 2010-06-04 7:36

What is this shit? PerlHP?

<html>
  <body>
    <h1>[=$title=]</h1>
    <table>
<?pl my $i = 0; ?>
<?pl for my $item (@$items) { ?>
<?pl     my $color = ++$i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'; ?>
      <tr bgcolor="[==$color=]">
        <td>[==$i=]</td>
        <td>[=$item=]</td>
      </tr>
<?pl } ?>
    </table>
  </body>
</html>

Name: Anonymous 2010-06-04 9:06

>>42
use Markup::Perl;

Name: Anonymous 2010-06-04 18:13

>>39-40
    

Name: Anonymous 2010-06-04 19:01

>>42
PerlHP actually uses <% %>[1]

[1]http://wakaba.c3.cx/perlhp/

Name: Anonymous 2010-06-04 19:04

PerlHPython

Name: Anonymous 2010-06-04 19:27

PerlHaskellPython

Name: Anonymous 2010-06-04 19:31

<?perlhaskellpython
  main =
    do
      num <- <>
      print(fix . sub { \f,x -> if x<=1 then 1 else x*f(x-1)} $ num)
        ?>

Name: Anonymous 2010-06-04 19:32

>>48
Also, it must be rendered in a proportional font, since that is the correct way to program PHP

Name: Anonymous 2010-06-04 21:35

>>49
False.  There is no correct way to program PHP.

Name: Anonymous 2010-06-04 22:07

Jesus Christ, IHBT by all of you.

The first response should have been:

Yes, I am using PHP, I did not come here to get ridiculed, I came here for assistance.
Now you have three problems.

Name: Anonymous 2010-06-04 23:38

>>51
I'm sorry we could not conform strictly to your memetic standards.  Perhaps you would be more comfortable on one of 4chan's many friendly and predictable imageboards.

Name: Anonymous 2010-06-04 23:53

>>52
It seem's that >>51-san some how predicte'd you're troll post much before you create'd it. Intriguing!

Name: Anonymous 2010-06-05 4:26

Here is some simple code I use. Pages go in /data/page/

/data/page.php:

<?php
    chdir('data/page');
    include($_GET['page'].'.html');
?>


/index.php:

<?php
    if ($_GET[act] != "") {
        include('data/'.$_GET['act'].'.php');
    }
    else {
        $_GET[page] = 'home';
        include('data/page.php');
    }
?>

Name: Anonymous 2010-06-05 9:51

>>54
You, sir, are a faggot.  Just use normal HTML!

Name: Anonymous 2010-06-05 14:36

Meh, actualy thats stripped down from what I use. What I use adds in headers and footers.

Name: Anonymous 2010-06-05 14:40

>>54
Unsanitized used of $_GET
{b.i.o.u QUINTESSENTIAL PHP USER}

Name: ​​​​​​​​​​ 2010-09-09 13:41

Name: Anonymous 2011-02-03 6:16

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List