close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource/webassist/form_validations/wavt_scripts_php.php on line 642

Thread began 4/12/2013 11:53 am by David | Last modified 4/15/2013 12:08 pm by Jason Byrnes | 3796 views | 4 replies |

David

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource/webassist/form_validations/wavt_scripts_php.php on line 642

HI
I keep getiing these warnings after I fill in the registration form set up by security assist. Everything is Ok in local host but this happens on the remote server

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/rolypoly/public_html/performadvance.com/htdocs/webassist/form_validations/wavt_scripts_php.php on line 642

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rolypoly/public_html/performadvance.com/htdocs/webassist/form_validations/wavt_scripts_php.php on line 645

These are lines 642-645 inclusive

mysql_select_db($db, $conn);
$WA_UniqueWhere = Validations_generateWhereClause(array($filterCol, $keyCol), array($filterType, $keyType), array($filterValue, $keyValue), array("=", "<>"));
$WA_UniqueSQL = "SELECT `".$keyCol."` FROM `".$tableName."` WHERE ".$WA_UniqueWhere->sqlWhereClause;
$WA_UniqueRS = mysql_query($WA_UniqueSQL, $conn) or die(mysql_error());

Thanking you in anticipation

Sign in to reply to this post

Jason ByrnesWebAssist

Before uploading the pages to the live server, you need to edit the Database connection file with the correct details for connecting to the MySQL Server on the Host.

Sign in to reply to this post

David

Hi Jason

I think I have already done that. I changed the details from

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connPerform = "localhost";
$database_connPerform = "perform_advance";
$username_connPerform = "root";
$password_connPerform = "";
$connPerform = mysql_pconnect($hostname_connPerform, $username_connPerform, $password_connPerform) or trigger_error(mysql_error(),E_USER_ERROR);
?>

to

$dbh=mysql_connect ("localhost", "cpuser_dbuser", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("cpuser_db");

This works until I want to submit the data when I get the above warnings

Thank you

Sign in to reply to this post

Jason ByrnesWebAssist

Dont change the code completely as you have done.

only change the values being used in the connection code.

change:

php:
<?php

# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connPerform "localhost";
$database_connPerform "perform_advance";
$username_connPerform "root";
$password_connPerform "";
$connPerform mysql_pconnect($hostname_connPerform$username_connPerform$password_connPerform) or trigger_error(mysql_error(),E_USER_ERROR); 
?>



to:

php:
<?php

# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connPerform "localhost";
$database_connPerform "cpuser_db";
$username_connPerform "cpuser_dbuser";
$password_connPerform "password";
$connPerform mysql_pconnect($hostname_connPerform$username_connPerform$password_connPerform) or trigger_error(mysql_error(),E_USER_ERROR); 
?>



by changing the code the way you did, you changed the variable names that the code is generated to use. only change the variable values.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...