|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello everyone,
I am trying to create a form will populate and display in real time. For example: Ln 1. Name: [ ] Sex: [\/] Favourite Sport: [ ] [Add Button] Ln2. Peter Jones Male Football Jack Nickleson Male Baseball .. .. .. And so on Where Ln1 is a form with text areas: Name and Favourite sport and combo box Sex. While the [Add Button] is a button that when clicked will populate a table and display below the form as shown in ln2 onwards. And once the [Add Button] is clicked, the form clears for more entries. Will appreciate your . |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
chimambo@googlemail.com schreef:
> Hello everyone, > > I am trying to create a form will populate and display in real time. > For example: > > Ln 1. Name: [ ] Sex: [\/] Favourite Sport: > [ ] [Add Button] > > Ln2. Peter Jones Male Football > Jack Nickleson Male Baseball > .. > .. > .. > > And so on > > Where Ln1 is a form with text areas: Name and Favourite sport and > combo box Sex. While the [Add Button] is a button that when clicked > will populate a table and display below the form as shown in ln2 > onwards. And once the [Add Button] is clicked, the form clears for > more entries. > > Will appreciate your . i tried the start for you, and created an example you should NOT use ;-) (your webserver should have the right to create 'form.txt' file ) maybe, when you really start TRYING, and give us what you made of it, someone will you getting this done... =========< begin of form.php >===== <html> <body> <hr> <form method=post action=form.php> Name: <input name=Name value=""> <input type=submit> </form> <hr> <?php $h=fopen('form.txt','a'); fwrite($h, "Name: ".$_POST["Name"]."<br>\n"); fclose($h); $x=readfile("form.txt"); ?> </body> </html> =========< end of form.php >===== -- Luuk |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Luuk wrote:
> chimambo@googlemail.com schreef: >> Hello everyone, >> >> I am trying to create a form will populate and display in real time. >> For example: >> >> Ln 1. Name: [ ] Sex: [\/] Favourite Sport: >> [ ] [Add Button] >> >> Ln2. Peter Jones Male Football >> Jack Nickleson Male Baseball >> .. >> .. >> .. >> >> And so on >> >> Where Ln1 is a form with text areas: Name and Favourite sport and >> combo box Sex. While the [Add Button] is a button that when clicked >> will populate a table and display below the form as shown in ln2 >> onwards. And once the [Add Button] is clicked, the form clears for >> more entries. >> >> Will appreciate your . > > i tried the start for you, > and created an example you should NOT use ;-) > > (your webserver should have the right to create 'form.txt' file ) > > maybe, when you really start TRYING, and give us what you made of it, > someone will you getting this done... > > =========< begin of form.php >===== > <html> > <body> > <hr> > <form method=post action=form.php> > Name: <input name=Name value=""> > <input type=submit> > </form> > <hr> > <?php > $h=fopen('form.txt','a'); > fwrite($h, "Name: ".$_POST["Name"]."<br>\n"); > fclose($h); > > $x=readfile("form.txt"); > ?> > > </body> > </html> > =========< end of form.php >===== > And exactly what happens if you have five users running concurrently - and they all need different forms? This is probably one of the WORST ways to do this. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
chimambo@googlemail.com wrote:
> Hello everyone, > > I am trying to create a form will populate and display in real time. > For example: > > Ln 1. Name: [ ] Sex: [\/] Favourite Sport: > [ ] [Add Button] > > Ln2. Peter Jones Male Football > Jack Nickleson Male Baseball > .. > .. > .. > > And so on > > Where Ln1 is a form with text areas: Name and Favourite sport and > combo box Sex. While the [Add Button] is a button that when clicked > will populate a table and display below the form as shown in ln2 > onwards. And once the [Add Button] is clicked, the form clears for > more entries. > > Will appreciate your . > Not that hard. Keep track of your list (a good database would be useful). Get your search criteria and display all entries it finds. The only hard part is the search criteria - that could be something like a session id, for instance. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Jerry Stuckle schreef:
> Luuk wrote: >> chimambo@googlemail.com schreef: >>> Hello everyone, >>> >>> I am trying to create a form will populate and display in real time. ..... >>> Will appreciate your . >> >> i tried the start for you, >> and created an example you should NOT use ;-) >> ..... > > And exactly what happens if you have five users running concurrently - > and they all need different forms? This is probably one of the WORST > ways to do this. > i did warn the OP saying "you should NOT use" why do you think i did that? OP is not questioning about concurrent users or databases OP is even not questioning, he claims to be trying, but the only thing he tried was putting a message in 'comp.lang.php' -- Luuk |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Thu, 14 Feb 2008 08:28:37 -0800 (PST), in comp.lang.php
chimambo@googlemail.com <c748d382-f6dd-45c1-adf5-cb05c1da7aef@e10g2000prf.googlegroups.com> wrote: >| Hello everyone, >| >| I am trying to create a form will populate and display in real time. >| For example: >| >| Ln 1. Name: [ ] Sex: [\/] Favourite Sport: >| [ ] [Add Button] >| >| Ln2. Peter Jones Male Football >| Jack Nickleson Male Baseball >| .. >| .. >| .. >| >| And so on >| >| Where Ln1 is a form with text areas: Name and Favourite sport and >| combo box Sex. While the [Add Button] is a button that when clicked >| will populate a table and display below the form as shown in ln2 >| onwards. And once the [Add Button] is clicked, the form clears for >| more entries. >| >| Will appreciate your . There are several methods you could use. Method 1: use an iframe to load the data entry page Method 2: use Javascript and DOM to dynamically generate the form Method 3: use php scripting to refresh the page and show the form Each have there advantages and disadvantages. -- ------------------------------------------------------------- jnorthau@yourpantsyahoo.com.au : Remove your pants to reply -- ------------------------------------------------------------- |
|
![]() |
| Outils de la discussion | |
|
|