I will ignore the BIG security issues, assuming that it's on your computer.
try
also,Code:mysql_connect('localhost',$username,$password);Code:mysql_query($query) or die(mysql_error());
If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!whats wrong with this
<?php
$username="ovt_ovt";
$password="*****";
$database="ovt_ovt";
$ovt=$_POST['ovt'];
$domain=$_POST['domain'];
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO add (domain, ovt) VALUES ('".$domain."','".$ovt."')";
mysql_query($query);
echo "Query Success!";
?>
its not working although it says Query Success!
I will ignore the BIG security issues, assuming that it's on your computer.
try
also,Code:mysql_connect('localhost',$username,$password);Code:mysql_query($query) or die(mysql_error());
afraid it dosent work
i think its in
$query = "INSERT INTO add (domain, ovt) VALUES ('".$domain."','".$ovt."')";
do you get any error after you added the second line from my first post?
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'add (domain, ovt) VALUES ('DOMAIN HERE','OVT HERE')' at line 1
you do have a table called "add"?
yes and it reads from it
www.ovtdaily.com
i got it working!! thanks for your help
Last edited by dannywilson; 01-18-2006 at 04:57 PM. Reason: Automerged Doublepost
Code:$query = "INSERT INTO `add`( `domain` , `ovt` ) values('".$domain."','".$ovt."')"; mysql_query($query) or die(mysql_error());
ADD is a mySQL reserved keyword. I guess the issue stems from the table name.
NameNewsletter.com - free lists of available domain names
ZoneFiles.net (beta) - ccTLD and gTLD droplists
yes, the reason is for add. I had a similar problem a while ago.
Additionally, putting localhost without quote tags should of returned an error, because it is not a php variable and thus wasnt set...
Tyler Cruz schooled me in BW, so he won this until May 23rd, 2011 TylerCruz
works for me...
Bookmarks