[prev in list] [next in list] [prev in thread] [next in thread] 

List:       phpauction
Subject:    [PHPAUCTION] =?iso-8859-1?Q?Please_Help_Me=AC!!!_?=
From:       "Pryderi  ap Rhisiart \(www.y-we.com\) Tudalen Newydd" <pryderi () y-we ! co ! uk>
Date:       2001-06-21 9:41:02
[Download RAW message or body]

Dear Friends , 
I am adding another field into the aution site , sell.php but I am getting an error \
when doing it .  This is what I do : 

1. Make a new field in the auction table called infectedarea using phpmyadmin 

2. I want the new field (Drop Down Menu) to appear on the sell.php page

3. add a file infectedareas.inc.php to /includes

4. Edit sell.php page to include details of my new field : 

a.  $atype = $sessionVars["SELL_atype"];
b.    // infected area
   reset($infectedareas);
   list($iarea,) = each($infectedareas);

c.   // ------------------------------------- infected area
   $T= "<SELECT NAME=\"iarea\">\n";
   reset($infectedareas); while(list($key,$val)=each($infectedareas)){
    $T.=
     " <OPTION VALUE=\"".
     $key.
     "\" ".
     (($key==$iarea)?"SELECTED":"")
     .">".$val."</OPTION>\n";
   }
   $T.="</SELECT>\n";
   $TPL_infectedareas = $T;


d.    // infected area
  $sessionVars["SELL_iarea"] = $iarea;


e.    // infected area
  $TPL_infectedarea = $infectedareas[$sessionVars["SELL_iarea"]];
  if ( intval($sessionVars["SELL_iarea"])==2 )
   $TPL_infectedarea .= "</TD></TR><TR><TD ALIGN=RIGHT> $std_font <B>Quantity:</B> \
</FONT></TD><TD>$std_font".$sessionVars["SELL_iquantity"]."</TD></TR>";

f.  $sessionVars["SELL_iarea"]."', '".// infected area 


5. I then edit sell template php . html to show the drop down menu calling \
$TPL_infectedarea


6. The Problem = When I upload the sell.php works fine , shows my drop down menu ok . \
 When I go to the Item I hae created the Time has gone back to -11494 days . The \
auction has closed :-( 

Has any one got an idea why this happens ?/

Do I need to edit other files exept sell.php and sell template php . 


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Dear Friends , </FONT></DIV>
<DIV><FONT size=2>I am adding another field into the aution site , sell.php but 
I am getting an error when doing it . </FONT></DIV>
<DIV><FONT size=2>This is what I do : </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>1. Make a new field in the auction table called infectedarea 
using phpmyadmin </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>2. I want the new field (Drop Down Menu) to appear on the 
sell.php page</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>3. add a file infectedareas.inc.php to /includes</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>4. Edit sell.php page to include details of my new field : 
</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>a. &nbsp;$atype = $sessionVars["SELL_atype"];<BR>b. 
&nbsp;&nbsp;&nbsp;// infected 
area<BR>&nbsp;&nbsp;&nbsp;reset($infectedareas);<BR>&nbsp;&nbsp;&nbsp;list($iarea,) 
= each($infectedareas);</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>c. &nbsp;&nbsp;// ------------------------------------- 
infected area<BR>&nbsp;&nbsp;&nbsp;$T=&nbsp;"&lt;SELECT 
NAME=\"iarea\"&gt;\n";<BR>&nbsp;&nbsp;&nbsp;reset($infectedareas); 
while(list($key,$val)=each($infectedareas)){<BR>&nbsp;&nbsp;&nbsp;&nbsp;$T.=<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&nbsp;&lt;OPTION \
 VALUE=\"".<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$key.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\" \
 ".<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(($key==$iarea)?"SELECTED":"")<BR>&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;."&gt;".$val."&lt;/OPTION&gt;\n";<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;$T.="&lt;/SELECT&gt;\n";<BR>&nbsp;&nbsp;&nbsp;$TPL_infectedareas \
 = $T;</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV><FONT size=2>
<DIV><BR>d.&nbsp;&nbsp;&nbsp;&nbsp;// infected 
area<BR>&nbsp;&nbsp;$sessionVars["SELL_iarea"] = $iarea;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>e. &nbsp;&nbsp;&nbsp;// infected area<BR>&nbsp;&nbsp;$TPL_infectedarea 
= $infectedareas[$sessionVars["SELL_iarea"]];<BR>&nbsp;&nbsp;if ( 
intval($sessionVars["SELL_iarea"])==2 )<BR>&nbsp;&nbsp;&nbsp;$TPL_infectedarea 
.= "&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD ALIGN=RIGHT&gt; $std_font 
&lt;B&gt;Quantity:&lt;/B&gt; 
&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;$std_font".$sessionVars["SELL_iquantity"]."&lt;/TD&gt;&lt;/TR&gt;";</DIV>
 <DIV>&nbsp;</DIV>
<DIV>f. &nbsp;$sessionVars["SELL_iarea"]."', '".// infected area </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>5. I then edit sell template php . html to show the drop down menu calling 
$TPL_infectedarea</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>6. The Problem = When I upload the sell.php works fine , shows my drop down 
menu ok . </DIV>
<DIV>When I go to the Item I hae created the Time has gone back to <FONT 
face=Verdana>-11494 days . The auction has closed :-( </FONT></DIV>
<DIV><FONT face=Verdana></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana>Has any one got an idea why this happens ?/</FONT></DIV>
<DIV><FONT face=Verdana></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana>Do I need to edit other files exept sell.php and sell 
template php . </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV></BODY></HTML>


_______________________________________________
Phpauction mailing list
Phpauction@albasoftware.com
http://www.albasoftware.com/mailman/listinfo/phpauction


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic