Solved

Rewriting a request.querystring

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exporting image to excel from php document 10 28
.htaccess 5 39
error log using ftp 7 41
PHP curl issue VERBOSE output 18 48
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
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…
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.

831 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