Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 6
Joined: Tue Nov 26, 2002 2:24 pm

Tue Nov 26, 2002 4:03 pm

I'm very noobish to PHP.......... :oops:

here is my problem: What is the PHP equivalent of the following asp code?
I mean, i wanna pull out the query string of the previous page that leads to this and use it in an IF statemen like this one but in php form.


<%if Request("viewby")= "author" then%>
<FORM NAME="SelectbyAuthor" ACTION="SearchResults.asp?Displayby=author" Method="Post">
Enter Author:<INPUT TYPE="text" Name="txtAuthor" Value="">
<INPUT TYPE="submit" Name="cmdSearch" Value="Search">


<%end if%> :oops:

Dmitrit Plakhotnik
New php-forum User
New php-forum User
Posts: 13
Joined: Fri Nov 01, 2002 6:56 am

Thu Nov 28, 2002 6:34 am

This is php-code:

Code: Select all

 if ($viewby=="author")
  echo "<FORM NAME='SelectbyAuthor' ACTION='SearchResults.php?  Displayby=author' Method='Post'>
Enter Author:<INPUT TYPE='text' Name='txtAuthor' Value=''>
<INPUT TYPE='submit' Name='cmdSearch' Value='Search'>

Dmitriy S. Plakhotnik
AlarIT programmer

Post Reply