<?php $dbhost = 'yourhost'; $dbusername = 'username'; $dbpasswd = 'password'; $database = $_GET['database']; $connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") or die ("Couldn't connect to server."); $db = mysql_select_db("$database", $connection) or die("Couldn't select database."); ?>
I then want to include this file like this
I get the following error messages
Warning: main(db.php?database=mydb) [function.main]: failed to open stream: Invalid argument
Warning: main() [function.include]: Failed opening 'db.php?database=mydb' for inclusion
This maynot even be possible with an include. Any suggestions.