|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
insert problem
i am using suse 9.2, php 4.4.8-8.3, mySQL 4-0.21-4.2, apache 2.0.50-7.2. when i run the code below and i press the button no data added in the database. i don't know what the problem because if i run select command it can display the data in the database. that's mean that my connection is OK. can anyone help me please? thanks.
PHP Code:
|
|
#2
|
||||
|
||||
|
I suspect it's a problem with your query.
Try modifying the following line as indicated: PHP Code:
|
|
#3
|
|||
|
|||
|
still problem, i think it's the loop
Quote:
thanks madcowdzz but when i change it nothing happen. the thing with my code is it don't go to the if loop, that's why it don't process my query. is it because of my php, mySQL or apache problem? is there anything i can do to make sure that my setting for those 3 things is correct? i really stumped by this problem, i can't go further to explore this knowledge. please anyone help me with this. ![]() ![]() ![]() |
|
#4
|
|||
|
|||
|
I normally trouble shoot "IF" statements like this wth two easy ways:
1. before the if put a PHP Code:
2. inside the loop PHP Code:
after this you will see what is going on with your if loop and if it is executing. |
|
#5
|
||||
|
||||
|
If you aren't entering the IF loop then $submit isn't being set.
boots' suggestions are great, and try them first. I suspect the $submit variable is being passed to your PHP from a form? Do you know if you have super globals turned on or off? [usually turned on by default] Try this: $submit = $_GET['submit']; (or use $_POST if your form's method is post) |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > insert problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|