---- Original Message ---- > From: Mert Oztekin <moztekin@xxxxxxxxxxxxxxxxxxxxx> > To: MEM <talofo@xxxxxxxxx>; Bob McConnell <rvm@xxxxxxxxx>; PHP-General List <php-general@xxxxxxxxxxxxx> > Sent: Thursday, October 1, 2009 5:16:40 AM > Subject: RE: Self-Process php forms or not? > > May be it is best time to for you to start using Zend Framework -> Zend_Form > > -----Original Message----- > From: MEM [mailto:talofo@xxxxxxxxx] > Sent: Thursday, October 01, 2009 3:01 PM > To: 'Bob McConnell'; 'PHP-General List' > Subject: RE: Self-Process php forms or not? > > One last question about this: > > I've done a self submit form, after hearing all the advantages expressed > here. > But how could we relate, without using javascript, a self submit form with a > "success page" or a "confirmation page" that doesn't show the form? > > Can please someone throw me some infos about this please? > Use of javascript to validate form is not required but will help with (processing) load on the server side. However, you should always validate and sanitize all user input on server side if you want to maintain good data integrity in your DB and security. Why? In case someone uses cURL or another TCP app to do GET/POST to your app (server) ;) As for redirecting w/o javascript, it's easy. Here's a sample: entryForm.php post to $self or other $url > $self / $url validates the form > * if valid form > redirect via header() or > include/require another modular page (suggested) * else invalid form > show entryForm.php with errors You can either pass the variables via GET in your redirect or use $_SESSION variables. I prefer $_SESSION since you really make your app modular and have access to those variables from any include/require page. If you're really innovative, you could expand on it to have more performance ;) Regards, Tommy > > Ps- I've googled: "php redirect success page on self submit form" and > similar... > > > > Regards, > Márcio > > > -----Original Message----- > > From: Bob McConnell [mailto:rvm@xxxxxxxxx] > > Sent: sexta-feira, 24 de Abril de 2009 14:10 > > To: PHP-General List > > Subject: RE: Self-Process php forms or not? > > > > When you have it all in one file, the first thing you do is check to > > see if this request was submitted from the form. If not, you send the > > blank form. If it was, you validate all of the data. When a validation > > fails, you add error messages and resend the form with any fields that > > passed the validation already filled in. When validation succeeds, > > process and move on. No muss, no fuss. > > > > Bob McConnell > > > > -----Original Message----- > > From: Sándor Tamás (HostWare Kft.) [mailto:sandortamas@xxxxxxxxxxx] > > Sent: Friday, April 24, 2009 8:53 AM > > To: 'PHP-General List' > > Subject: Re: Self-Process php forms or not? > > > > I think the main advantage is that if something goes wrong processing > > the > > datas, you can show the form again without redirecting again. > > > > And if you have to change the behavior of the page, you have to change > > only > > one file instead of two. > > > > SanTa > > > > ----- Original Message ----- > > From: "MEM" > > To: "'PHP-General List'" > > Sent: Friday, April 24, 2009 2:34 PM > > Subject: Self-Process php forms or not? > > > > > > I'm trying to understand the advantages behind opting by using a > > Self-Process PHP Form, instead of having a form and then point the > > action of > > the form to another .php page. > > > > Can anyone point me some resources about this. Why using one instead of > > another. What are the main advantages? > > > > > > > > Regards, > > Márcio > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > Bu mesaj ve ekleri, mesajda gönderildiği belirtilen kişi/kişilere özeldir ve > gizlidir. Size yanlışlıkla ulaşmışsa lütfen gönderen kisiyi bilgilendiriniz ve > mesajı sisteminizden siliniz. Mesaj ve eklerinin içeriği ile ilgili olarak > şirketimizin herhangi bir hukuki sorumluluğu bulunmamaktadır. Şirketimiz mesajın > ve bilgilerinin size değişikliğe uğrayarak veya geç ulaşmasından, bütünlüğünün > ve gizliliğinin korunamamasından, virüs içermesinden ve bilgisayar sisteminize > verebileceği herhangi bir zarardan sorumlu tutulamaz. > > This message and attachments are confidential and intended for the individual(s) > stated in this message. If you received this message in error, please > immediately notify the sender and delete it from your system. Our company has no > legal responsibility for the contents of the message and its attachments. Our > company shall have no liability for any changes or late receiving, loss of > integrity and confidentiality, viruses and any damages caused in anyway to your > computer system. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php