View previous topic :: View next topic |
Author |
Message |
stickyfingers n00b
Joined: 15 Jun 2003 Posts: 5
|
Posted: Mon Sep 15, 2003 6:15 am Post subject: mysql/php post help |
|
|
I've just started to try to learn php and mysql.
From a browser I'm able to connect to the db, I can also create a form that searches records on the db.
What i've never been able to figure out is how to post data to the database. I can do it manually or w/ php if I specify the value, but if I use a variable and use text boxes to submit it never works.
I get no errors (none from the command line either, the data just won't post, I've read a few hundred tutorials so the code is prob good, just something on my end.
Could this maybe a security feature on mysql? something like the local infile?
any leads or suggestions would be appreciated |
|
Back to top |
|
|
Maddog39 n00b
Joined: 12 Sep 2003 Posts: 16 Location: Melbourne, AU
|
Posted: Mon Sep 15, 2003 7:04 am Post subject: |
|
|
are you accessing your vars as globals?
e.g.
by default thats turned off
either set Code: | register_globals = On | in /etc/php/subdir/php.ini
or use Code: | $HTTP_POST_VARS["formvar"] |
|
|
Back to top |
|
|
stickyfingers n00b
Joined: 15 Jun 2003 Posts: 5
|
Posted: Mon Sep 15, 2003 7:33 am Post subject: |
|
|
register_globals php.ini
Thanks thats it. |
|
Back to top |
|
|
Reqwn n00b
Joined: 29 Nov 2003 Posts: 6 Location: Vancouver, BC
|
Posted: Sun Nov 30, 2003 8:18 pm Post subject: |
|
|
Thanks! Couldnt remember what variable to change to fix that problem. |
|
Back to top |
|
|
motosauro Tux's lil' helper
Joined: 23 Nov 2005 Posts: 83 Location: Verona, Italy
|
Posted: Mon Oct 02, 2006 10:18 am Post subject: |
|
|
stickyfingers wrote: | register_globals php.ini
Thanks thats it. |
A better way imho would be to use arrays like $_POST['variable_name']
There are a good numbers, they are integrated in php and in my experience make the code so much easier to debug and mantain _________________ Per aspera ad astra |
|
Back to top |
|
|
|