Reply to Complete newbie looking for a little help

Your name:

Reply:


Posted by DeanL on 05/09/07 23:10

Hi guys,

I'm a total newbie at php and need a little help solving an error that
is being generated when using a script contained in one of the
O'Reilly books. The following code is used to display a simple form
with a text field and button (according to the book) but every time I
run it I get the following error:

Error:

Notice: Undefined index: search in G:\Web\Webserver\Apache2\htdocs
\simple.php on line 7

Code:

<html>
<head>
<title>Building a Form</title>
</head>
<body>
<?php
$search = $_GET["search"];
$self=$_SERVER['PHP_SELF'];
if ($search != NULL )
{
('
<form action="'.$_SERVER["PHP_SELF"].'" method="GET">
<label>Search: <input type="text" name="search" />
</label>
<input type="submit" value="Go!:" />

</form>
');
}
?>
</body>
</html>

Any help would be greatly appreciated as I'm trying to wrap my head
around php for the first time.

All the best, Dean...

[Back to original 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

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