Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

HELP PLS!!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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:
Raisario
New php-forum User
New php-forum User
 
Posts: 6
Joined: Tue Nov 26, 2002 2:24 pm

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

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


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.