Re: query is not executing data is not entering in created database
| From: | amol patil | Date: | Sun, 26 Dec 2004 17:21:46 +0000 |
| Subject: | Re: query is not executing data is not entering in created database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37857@lists.php.net to get a copy of this message | ||
hallo,
see below code. query is not executing and data is not shown in table of database.after submit
button hit.
how to evaluate $submit true. have Tried these statements before if statement
echo "--$submit--";
echo "--$_POST["submit"]--";
echo"Submit = $submit ";
but still query is not executing.
<?php
if($submit)
{
$dbh=mysql_connect ("localhost", "root") or die ('I cannot connect to
the database because: ' . mysql_error());
mysql_select_db ("dollar1_allinfo");
mysql_query("INSERT INTO totalinfo (Username,Password) VALUES
('$loginusername','$loginpassword')")or die (mysql_error());
}
?>
suggest changes in above code to execute query.
thank you.
---------------------------------
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.