Re: mysql_connect noob question
| From: | Glob Design Info | Date: | Sun, 21 Apr 2013 23:31:31 +0000 |
| Subject: | Re: mysql_connect noob question | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320949@lists.php.net to get a copy of this message | ||
Even more strange:
It doesn't work from the form with or without the domain (but on the command line it does), but......
IF I add the $_REQUEST access *and* use the user that the *MySQL* install has, and *not* the xeround user name (my email), then it *does* work!
WEIRD.
On 4/21/13 3:59 PM, David OBrien wrote:
In fact using the @gmail.com part added on gives me the same error as the OP I think their welcome email needs tweaking.. try it without the domain added on On Sun, Apr 21, 2013 at 6:56 PM, David OBrien <dgobrien@gmail.com> wrote:I should note my user name in this case *is* an email address, howeverthe dots in that address are *not* being converted to underscores as mentioned (at least not visibly). I just created a free account there and the email says my username is dgobrien@gmail.com but I connected to it from sqlyog and a php page by using JUST "dgobrien" <?php $host = "instance44364.db.xeround.com:3924"; if ( $_REQUEST['Submit'] ) { $conn = mysql_connect( $host, $_REQUEST['username'], $_REQUEST['password'] ) or die( mysql_error() ); if ($conn) { mysql_select_db("uwharrie") or die( mysql_error() ); echo "Connected<br>"; } } ?><form id='login' action='index.php' method='post' accept-charset='UTF-8'> <legend>Login</legend> <input type='hidden' name='submitted' id='submitted' value='1'/> <label for='username' >UserName*:</label> <input type='text' name='username' id='username' value='dgobrien' maxlength="50" /> <label for='password' >Password*:</label> <input type='password' name='password' id='password' maxlength="50" value='mmmmmm' /> <input type='submit' name='Submit' value='Submit' /> </form>