RE: [PHP-DB] variable names
| From: | Hutchins, Richard | Date: | Tue, 01 Oct 2002 15:03:39 +0000 |
| Subject: | RE: [PHP-DB] variable names | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22128@lists.php.net to get a copy of this message | ||
Without more detail about your code, my first guess would be your
register_globals setting in php.ini. In PHP 4.2.x it's set to OFF which
means you have to refer to your variables like this example:
$_POST["varname"];
> -----Original Message-----
> From: Brendan Flynn [mailto:bmapc@utvinternet.com]
> Sent: Monday, September 30, 2002 2:45 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] variable names
>
>
> Hello,
>
> I have installed PHP4 with Apache support - the phpinfo works
> fine and I am
> able to write PHP code to display a timetable from a MYSQL
> database. However
> I cannot add or use the command insert when trying to add information.
>
> I have done a few tests and when I run the same scripts with
> the values
> already inputted the database is updated.
> i.e.. instead of asking the user for the values, I inset them
> as follows
> INSERT values $DNTable VALUES ('', 'crap', '555-555'); - and
> this works fine
> and database is auto-incrementated. NOW if I replace 'crap'
> with $name or
> $phone the database is updated BUT the values are blank.
>
> ie. database
> id name phone
> 1
> 2
> 3
>
> Now I wrote a basic script that just displays the values
> inputted by a user
> and they appear blank as well?
>
> Any ideas?
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>