Solved

Rewriting a request.querystring

Posted on 2007-03-17
3
182 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 dynamically set the form action using jQuery.

863 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

18 Experts available now in Live!

Get 1:1 Help Now