MySQL Forums
Forum List  »  General

Re: can't create a script file
Posted by: hossein haghparast
Date: March 04, 2005 02:04PM

if you are using php you can do like this:
<?
$host="localhost";$user="yuor user name";$pass="your pasword";
$dba = mysql_connect($host, $user ,$pass);
if (!$dba)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db(your data base name);
$query = "insert into your_tablename values ('','$your_variable')";
$result = mysql_query($query);
?>
this is a php simple script for mysql

Hossein Haghparast, Ankara University Ph.D student in Economics
http://www.yeksite.com/

Options: ReplyQuote


Subject
Written By
Posted
Re: can't create a script file
March 04, 2005 02:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.