Posted by Erwin Moller on 06/06/07 16:30
zoilus wrote:
> print "You have entered search.php<br>";
> /*
> //This is only displayed if they have submitted the form
> print "<br>variable fname, lname and info is: $fname, $lname, $info <br>";
> print "<br>variable searching is: $searching";
> print "<br>variable search is: $search";
> print "<br>variable find is: $find";
> */
> // print_r(debug_backtrace()); //got from web, does not seem to work.
>
> if (!isset($_POST["fname"])){
> print "fname is not set";
> }
>
> if ($searching =="yes")
Stop here.
I think you are relying on old (bad) PHP examples that use register_globals.
$searching is empty in your example.
Use: $_POST["searching"] instead.
That contains the the value of the formelement named "searching".
(They are case sensitive.)
Regards,
Erwin Moller
> {
> echo "<h2>Results</h2><p>";
> }
>
> //If they did not enter a search term we give them an error
> if ($find == "")
> {
> echo "<p>You forgot to enter a search term";
> exit;
> }
>
>
> Iván Sánchez Ortega wrote:
>
>> zoilus wrote:
>>
>>
>>>none of the variable are set in search.php
>>
>>
>> How are you accesing the variables there?
>>
[Back to original message]
|