Solved

Rewriting a request.querystring

Posted on 2007-03-17
3
185 Views
Last Modified: 2007-03-17
How would I rewrite this?

<?php
if request.querystring("request") = "electrician" then
      response.write "<img src=""/images/electrician_btn.png"">"
elseif request.querystring("request") = "painting" then
      response.write "<img src=""/images/painting_btn.png"">"
elseif request.querystring("request") = "plumbing" then
      response.write "<img src=""/images/plumbing_btn.png"">"
end if
?>
0
Comment
Question by:pingeyeg
[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
  • 2
3 Comments
 
LVL 1

Author Comment

by:pingeyeg
ID: 18740723
The statement above might seem confusing, but what it is, is asp code trying to be converted to php.
0
 
LVL 20

Accepted Solution

by:
steelseth12 earned 500 total points
ID: 18740752
<?php
if($_REQUEST["request"] == "electrician"){
     
        print "<img src=\"/images/electrician_btn.png\">";
        
        
}elseif($_REQUEST["request"] == "painting") {

     print "<img src=\"/images/painting_btn.png\">";

}elseif($_REQUEST["request"] == "plumbing") {

      print "<img src=\"/images/plumbing_btn.png\">";

}
?>
0
 
LVL 1

Author Comment

by:pingeyeg
ID: 18740771
I tell you what, this is definitely different than ASP.  I just have to get the hang of things.  Thanks!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP: Filling Out/Creating a PDF 29 113
How to change the colour of columns using dynamic data for google charts 3 50
Multi line FPDF footer: 3 30
if statement malfunction 5 26
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

730 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