Problem with MySQL and PHP

dlloyd

Official Pianist
Okay, I don't know what the problem here is, so I am going to describe what is happening.

I have installed PHP and MySQL on my iBook, it seems like PHP is working like it should. I did have some problems getting MySQL to work (I still can't set a root password for some reason, ended up reinstalling about six times! If you can help with this as well, that would be great!).
However, the problem now is that I can't get PHP to 'talk' with MySQL properly. I have tried two different scripts now, both have the same problem. PHP seems to be able to create and modify databases (e.g. I can use a script to create a database, and I can also use a script to add tables, columns, rows, and data). But when I try and input something using a form, it will not get added into the database. What actually happens is that I put my data into the form, and I click Submit, but then my data seems to have been reset (And yes, I did check to make sure that this is not a Reset button instead of a Submit button).

Please help, as this has been driving me up the wall for about three days now!
 
Ok, I usually have a single PHP script that both displays and submits the form. I usually put a hidden variable in the form called SUBMITTED=YES and in the script I check to see if $submitted==YES, if so I parse the data to the DB, otherwise I display a fresh form.

How do you have your form submission set up? I'd have a look to make sure there isn't some funny call somewhere in your submission script that just re-displays the form.

If you can enter information with PHP, you should be able to enter information with PHP, whether it's through a form or not...
 
I'm still waiting on this, if anyone can help?
I have now updated PHP to the latest version from Entrophy.ch, and I installed MySQL from www.aaronfaby.com/mysql.php. However, I am still having this problem.

Anyone????

EDIT: I forgot to say: I installed phpMyAdmin, and it works fine. This is getting really strange...
 
After some more testing, it seems that phpMyAdmin works fine, as does a counter script that I found.
I still cannot get those two calendar scripts to work, and several other scripts of different kinds that I downloaded will not work either. It seems that anything which needs text input, excluding phpMyAdmin, does not submit the input properly.
I heard about some changes in PHP version 4.2.x and higher, could this possibly be it?

Anyone? Please???

EDIT: This is an error message that is displayed at the bottem of all the pages in one of the scripts that I am trying:
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
What does this mean?
 
Okay, so I managed to get one of the scripts to work by setting the owner of the file to 'mysql' under get info. However, this does not work with the others. What the heck is going on here!?
 
Back
Top