Solved

Rewriting a request.querystring

Posted on 2007-03-17
3
181 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
Comment Utility
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
Comment Utility
<?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
Comment Utility
I tell you what, this is definitely different than ASP.  I just have to get the hang of things.  Thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Save signature to file 7 44
html input clean up 3 28
Phone Dialer 5 35
Apostophes in PHP generated form 6 12
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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 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…

771 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

12 Experts available now in Live!

Get 1:1 Help Now