You are here: Re: Form Arrays « PHP Programming Language « IT news, forums, messages
Re: Form Arrays

Posted by Jerry Stuckle on 09/05/07 10:47

The Natural Philosopher wrote:
> Jerry Stuckle wrote:
>> The Natural Philosopher wrote:
>>> Jerry Stuckle wrote:
>>>> The Natural Philosopher wrote:
>>>>> ELINTPimp wrote:
>>>>>> On Sep 4, 11:36 am, Kevin Davis <kevin.da...@kevincdavis.net> wrote:
>>>>>>> On Sep 4, 10:14 am, ELINTPimp <smsi...@gmail.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> On Sep 4, 11:00 am, Kevin Davis <kevin.da...@kevincdavis.net>
>>>>>>>> wrote:
>>>>>>>>> Hello,
>>>>>>>>> I'm a new person when it comes to PHP and I have a quick question.
>>>>>>>>> I would like to create a form that will allow the user to add more
>>>>>>>>> information using the same form in case they have (similar to
>>>>>>>>> various
>>>>>>>>> employment sites).
>>>>>>>>> What would be the best way of using form arrays for that function?
>>>>>>>>> Thank you,
>>>>>>>>> Kevin
>>>>>>>> Hi Kevin,
>>>>>>>> I'm not sure exactly what you want to do...using your example of an
>>>>>>>> employment site...do you have a form that gathers a users
>>>>>>>> employment
>>>>>>>> history, for example? And, if the employee has more than one
>>>>>>>> previous
>>>>>>>> employer, to return to the same form so they can enter more
>>>>>>>> information? And, I assume, you do not want to submit the data to
>>>>>>>> persistent storage (ie database) until they are complete with the
>>>>>>>> form? If I'm off, let me know, just need clarification...
>>>>>>> Sorry about that I should added some claficiation.. The example
>>>>>>> would
>>>>>>> be if the user has more than one previous employer and they have add
>>>>>>> more until they are done. That is correct I don't want the user to
>>>>>>> enter the information to the database until they are done.
>>>>>>>
>>>>>>> Thanks..
>>>>>>
>>>>>> OK, than you really have 3 options, the last 2 I'll mention has
>>>>>> several ways to implement each.
>>>>>>
>>>>>> First, you can use database transactions. So, the solution would
>>>>>> rely
>>>>>> more on the database rather than PHP. Basically, once the user
>>>>>> starts
>>>>>> entering data, you open a persistent connection and start a
>>>>>> transaction.
>>>>>
>>>>> Doesn't need to be persistent CONNECTION.
>>>>>
>>>>> You issue a tag id when the header form is created, and carry it as
>>>>> a post variable through all the session. If they switch off and
>>>>> walk away, the transaction isn't marked as complete, and the data
>>>>> can be erased sometime later.
>>>>>
>>>>
>>>> But PHP will close the connection at the end of the page and the
>>>> data will be committed. You can't use a transaction this way.
>>>>
>>>
>>> It depends on what you mean by transaction
>>>
>>
>> When dealing with relational databases, the term "transaction" has a
>> very specific meaning. It is the time between a "START TRANSACTION"
>> call and an explicit or implicit "ROLLBACK" or "COMMIT".
>>
>>> I ws using it in the sense of a complete session with th customer. Of
>>> course the *database* transaction is atomic and complete, but it will
>>> be added to by further invocations until the customer is satisfied.
>>> At that point the final database transaction is to set a flag in the
>>> record header saying 'done'
>>>
>>
>> Then you are confusing matters by using incorrect terminology.
>>
>
> No, I am confusing YOU.;-)
>
> I have business transactions with customers, database transactions with
> databases.
>
> The term transaction was not INVENTED by, or used explicitly FOR
> database software authors.
>
> You should get out more and have some transactions with a bar.;-)
>
>
>

And you improperly used TRANSACTION when speaking about DATABASE:

To quote you:

"First, you can use database transactions."

Database transactions do not work like you explained.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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