?
Solved

Rewriting a request.querystring

Posted on 2007-03-17
3
Medium Priority
?
188 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

777 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