ryanwolff Posted December 9, 2012 Share Posted December 9, 2012 im doing a project for my class and im getting this error so im suppose to be able to type in a phone number and a message. Its suppose to be taken from the forum and be put into the database into a table with columns/message/phone number here is the forum <?php //Add message and phone number to the "messages" table ... $con = mysql_connect("localhost","rrwolff*****","****"); //Connection string //drmerry_Project6 is the user then project6 is the password if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("rrwolff0_wolffman", $con); //drmerry_php is the database $sql="INSERT INTO Project6 VALUES ('".$_POST[textmessage]."','".$_POST[phonenumber]."');" ; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Record Added"; //line 3 and line 8 have to be customized to your settings // ?> //****************************************************************************************** //This section will send an the text message to everyone in the Members table $fromemail = "****16@email.*****" ; $message = $_POST[textmessage] ; $sql="SELECT Email FROM members"; mysql_query($sql,$con); $result = mysql_query($sql); //echo "Message Sent To:<br/>"; while ($row = mysql_fetch_assoc($result)) { // while will look through all members of the database //echo $row['Email']."<br/>"; //echo "From Email:".$fromemail."<br/>"; mail($row['Email'], "New Text Message", $message, "From: ". $fromemail ); } //****************************************************************************************** //This section will add an entry to an RSS feed $rss = simplexml_load_file('text.xml'); $item= $rss->channel->addChild('item'); $item->addChild('title', date("m/d/Y")."-".date("g:i a") ); $item->addChild('description', $_POST[textmessage]."-".$_POST[phonenumber]); file_put_contents('text.xml', $rss->asXML()); Im getting the error message when i type in my number and message Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'rrwolff0_dennis'@'localhost' (using password: YES) in /home/rrwolff0/public_html/Campbell/ITS200/Projects/Project6/Project6.php on line 3Could not connect: Access denied for user 'rrwolff0_dennis'@'localhost' (using password: YES) can any1 help me please? Quote Link to comment https://forums.phpfreaks.com/topic/271793-need-php-help-with-this-school-project/ Share on other sites More sharing options...
MDCode Posted December 9, 2012 Share Posted December 9, 2012 It means that your login credentials are incorrect for connecting to the database. Also you want to go change your login details as google indexes these pages usually a few minutes within posting. Quote Link to comment https://forums.phpfreaks.com/topic/271793-need-php-help-with-this-school-project/#findComment-1398430 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.