[PHP] Form variables lost when duplicate records are found !
Hello everyone, I am making use of a php form to add company details to a MySQL Database. Before I add the form variables I am checking to see if the SAME company name exists in the DB. If the same company exists, then a notification is provided. In between this , the variables that were entered on the form are LOST. Is there anyway I can store the variables so that if a duplicate record was found to be present, then the forms variables are stored and NOT LOST ?? Any suggestions would be greatly appreciated ! Thanks in advance --Pushpinder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables lost when duplicate records are found!
[snip] then the forms variables are stored and NOT LOST ?? [/snip] Have you looked into sessions? http://www.php.net/manual/en/ref.session.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables lost when duplicate records are found !
--- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote: I am making use of a php form to add company details to a MySQL Database. Before I add the form variables I am checking to see if the SAME company name exists in the DB. If the same company exists, then a notification is provided. In between this , the variables that were entered on the form are LOST. Is there anyway I can store the variables so that if a duplicate record was found to be present, then the forms variables are stored and NOT LOST ?? Of course. However, I don't understand what you need help with. Is there anyway I can store the variables... There are many ways to store data with PHP. You can use the filesystem, a database, etc. Are you asking how to store data? Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables lost when duplicate records are found !
From: Pushpinder Singh Garcha [EMAIL PROTECTED] I am making use of a php form to add company details to a MySQL Database. Before I add the form variables I am checking to see if the SAME company name exists in the DB. If the same company exists, then a notification is provided. In between this , the variables that were entered on the form are LOST. Is there anyway I can store the variables so that if a duplicate record was found to be present, then the forms variables are stored and NOT LOST ?? Any suggestions would be greatly appreciated ! Thanks in advance How do you display the form again when there is a notification? Something as simple as: input type=text name=some_name value=? echo htmlentities($_POST['some_name']); ? will (safely) remember POSTed variables when you show the form again. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables lost when duplicate records are found !
I am currently using sessions on my site // are you suggesting that I store all the possible 30 form variables in a temp session array. ?? and destroy it afterwards Thanks -Pushpinder On Tuesday, September 2, 2003, at 04:41 PM, Matt Matijevich wrote: [snip] then the forms variables are stored and NOT LOST ?? [/snip] Have you looked into sessions? http://www.php.net/manual/en/ref.session.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