Dear my friends...
I am trying to develop a database application with PHP
Version 4.3.2, MS Window 2000, MySQL 4.0.13-nt and
Apache 2.
I tried to insert a record onto my MySQL but I got
this error messages. What do I have to defined to
overcome this problem?
"
Notice: Undefined variable: productid in
C:\Programme\Ap ache
Group\Apache2\h tdocs\amt\cgi\p roductsave.php on line
15
Notice: Undefined variable: itemname in
C:\Programme\Ap ache
Group\Apache2\h tdocs\amt\cgi\p roductsave.php on line
15
Notice: Undefined variable: description in
C:\Programme\Ap ache
Group\Apache2\h tdocs\amt\cgi\p roductsave.php on line
15
Notice: Undefined variable: price in
C:\Programme\Ap ache
Group\Apache2\h tdocs\amt\cgi\p roductsave.php on line
15
Notice: Undefined variable: information in
C:\Programme\Ap ache
Group\Apache2\h tdocs\amt\cgi\p roductsave.php on line
16
Saved successfully
"
Here is the code of productsave.php :
"
<?php
include("functi ons.php");
$sql="
insert into product ( productid, itemname,
description, price, information )
values ('$productid', '$itemname', '$description',
'$price', '$information')
";
$conn=connectio n();
choosedb();
if (mysql_query($s ql,$conn)){
echo "Saved successfully<br >";
}
else echo mysql_error();
mysql_close($co nn);
?>
"
Here is the code of the form which calls
productsave.php (it's cgi program):
"
<form action="cgi/productsave.php " method="POST">
<center><b><u>D ata Entry - Product
List</u></b></center>
<br>
<table align="center" border="0">
<tr><td align="left">1. </td><td align="left">Pr oduct
ID</td><td align="left" >:</td>
<td align="left" ><input type="text" name="productid "
readonly="yes"> </td></tr>
<tr><td align="left">2. </td><td align="left">It em
Name</td><td align="left">:</td>
<td align="left"><i nput type="text"
name="itemname" ></td></tr>
<tr><td align="left">3. </td><td
align="left">De scription</td><td align="left">:</td>
<td align="left"><i nput type="text"
name="descripti on"></td></tr>
<tr><td align="left" >4.</td><td
align="left">Pr ice</td><td align="left">:</td>
<td align="left"><i nput type="text"
name="price"></td></tr>
<tr><td align="left">5. </td><td
align="left">In formation</td><td align="left">:</td>
<td align="left"><i nput type="text"
name="informati on"></td></tr>
<tr><td colspan="4" align="center"> <input
type="submit" value="Save" src="img/ok.png">
<input type="reset" value="Clear"
src="img/no.png"></td></tr>
</table>
</form>
"
Please tell me. Thank you very much in advance.
_______________ _______________ ____
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw