Solved

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

Posted on 2011-03-18
3
457 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to create an extensible mechanism for linked drop downs.
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

815 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

9 Experts available now in Live!

Get 1:1 Help Now