For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > December 2004 > Re: [PHP-DB] query is not executing data is not entering in created dat









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] query is not executing data is not entering in created dat
Amol Patil

2004-12-27, 3:55 pm

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.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com