Sure it's simple but.............
| From: | Keith Whyman | Date: | Tue, 13 Mar 2001 16:31:58 +0000 |
| Subject: | Sure it's simple but............. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7409@lists.php.net to get a copy of this message | ||
I've got a several links(each with a seperate article number) on a page
which call the following
cms/offer.php?new=yes
offer.php is only offers except when new exists when new.php is included
Up to here no problems but in new I've got a loop which includes a form
field.
I want this form field with a value but only for the correct article from
which the link comes !
Database query is
SELECT DISTINCT
ID,Heading,Text,Art_Nr1,Descript1,Price1,Art_Nr2,Descript2,Price2,Art_Nr3,De
script3,Price3,Geschaltet,What,DateTime
FROM trial
WHERE (Geschaltet = '1' )
AND (What ='offer')
ORDER BY DateTime
Result is so
if ($result1) {
while ($r = mysql_fetch_array($result1)) {
$heading = $r["Heading"];
$text = $r["Text"];
$art_nr1 = $r["Art_Nr1"];
$descript1 = $r["Descript1"];
$price1 = $r["Price1"];
$art_nr2 = $r["Art_Nr2"];
$descript2 = $r["Descript2"];
$price2 = $r["Price2"];
$art_nr3 = $r["Art_Nr3"];
$descript3 = $r["Descript3"];
$price3 = $r["Price3"];
$free =$r["Geschaltet"];
$id = $r["ID"];
and then everything justs get echoed onto the screen
if ($art_nr1 != '') {
echo "
<input type=\"text\" name=\"$art_nr1\" size=\"3\"
maxlength=\"5\"
value=\"1\">
Anyone got any clever ideas ?
Thanks
Keith