HELP PLS!!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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

HELP PLS!!

Postby Raisario » 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.

ASP CODE:

<%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">

</FORM>

<%end if%> :oops:

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

Postby Dmitrit Plakhotnik » 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'>
</FORM>"
}



Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot] and 1 guest