error
Posted: Mon Jun 19, 2006 1:21 pm
Pimptastic | Please use
Whenever i run this script it shows the following error
Can someone fix this error.
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am a having a bad problem..Code: Select all
<html>
<head><title>Cool links</title>
</head>
<body bgcolor="#0A5C8E" link="#EBEBEB" vlink="#EBEBEB" alink="#FFB340">
<?php
$link=mysql_connect("localhost", "root", "");
$db=mysql_select_db("chetan_db", $link);
if ($_POST['submit'])
{
$link_id=$_POST['id'];
$link_name=$_POST['name'];
$link_desc=$_POST['desc'];
$sql="insert into link values ('', '" . $link_name . "', '" . $link_desc ."')";
$query=mysql_query($sql);
}
?>
<form action="insert.php" method="post">
<table width="100%" align="center" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse" bordercolor="#808080">
<tr>
<td width="10%" align="center"><font color="#FFB340" size="2.5">URL</font></td>
<td width="90%"><input type="text" name="name" value="" size="25"></td>
</tr>
<td width="10%" align="center"><font color="#FFB340" size="2.5">Description</font></td>
<td width="90%"><input type="description" name="desc" value="" size="65"></td>
</tr>
</table>
<br>
<div align="center"><input type="submit" name="submit" value="Submit"></div>
</form>
<br>
<div align="center"><a href="index.php"><font color="#FFB340" size="2.5">Back to Link</font></a> | <a href="http://127.0.0.1"><font color="#FFB340" size="2.5">Back to Forum</a>
</div>
</body>
</html>Code: Select all
Notice: Undefined index: id in d:\program files\easyphp1-8\www\link\insert.php on line 11Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]