Mysql problem + Problem in loading data SOLVED
Well pals, Today I am not writing this message to bother you with my problems but to pass my warmest thanx to you guys all. Duncan, Peter , Mike, Cory ... I appreciate your time and energy in solving the problems I faced on the above subject. Special thanx to Duncan for his precise and priceless comments, think he knows what he is doing. Thank again all, Cheers, Aron Bereket __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
PROBLEM WITH LOADING DATA
Hi fellas, I wrote a php program that loads and displays data into and from a mysql database. It connectes and displays the data correctly. But when you fill a form and click submit it acts as if the data is written on the data base while isn't if you check it by manual connection. What could be the problem, Regards, Aron __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
PROBLEM LOADING DATA USING PHP
Hi there, I am posting this message again sice my previous post was vague. I have recently configured a server which runs redhat 7.2. I followed the installation procedures to install mysql database and PHP on the same server and they seem to run properly. My aim is to load data into a mysql database and view the same data using web page. Before I implement my own project i stolen the following code from the web and tried to customize it on my server. (section of the code customized code is the following) -- if (($REQUEST_METHOD=='POST')) { // This loop removed dangerous characters from the posted data // and puts backslashes in front of characters that might cause // problems in the database. for(reset($HTTP_POST_VARS); $key=key($HTTP_POST_VARS); next($HTTP_POST_VARS)) { $this = addslashes($HTTP_POST_VARS[$key]); $this = strtr($this, , ); $this = strtr($this, , ); $this = strtr($this, |, ); $$key = $this; } // This will catch if someone is trying to submit a blank // or incomplete form. if ($name $email $message ) { // This is the meat of the query that updates the guests table $query = INSERT INTO guests ; $query .= (guest_id, guest_name, ; $query .= guest_email, guest_time, guest_message) ; $query .= values(,'$name','$email',NULL,'$message'); mysql_pconnect(,bereket,iloveumom) or die(Unable to connect to SQL server); mysql_select_db(employee) or die(Unable to select database); mysql_query($query) or die(Insert Failed!); } else { // If they didn't include all the required fields set a variable // and keep going. $notall = 1; } } - Result: Everything seems fine. Except when you fill the form and click submmit, it doesn't update the database. But if i connect to mysql maually and add some records, you can automatically see the new data posted on the web, which is what I wanted. problem: It is not updating the database from the web form. YOUR HELP IS APPRICIATED, Cheers, Aron __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MYSQL problem
Hi there, I have recently installed mysql and php on my mechine and both work fine. But when i wrote an HTML/Php to access my databse I got the following error message: Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/employee.php on line 48 I tried also with mysql_real_connect() and mysql_connect() functions bud didn't solve the problem. Does it mean that the mysql_pconnect() doesn't exitst or is some configuration problem? Your help is appriciated. cheers, Bereket L __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MYSQL problem
Thanx for the quick reply peter. That of one of the things I did when I had the problem. It was not enabled. But when I enable it it gave me mysql.so doesn't exits. I checked it on the path there is not mysql.so. cheers, Bereket --- Peter Lovatt [EMAIL PROTECTED] wrote: check your php.ini to make sure the mysql extensions are enabled. Peter -Original Message- From: Aron Bereket [mailto:[EMAIL PROTECTED] Sent: 13 January 2004 23:36 To: [EMAIL PROTECTED] Subject: MYSQL problem Hi there, I have recently installed mysql and php on my mechine and both work fine. But when i wrote an HTML/Php to access my databse I got the following error message: Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/employee.php on line 48 I tried also with mysql_real_connect() and mysql_connect() functions bud didn't solve the problem. Does it mean that the mysql_pconnect() doesn't exitst or is some configuration problem? Your help is appriciated. cheers, Bereket L __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Peter Lovatt [EMAIL PROTECTED] wrote: check your php.ini to make sure the mysql extensions are enabled. Peter -Original Message- From: Aron Bereket [mailto:[EMAIL PROTECTED] Sent: 13 January 2004 23:36 To: [EMAIL PROTECTED] Subject: MYSQL problem __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MYSQL problem
Dear Mike, Thanx for the quick reply. I did what you specified on your rely. There is --with-mysql argument but is not set it is just '--with-mysql' does it mean I have to recompile it again? cheers, Bereket --- Mike Johnson [EMAIL PROTECTED] wrote: From: Aron Bereket [mailto:[EMAIL PROTECTED] Hi there, I have recently installed mysql and php on my mechine and both work fine. But when i wrote an HTML/Php to access my databse I got the following error message: Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/employee.php on line 48 I tried also with mysql_real_connect() and mysql_connect() functions bud didn't solve the problem. Does it mean that the mysql_pconnect() doesn't exitst or is some configuration problem? Your help is appriciated. Are you sure the MySQL API was compiled with your install of PHP? Create a test script and just put the following in it: ? phpinfo() ? Then view that in your web browser. Near the top should be a header Configure Command -- does it include an appropriate --with-mysql=xxx argument? If that checks out, scroll further down to view information about PHP's planned interactions with MySQL. HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]