#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    1
    Rep Power
    0

    Get the parameter values


    I have multiple php files, and I want to merge all the files into one file. All the files come with parameters. If a certain file matches the parameter, that file should execute, else other.
    Suppose
    First file: read.php?param=dread
    Second File: read.php?param=dread2
    in read.php
    if(isset($_Get['param'])){

    $param = $_Get['param'];

    if($param == 'dread'){
    //my code 'dread'
    }
    if($param == 'dread2'){
    //my code 'dread2'
    }
    } else {}
    Only first parameter is called(dread),dread2 is not called
  2. #2
  3. 'fie' on me, allege-dly
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,894
    Rep Power
    6444
    I wasn't aware $_Get[] and $_GET[] were the same ... are they?

    Comments on this post

    • NotionCommotion agrees
    --Ax
    without exception, there is no rule ...
    Handmade Irish Jewellery
    Targeted Advertising Cookie Optout (TACO) extension for Firefox
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


    09 F9 11 02
    9D 74 E3 5B
    D8 41 56 C5
    63 56 88 C0
    Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
    -- Jamie Zawinski
    Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
    BIT COINS ANYONE

IMN logo majestic logo threadwatch logo seochat tools logo