FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » for each syntax
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: for each syntax [message #169614 is a reply to message #169613] Sun, 19 September 2010 02:16 Go to previous messageGo to previous message
GarryJones is currently offline  GarryJones
Messages: 21
Registered: September 2010
Karma:
Junior Member
> I suggest you start with alt.html and get an understanding on how HTML
> works.   Your PHP will then be much easier.

Well, I have been working with HTML since 1995. No I am not an expert.
I have been in computers since 1979 and I gained some fame for the
first logged question about the year 2000 problem (IBM Knowledge base
summer 1980). So I have a computer/logical intelligence and a good-
enough-to-get-things-working-knowledge on many things. In five years
of php and mysql I have NEVER lost a user entered record. This is with
about 1,5 million keyed in records a year on the seven sites I work
with. Most of work is free in my spare time volentry work for sports
organisations.

In this actual case I started with a drop down menu. But the users
found it difficult to understad why they could not click on the
<tr><td> to chose the trip they wanted. Ie one click rather than
opening and selecting from a dropdown menu and then clicking OK.

The <tr><td> are needed for details to explain trip itinery.

So I went with this (Example with 2 forms).

<tr><td>Trip 1 name and details</td>
<td width="150" valign="middle" class="barstyle">
<FORM action="boksteg2.php" method="post" name="steg110" id="steg110"
> <input name="resmalval111" type="hidden" value="110">
<input type="Submit" value = "Boka NU">
</FORM>
</td></tr>

<tr><td>Trip 2 name and details</td>
<td width="150" valign="middle" class="barstyle">
<FORM action="boksteg2.php" method="post" name="steg111" id="steg111"
> <input name="resmalval111" type="hidden" value="111">
<input type="Submit" value = "Boka NU">
</FORM>
</td></tr>

I only want one form Entered. I want it as a one-click operation.

If the first form is Submitted it sends 110 to the next page
If the second form is Submitted it sends 111 to the next page

Bascially I need is x number of submit buttons that send x number of
unique values to the next page. My method works.

Now when on the next page it needs to do something with the value it
received. My method necessitates a long-winded code that I thought I
could simplify by dynamicly creating it with php and "for each"

If you can point me to an easier way then ok, but I do have it working
now, even if I am not happy with the code.... as its long winded.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Illegal variable _files
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:48:46 GMT 2024

Total time taken to generate the page: 0.04077 seconds