RE: PHP and mySQL help!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you update $date and nothing else on the page, are any of the other
values in the URL (HREF) set? You have two separate forms.  $date is in one
and $host is in the other. However, all of the other variables in your URL
(HREF) are from the second form where $host is. My guess is that since you
have information coming from two separate forms, only data from one of the
forms is being submitted. I might be totally wrong though because I don't
know what happens when you use two forms on the same page, let alone two
forms without names.

If my theory is right, you should be able to use one form to encompass all
of the data and use two separate tables within the form to format the
controls on the page.

Hope this helps.
> -----Original Message-----
> From: Dzung Nguyen [mailto:dunguyen@iol.unh.edu]
> Sent: Friday, January 10, 2003 1:33 PM
> To: holmes072000@charter.net
> Cc: php-db@lists.php.net
> Subject: Re:  PHP and mySQL help!
> 
> 
> Thanks for the quick reply!  Perhaps I should describe my 
> problem more 
> specifically so that u could have a better idea:
> 
> The code on PHP page to create forms for users to input field names:
> 
> $tempdate = $date ;
> $tempselect = $select ;
> echo "<font size=$fontsize-1>Choose date<br></font>
>         <form action=\"build_form.php\" target=\"_top\" method=get>
>         <input type=hidden name=\"select\" value=\"$tempselect\">
>         <input type=hidden name=\"order\" value=\"$order\">
>         <input type=hidden name=\"ordertwo\" value=\"$ordertwo\">
>         <input type=hidden name=\"way\" value=\"$way\">
>         <input type=hidden name=\"waytwo\" value=\"$waytwo\">
>         <input type=\"text\" name=\"date\" 
> value=\"$tempdate\" size=17 
> maxlength=10></form>" ;
> echo "</table>" ;
> 
> $temphost = $host;
> echo "<font size=$fontsize-1>Choose host<br></font>
>         <form action=\"build_form.php\" target=\"_top\" method=get>
>         <input type=hidden name=\"select\" value=\"$tempselect\"> 
>         <input type=hidden name=\"order\" value=\"$order\">
>         <input type=hidden name=\"ordertwo\" value=\"$ordertwo\">
>         <input type=hidden name=\"way\" value=\"$way\">
>         <input type=hidden name=\"waytwo\" value=\"$waytwo\">
>         <input type=\"text\" name=\"host\" 
> value=\"$temphost\" size=17 
> maxlength=10></form>" ;
> echo "</table>" ;
> 
> I then would concat the values to query the database as follow:
> 
>  echo "<a 
> href=\"build_form.php?select=all&date=$date&host=$host&order=$
> order&ordertwo=$ordertwo&way=$way&waytwo=$waytwo\" 
> target=\"_top\">
> 
> My problem right now is that I can't seem to keep both 
> values.  If one 
> value is update (host for example), the other value (date) is 
> no longer 
> set???
> Thanks again for your help.
> 
> 
> -- 
> Dzung V. Nguyen                     email: dunguyen@iol.unh.edu
> Alpha Linux Group                   http://linux.iol.unh.edu/clp
> InterOperability Laboratory
> University of New Hampshire         phone: (603) - 862 - 0401
> Durham, NH 03824                    fax  : (603) - 862 - 4181
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux