Jump to content

ADLE

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ADLE's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The code was not necessary Adrock, but thank you. I decided to work with my original file and edit it with the suggestions you all gave me; got it just right now. I setup the database too, think it's good to go now. Still experimenting with it though, but I can see the messages peolple send me on m database. Thanks all.
  2. Yes, using php my admin now as a matter of fact, checking it out. mysql4.0 i beleive
  3. To some extent, but it is probably not setup right. Terrible, yes I know.
  4. Changed $_post to $_POST. Thanks Darkwater. Still says: error updating databaseNo Database Selected. Arrg, wish I knew php.
  5. According to the tutorial this is what it says: Now we will make a connection to the database. You will have to replace: “localhost” with the location of your server “projectc_testuse” with your username “password” with your password Then we are selecting the “projectc_Test” database you will change that to whatever you named the database in the first tutorial. I added something to test and got this error: mysql_connect ("localhost"), "projectc_testuse", "databse name", "password") This is the error: Error: Access denied for user: 'sometihng@72.13.16.211' (Using password: YES) so i changed it back to: mysql_connect ("localhost"), "projectc_testuse", "password") Thanks Piranha, really appreciate this.
  6. Hey Peranha, thanks for the reply. Took all of you suggestions and I got this error: error updating databaseNo Database Selected
  7. Hello all, need help...bad. I Know nothing about PHP, so I've been searching tutorials to achieve what I want but no luck. Here is my form on my contact.html. <form name="contactform" action="contactform.php" method="post" window.onload=function() {document.contactform.reset();};> <table border="0" cellpadding="3"> <tr> <td><font size="6"><a href="http://www.somesite.com/" style="text-decoration:none">HOME</a></font></td> <td rowspan="7" width="1020"><center><font size="3">IF YOU HAVE A QUESTION, COMMENT, OR INQUIRY REGARDING RATES PLEASE CONTACT US AT:<br />INFO&#64;SOMEEMAIL.COM<br /><br />YOU MAY ALSO CONTACT US THROUGH OUR FORM:<br /><br /> NAME:<input type="text" size="36" name="name" class="text1" style="font-family: times" /> <br /> EMAIL:<input type="text" size="36" name="email" class="text2" style="font-family: times" /> <br /> <br /> <textarea name="text" rows="5" cols="139" style="font-family: times"> </textarea> <br /> <br /> <a onclick="document.contactform.reset();return false;" href="#"><img alt="Reset" src="reset.gif" border="0" /></a> / <input type="image" src="submit.gif" alt="Submit" /> </font></center></td> </tr> <tr> Here is my contactform.php file. Got info from a site called http://teamtutorials.com/web-development-tutorials/php-tutorials/inserting-data-into-a-mysql-database-using-php it was called inserting data into mysql database using php tutorial. I just mimic. <?php $name = $_post['name']; $email = $_post['email']; $text = $_post['text']; mysql_connect ("localhost"), "projectc_testuse", "password") or die ('Error: ' . mysql_error()); mysql_select_db ("projectc_Test"); $query="INSERT INTO contacttable (ID, name, email, text)VALUES ('NULL','".$name."','.$email."','".$text."')"; mysql_query($query) or die ('error updating database'); ?> What I would like is the data sebmitted from my form, to mysql database using this form. What am I doing wrong? Maybe I am putting host info, database name in wrong area, but I tired several combinations. Help! Thanks, ADLE
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.