Solved

$_SERVER['REQUEST_URI'] starts with order.php

Posted on 2011-03-18
3
462 Views
Last Modified: 2012-05-11
$_SERVER['REQUEST_URI'];

is

order.php?statusid=10&...

I want an if statement
$_SERVER['REQUEST_URI'] starts with order.php
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
Rik-Legger earned 250 total points
ID: 35167385
<?php 

if (preg_match('/^order\.php/', $_SERVER['REQUEST_URI'])) {
    // $_SERVER['REQUEST_URI'] starts with order.php
}

?>

Open in new window

0
 
LVL 27

Assisted Solution

by:Lukasz Chmielewski
Lukasz Chmielewski earned 250 total points
ID: 35167414
if(substr($_SERVER['REQUEST_URI'],0,9) == 'order.php'){
// that's it
}
0
 

Author Closing Comment

by:rgb192
ID: 35182425
thanks
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question