You are here: Re: return to html « PHP Programming Language « IT news, forums, messages
Re: return to html

Posted by zoilus on 06/06/07 16:11

Erwin,

Thanks for the post. Maybe you could help me with this code. The code is
not transfering to variables to the search.php program.

<html>
<head>
<title>testing downloaded query form</title>
</head>
<body>


<h2>Search</h2>
<!-- <form name="search" method="post" action="<?=$PHP_SELF?>"> -->
<form name="search" method="post" action="search.php">
Seach for: <input type="text" name="find" /> in
<Select NAME="field">
<Option VALUE="fname">First Name</option>
<Option VALUE="lname">Last Name</option>
<Option VALUE="info">Profile</option>
</Select>
<input type="hidden" name="searching" value="yes" />
<input type="submit" name="search" value="Search" />
</form>

</body>
</html>

none of the variable are set in search.php



Erwin Moller wrote:

> zoilus wrote:
>
>
>>Trying to write html form program that calls php prog. If php prog has
>>problem with what was entered would like to return from php to html
>>program.
>>
>>Is this possible and if so, how?
>>
>>TIA
>
>
> Hi,
>
> Plain html pages are not refered to as programs, just html files.
> Unless the Javascript in them is worth calling a program. ;-)
>
> What you need is something like this:
> <?php
> // just an example, we expect a formelement named firstname
> // If not set, redirect to error.html
> if (!isset($_POST["firstname"])){
> // refuse
> header("Location: http://www.example.com/error.html");
> exit;
> }
>
> // do your normal processing here.
>
> ?>
>
>
> Regards,
> Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация