(Help) Php Code 4 creating ?= page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    (Help) Php Code 4 creating ?= page

    any one Knows How to create php page with this format (urpage .php?=id)

    #2
    Code:
    preg_match("/^=(\d+)/",$_SERVER['QUERY_STRING'],$m);
    
    $id = isset($m[1]) ? $m[1] : 0;

    Comment


      #3
      Thanks,
      i dont understand any of this,
      can some one make a tutorial ebook 4 this or explain better
      Last edited by hoyme; 03.06.10, 18:09.

      Comment


        #4
        wtf ebook to teach u that?! Then u'd nid a fu.ckin encyclopedia to learn objects

        Comment


          #5
          ok can u explain@ mobile gigs

          Comment


            #6
            here is a php page name it urpage.php
            PHP Code:
            <?php
            ?>
            and then open it in your browser as http://sitename.con/urpage.php?=id and it will work perfectly as you described :P

            Comment


              #7
              to collect the information under the variable id (note you must have id= (something) not .php?=id
              you must collect the variable using $_GET["id"]; ($_GET is a variable collection method)
              eg: here is a quick script:
              PHP Code:
              <?php                  //start by open php

              if($_GET['id']==1){      // is id equal to 1? if true then....

              print 'id is 1<br/>';       //print id is 1

              }else{                         // else

              print 'id is not 1<br/>';         //print id is not 1

              }                                // closing else statement

                                               //close php below 
              ?>
              Last edited by something else; 03.06.10, 20:13.

              Comment


                #8
                Originally posted by something else View Post
                to collect the information under the variable id (note you must have id= (something) not .php?=id
                you must collect the variable using $_GET["id"]; ($_GET is a variable collection method)
                eg: here is a quick script:
                PHP Code:
                <?php                  //start by open php

                if($_GET['id']==1){      // is id equal to 1? if true then....

                print 'id is 1<br/>';       //print id is 1

                }else{                         // else

                print 'id is not 1<br/>';         //print id is not 1

                }                                // closing else statement

                                                 //close php below 
                ?>
                Thanks...
                how can link dis page 2 perform specific task. Like download 4rm directory, how can i automatially generate page

                Comment


                  #9
                  use an auto index script :P u can find one in scripts forum :P

                  Comment

                  Working...
                  X