NYCPHP Meetup

NYPHP.org

[nycphp-talk] Having a form return to itself after "submit"

Hans C. Kaspersetz hans at cyberxdesigns.com
Mon Oct 11 21:51:15 EDT 2004


Hello, you can do something similar to this.

>>I would use one form.
>>================================
>><?
>>if (isset($_POST["insert_button"])){
>>	// 1. do all you need to insert to the database
>>	// 2. you can create messages that are contained in some variable.
>>	// for example $message
>>}
>>if (isset($message)){
>>	echo $message;
>>}
>>?>
>><form name="insert_form" action="" method="post">
>><?
>>// all the form elements
>>?>
>>	<input type="submit" name="insert_button" value="Insert">
>></form>
>>===============================================
>>Basically, if $_POST["insert_button"] isn't set then this means that there is 
>>no need to insert in the database, otherwise the form elements can be 
>>inserted.
>>
>>I hope you understand this. It's easy.
>>
>>Henry
>>    
>>
>_______________________________________________
>New York PHP Talk
>Supporting AMP Technology (Apache/MySQL/PHP)
>http://lists.nyphp.org/mailman/listinfo/talk
>http://www.newyorkphp.org
>
>
>
>  
>
Phundemental?  Title: Simple Multil-Part Forms?

HCK




More information about the talk mailing list