Solved

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

Posted on 2011-03-18
3
451 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
3 Comments
 
LVL 8

Accepted Solution

by:
Rik-Legger earned 250 total points
Comment Utility
<?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
Comment Utility
if(substr($_SERVER['REQUEST_URI'],0,9) == 'order.php'){
// that's it
}
0
 

Author Closing Comment

by:rgb192
Comment Utility
thanks
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now