Running 3.23.56, from phpmyadmin all works fine.  I'm building an admin
page, I can add a record, but when I try and update, I get this error:

<ERROR Number="8" Description="Error: &quot;Undefined index:  ad_num&quot;
on line 26 of /web/home/hovey/public_html/update.php."/>

Anyone have any ideas?

Here's the code for update.php:

<?php require_once("config/include/utils.runtime6.php") ?>
<?php require_once("config/include/mysql.runtime6.php") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

 <head>
  <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="keywords"
content="San Antonio, used cars, new cars, San Antonio new car dealers, San
Antonio used cars, San Antonio new cars, cars, truck, trucks, sale, San
Antonio mercedes, mercedes,San Antonio BMW, car dealer, bmw, BMW, ferrari,
GMC,San Antonio porsche, porsche, classified, classifieds">
<meta name="content"
content="San Antonio Pre-Owned Luxury and Classic Cars - Mercedes - Jaguar -
Porsche - Ferrari - BMW - and more!">
<meta name="generator" content="Adobe GoLive 5">
<meta name="description"
content="San Antonio Pre-Owned Luxury and Classic Cars - Mercedes - Jaguar -
Porsche - Ferrari - BMW - all in San Antonio, South Texas">
<meta name="Copyright" content="Hovey Motorcars of San Antonio Texas">
<TITLE>Hovey Database Update Page</TITLE>
  <style type="text/css" media="screen"><!--
  a:link { color: white;}
a:visited { color: white;}
a:hover { color: blue;}
#layer1 { position: absolute; top: 16px; left: 16px; width: 727px; height:
709px; visibility: visible; display: block }
--></style>
  <?php // GoLive Content Source
     $NewContentSource = WrapMySQLDatabaseResults("hovey", "select * from
table1 where ad_num = '" . $GLOBALS["ad_num"] . "'",
"block=1","NewContentSource");
  ?>
 </head>

 <body bgcolor="white">
  <div id="layer1">
   <form action='config/actions/mysql.actions6.php?<?php echo
URLArgs(array())?>' method="post" name="FormName">
    <table width="767" border="0" cellspacing="0" cellpadding="0" cool
gridx="16" gridy="16" height="655" showgridx showgridy usegridx usegridy>
     <tr height="48">
      <td width="16" height="654" rowspan="15"></td>
      <td width="192" height="48"></td>
      <td content csheight="37" width="496" height="48" colspan="3"
valign="top" xpos="208"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Edit the record and then
click the Update button</font></td>
      <td width="62" height="240" rowspan="7"></td>
      <td width="1" height="48"><spacer type="block" width="1"
height="48"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Ad
Number</font></font></div>
      </td>
      <td width="32" height="606" rowspan="14"></td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='ad_num(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("ad_num")) ?>' size="15"
maxlength="15"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Car
Type</font></font></div>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><select name='car_type(<?php echo
$NewContentSource->AbsolutePosition()?>)' size="1">
        <option value="SUV" <?php echo
selected($NewContentSource->Value("car_type") == "SUV") ?>>SUV</option>
        <option value="Sports" <?php echo
selected($NewContentSource->Value("car_type") == "Sports")
?>>Sports</option>
        <option value="Trucks" <?php echo
selected($NewContentSource->Value("car_type") == "Trucks")
?>>Trucks</option>
        <option value="Luxury" <?php echo
selected($NewContentSource->Value("car_type") == "Luxury")
?>>Luxury</option>
        <option value="Classic" <?php echo
selected($NewContentSource->Value("car_type") == "Classic")
?>>Classic</option>
       </select></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Car
Year</font></font></div>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='car_year(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("car_year")) ?>' size="15"
maxlength="4"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Make</font></font></div>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='make(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("make")) ?>' size="25"
maxlength="25"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Model</font></font></div
>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='model(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("model")) ?>' size="50"
maxlength="50"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Miles</font></font></div
>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='miles(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("miles")) ?>' size="15"
maxlength="15"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">VIN&nbsp;#</font></font>
</div>
      </td>
      <td width="494" height="32" colspan="2" valign="top" align="left"
xpos="272"><input type="text" name='vin(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("vin")) ?>' size="75"
maxlength="75"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="96">
      <td content csheight="19" width="224" height="96" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Features</font></font></
div>
      </td>
      <td width="432" height="96" valign="top" align="left"
xpos="272"><textarea name='features(<?php echo
$NewContentSource->AbsolutePosition()?>)' rows="4" cols="40"><?php echo
$NewContentSource->Value("features") ?></textarea></td>
      <td width="62" height="382" rowspan="7"></td>
      <td width="1" height="96"><spacer type="block" width="1"
height="96"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Body
Color</font></font></div>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='body_color(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("body_color")) ?>' size="25"
maxlength="25"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Interior
Color</font></font></div>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='int_color(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("int_color")) ?>' size="25"
maxlength="25"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Trans
Type</font></font></div>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><select name='trans_type(<?php echo
$NewContentSource->AbsolutePosition()?>)' size="1">
        <option value="Automatic" <?php echo
selected($NewContentSource->Value("trans_type") == "Automatic")
?>>Automatic</option>
        <option value="Manual" <?php echo
selected($NewContentSource->Value("trans_type") == "Manual")
?>>Manual</option>
        <option value="Tiptronic" <?php echo
selected($NewContentSource->Value("trans_type") == "Tiptronic")
?>>Tiptronic</option>
        <option value="5-speed Manual" <?php echo
selected($NewContentSource->Value("trans_type") == "5-speed Manual")
?>>5-speed Manual</option>
        <option value="6-speed Manual" <?php echo
selected($NewContentSource->Value("trans_type") == "6-speed Manual")
?>>6-speed Manual</option>
       </select></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="32">
      <td content csheight="19" width="224" height="32" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Warranty</font></font></
div>
      </td>
      <td width="432" height="32" valign="top" align="left"
xpos="272"><input type="text" name='warranty(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("warranty")) ?>' size="50"
maxlength="50"></td>
      <td width="1" height="32"><spacer type="block" width="1"
height="32"></td>
     </tr>
     <tr height="48">
      <td content csheight="19" width="224" height="48" colspan="2"
valign="top" xpos="16">
       <div align="right">
        <font color="black"><font
face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Engine Type
&amp;&nbsp;Size</font></font></div>
      </td>
      <td width="432" height="48" valign="top" align="left"
xpos="272"><input type="text" name='engine_type(<?php echo
$NewContentSource->AbsolutePosition()?>)' value='<?php echo
fixHTMLquotes($NewContentSource->Value("engine_type")) ?>' size="50"
maxlength="50"></td>
      <td width="1" height="48"><spacer type="block" width="1"
height="48"></td>
     </tr>
     <tr height="110">
      <td width="224" height="110" colspan="2"></td>
      <td width="432" height="110" valign="top" align="left"
xpos="272"><input type="submit" name="_SubmitChanges" value="Update Record"
<?php SetupMySQLUpdate("searchmain.html", '$return', $NewContentSource)
?>></td>
      <td width="1" height="110"><spacer type="block" width="1"
height="110"></td>
     </tr>
     <tr height="1" cntrlrow>
      <td width="16" height="1"><spacer type="block" width="16"
height="1"></td>
      <td width="192" height="1"><spacer type="block" width="192"
height="1"></td>
      <td width="32" height="1"><spacer type="block" width="32"
height="1"></td>
      <td width="32" height="1"><spacer type="block" width="32"
height="1"></td>
      <td width="432" height="1"><spacer type="block" width="432"
height="1"></td>
      <td width="62" height="1"><spacer type="block" width="62"
height="1"></td>
      <td width="1" height="1"></td>
     </tr>
    </table>
    <?php SetupMySQLForm($NewContentSource); ?>
   </form>
  </div>
  <p></p>
 </body>

</html>

<?php if (false) { ?><!-- Mock Content
   "NewContentSource/ad_num" text {}
   "NewContentSource/car_year" text {}
   "NewContentSource/make" text {Porsche, Mercedes, etc...}
   "NewContentSource/model" text {}
   "NewContentSource/miles" text {}
   "NewContentSource/vin" text {}
   "NewContentSource/features" text {&lt;li&gt;text&lt;br&gt;
&lt;li&gt;text&lt;br&gt; &lt;li&gt;text&lt;br&gt; &lt;li&gt;text&lt;br&gt;
&lt;li&gt;text&lt;br&gt; &lt;li&gt;text&lt;br&gt; &lt;li&gt;text&lt;br&gt;
&lt;li&gt;text&lt;br&gt; &lt;li&gt;text&lt;br&gt; &lt;li&gt;text&lt;br&gt;
&lt;li&gt;text&lt;br&gt; &lt;li&gt;text&lt;br&gt;
lt;li&gt;text&lt;br&gt;  }
   "NewContentSource/body_color" text {}
   "NewContentSource/int_color" text {}
   "NewContentSource/warranty" text {}
   "NewContentSource/engine_type" text {}
--><?php } ?>


Anyone have any ideas?

Thanks,
Michael



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to