?
Solved

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

Posted on 2011-03-18
3
Medium Priority
?
466 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 1000 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 1000 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

764 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