Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » Undefined index
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Return to the default flat view Create a new topic Submit Reply
Undefined index [message #39876] Mon, 17 December 2007 02:42 Go to previous message
ghinwoon is currently offline  ghinwoon   Malaysia
Messages: 1
Registered: December 2007
Location: Malyasia
Junior Member
add to buddy list
ignore all messages by this user
Hi, i m new to php. I get an UNDEFINED INDEX error message that reads: Notice:Undefined index: topic in ....on line 12

Notice: Undefined index: detail in ....on line 13

Notice: Undefined index: name in ....on line 14

Notice: Undefined index: email in ... on line 15

Here is my code

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");


$datetime=date("d/m/y h:i:s");
$sql="INSERT INTO $tbl_name(topic, detail, name, email, datetime)VALUES('$topic',

'$detail', '$name', '$email', '$datetime')";

echo "Successful<BR>";
echo "<a href=main_forum.php>View your topic</a>";
else {
echo "ERROR";

$email=$_POST['email'];is at line 12,13,14,15
can anyone tell me how to correct it, plz....
[Message index]
Read Message
Read Message
Read Message
Read Message
Previous Topic: object not found on regular webpages
Next Topic: java script to php
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Sep 22 01:35:26 EDT 2018

Total time taken to generate the page: 0.00662 seconds