You are here: Submit form with empty data « All PHP « IT news, forums, messages
Submit form with empty data

Posted by Harold Ralston on 09/28/62 11:47

I have a page that searches my database for instances of the surname
submitted through a POST form.

http://www.ralstongenealogy.com/waterfordquery.php

If a viewer submits it with the surname data blank empty, it brings
up the entire data base to my results web page.

I don't want this to happen. Instead I want to tell the viewer to
submit a valid surname and show no results.

So far I have this and want to add code that will not bring up any
data to the results page. What do I need to add?

Thanks for any help. Harold Ralston

<?php
if(empty($surname))
{
echo "Please enter valid surname.";
}
?>

 

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

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