MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Peter Burden Date:November 24 2003 12:32pm
Subject:Re: web data entry problem
View as plain text  
tlr7425@stripped wrote:

> I hope someone might be willing to help out.
> I'm trying [still] to learn MySQL and php - to create some simply web  
> based database.
> I have installed quite a few php/MySQL web database apps from books,  
> however, none of them will get data entered into my database.
> When I create the database exactly as instructed, everything works  
> great, but when I create the form to send/add a new record to my db  
> then look at the db the new data is not there.
> This happens repeatedly with every example I build.  I can add 
> records  using a terminal or phpMyAdmin. 

This sounds like an access rights problem.
Is your MySQL server on the same machine as the WWW server?

I assume that you have included your MySQL username/password
in your PHP script, but do the access rights on the MySQL server
allow access for your MySQL account from the WWW server?

You might also want to check PHP error handling and reporting .

In particular make sure your code goes something like

$result = mysql_query("SELECT my_col FROM my_tbl")
    or exit ("Invalid query");

> I'm running MySQL 4.0.14, Mac OS X 10.3, PHP 4.3.2.
> I installed 'tasks' -  
> and it works just fine!  but it is too big for me to use to compare 
> to  my very simple scripts.
> Here is one I have recently installed whose data will not enter:
> tw=programming
> I believe my db connection is being made (I may be wrong), after all 
> my  phpMyAdmin app also works fine.
> I would be very grateful is there might be a kind soul who would work  
> with me to help me to find out what is wrong?  I have had dbs before  
> that worked fine, I don't understand this problem at all.
> Thanks,
> Ted

web data entry problemtlr742524 Nov
  • Re: web data entry problemPeter Burden24 Nov
  • Re: web data entry problemColleen Dick24 Nov
Re: web data entry problemtlr742525 Nov
  • Re: web data entry problemtlr742525 Nov
    • Re: web data entry problemtlr742525 Nov
      • Re: web data entry problemRyan Yagatich26 Nov