Martin,
Thank you for the insight when I ran the php file you suggested,
nothing appeared to be related to mysql. I installed both the php and mysql
packages onto my Linux box through a rpm installer. Where can I obtain
mysql support for php?
Tom
Martin Luethi [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
line 16: mysql_connect(tflood, thomas91);
I think you mean: mysql_connect(localhost, tflood, thomas91);
otherwise mysql_connect takes tflood as Server and thomas91 as
Username (if so, its better to replace passwords with * before
posting)
- http://ch.php.net/mysql_connect
after connecting you need to choose a database, e.g.
line 17: mysql_select_db(databasename);
also make sure that the mysql-extension is installed and loaded.
to check this, create a textfile phpinfo.php with this content:
?
phpinfo();
?
check the output for information about mysql
g. tinu
Tue, 27 Jan 2004 08:51:52 -0500 Tom Flood [EMAIL PROTECTED]:
Thank you both, here is the entire code :
1html
2head
3titleUntitled Document/title
4meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
5/head
6
7body
8?php
9 $name = $_GET[name];
10 $address = $_GET[address];
11$city = $_GET[city];
12print Name is $namebr\n;
13print Address is $addressbr\n;
14print City is $citybr\n;
15
16mysql_connect(tflood, thomas91);
17
18$result = mysql_query(
19 insert into ephi.info
20 (name, address, city) values
21 ('$name', '$address', '$city')
22);
23if ($result) {
24 print EOT
25
26 h1 Thank you. /h1
27 Your signup is highly appreciated. To show our appreciation, we will
send you something that you, in turn, will appreciate. p
28 Remember our motto: Once a Sinfonian, Always a Sinfonian, Long Live
Sinfonia!
29EOT;
30 }
31 else {
32 print Something went wrong dunbass;
33 }
34 mysql_close();
35?
36/body/html
As far as mysql working on the machine, it is. I am able to use the
mysql
command to loginto the server and query my databases. And I have the
MySQL
Command Center installed and am able to see the databases on my computer
just fine.
Thank you for your help.
Tom
Krit Kanrat [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
Are you sure that you already enable mysql function on your web server
?
Krit Kanrat
Tom Flood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,
I am just beginning my learning of php and its uses with mysql. I
wrote
a
small program to add information into a mysql database. However my
script
returns the following error:
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/ephi/mysql.php on line 16
what is the problem here? How can I fix it?
I truly appreciate any help given.
Tom Flood
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php