You are here: how to exist within the context? « PHP « IT news, forums, messages
how to exist within the context?

Posted by Bing Du on 11/22/05 19:27

Hi,

One webpage has its banner, left menu and footer ect that are controled
by the template. I want this php script to output the form and
processing result within the page structure. Without exit, if the
'yourname' field is empty, the script would output 'Please enter your
name!' fine within the page structure (that is, banner, menu and footer
are all there). But obviously the script does not terminate as it's
supposed to. With exit, the script terminates fine, but it outputs the
result in a page without banner, menu and footer. So what's the correct
way to get the script stop and output its results always in the page
structure.

<form method=post>
<input name="yourname" type="text" size="20">
<input name="submit" type="submit" value="submit">
</form>

<?php

$submit = $_POST['submit'];
$name = $_POST['yourname'];

if ($submit)
{
if ($name=="")
{
print "Please enter your name!";
//exit;
}
}

echo "Continue processing...";
?>

Thanks in advance,

Bing

 

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

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