From: "Matt Warden" <[EMAIL PROTECTED]>
>
> Joseph Harris wrote:
> > But whatever I do to get the main script (which returns the info from a
> > form) I get:
> >
> > error inserting your information into MySQL; No Database Selected
> >
> > I just cannot see what the problem is (on this anyway). I've tried
both
> > connect and pconnect, I've checked if any other db call or close is in
the
> > script.
>
> http://php.net/mysql_select_db
>
> You need to call mysql_select_db('dbname'); after you connect so MySQL
> knows which database files you intend to work on.
>
> HTH,
>
> - --
> Matt Warden
> Miami University
> Oxford, OH, USA
> http://mattwarden.com
Yes Matt, thanks. That far I have got. This is the content of my connect
file:
<?php
//connect to server and select database - organise include
$conn = mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("loop",$conn) or die(mysql_error());
?>
And this works - in small test files both as a cut and paste and as an
include(). I am just foxed by what is making it fail in the script as a
whole. In fact, trying to solve this, I am calling the db_connect file
twice. The query to write to the db is in a switch statement; but that is
copied from another script that has worked.
Joseph
____ The WDVL Discussion List from WDVL.COM ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.