Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

FW: [PHP-DB] check out this , if block is not executing ............
From what I see, the code is fine, you just haven't finished it.

mysql_query("INSERT INTO totalinfo (Username,Password) VALUES
 ('$loginusername','$loginpassword'),$dbh
")or die (mysql_error());
}

Give that a bash

-----Original Message-----
From: John Hicks [mailto:johnlist@gulfbridge.net]
Sent: Monday, December 27, 2004 4:40 PM
To: amol patil
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] check out this , if block is not executing
............

amol patil wrote:

>hallo ,
>
>entered information still not shown in table of database
>
>is below code is right ?
>form name and type values are 'submit' . then
>
>what is wrong with this code,
>
><?php
>
>if(isset($_POST['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());
>}
>?>
>
>
Are you getting any error messages when you click on 'submit'? (Check
your php log.)

Include an 'else' in your if statement (along with a debug message) so
you can see if the 'submit' is detected.

-John

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Report this thread to moderator Post Follow-up to this message
Old Post
Darryl
12-27-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:19 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.