Error message - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-14-2009, 01:23 AM   #1 (permalink)
Junior Member
 
Join Date: May 2009
Location: Hyderabad (India)
Posts: 12
Default Error message

I have created a table using insert option in PHP. Here the form is working well but it showing some errors like


Notice: Undefined index: sno in E:\wamp\www\Ascent\Adobe Illustrator.php on line 89

May I know what the reason for this error code and how can I find the error.

Another problem is when i am refreshing this page it was automatically adding a row.

If possible can any one please solve my problem.

Here is my php code


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Adobe Illustrator</title>
<link type="text/css" rel="stylesheet" href="Css/AI.css" />
<script language="JavaScript" src="js/calendar.js" type="text/javascript"></script>
<script language="JavaScript" src="js/QuickDates.js" type="text/javascript"></script>
<script>
function getSub(f)
{
f.action.value='Save'
f.submit();
}
//cooldls.com
</script>
<script language="javascript">
function compare(){
var u = u_date
var r = r_date
if(u < r)
{
alert("Please enter date in currect form MM/DD/YYYY");
}
else{
return true;
}
}
</script>
</head>

<body>
<form action="#" method="post" name="Form1" class="a">
<table width="100%" border="0">
<tr>
<td width="18%">S.No.</td>
<td width="82%"><input name="sno" type="text" size="25" /></td>
</tr>
<tr>
<td>Recieved Date</td>
<td><input name="r_date" type="text" size="25" readonly="true" />
<a href="javascript:show_calendar('Form1.r_date');">< img src="Images/newCal2.gif" border="0" align="top"></a></td>
</tr>
<tr>
<td>Up Date</td>
<td><input name="u_date" type="text" size="25" readonly="true" onfocus="compare()" />
<a href="javascript:show_calendar('Form1.u_date');">< img src="Images/newCal2.gif" border="0" align="top"></a></td>
</tr>
<tr>
<td>Plan Name</td>
<td><input name="p_name" type="text" size="25" /></td>
</tr>
<tr>
<td>Client</td>
<td><input name="client" type="text" size="25" /></td>
</tr>
<tr>
<td>Drafter&nbsp;</td>
<td><select name="drafter"/>
<option value="JYO">JYO</option>
<option value="VNK">VNK</option>
<option value="SSR">SSR</option>
<option value="PLN">PLN</option>
</select></td>
</tr>
<tr>
<td>Time Taken</td>
<td><input name="t_taken" type="text" size="25" /></td>
</tr>
<tr>
<td>Amount</td>
<td><input name="amount" type="text" value="$6" size="25" readonly="true" /></td>
</tr>
<tr>
<td align="left">&nbsp;</td>
<td align="left"><p>
<input name="ok" type="submit" value="OK" onclick='getSub(Form1);'/>&nbsp;&nbsp;
<input type="reset" value="Reset" /></td>
</tr>
</table>
</form>
<a href="AI_Search.php">Show Table</a>
</body>
</html>
<?php
$link = mysql_connect("127.0.0.1","root","");
$DB = mysql_select_db("Illustrator",$link);
$sql = "INSERT INTO AI_floor_plan (sno,r_date,u_date,p_name,clint,drafter,t_taken,am ount)
VALUES ('".$_POST["sno"]."','".$_POST["r_date"]."','".$_POST["u_date"]."','".$_POST["p_name"]."','".$_POST["client"]."','".$_POST["drafter"]."','".$_POST["t_taken"]."','".$_POST["amount"]."')";
if(!mysql_query($sql))
{
die('Not connected : ' . mysql_error());
}
?>




[IMG]C:\Documents and Settings\Administrator\desktop\error message.jpg[/IMG]
Attached Images
File Type: jpg error message.jpg (64.8 KB, 2 views)
jyothip is offline   Reply With Quote
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:45 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting