Call a local function or a separate PHP file?

From: Titus Cheung (titus_at_ieee.org)
Date: 12/12/03


Date: Fri, 12 Dec 2003 04:57:26 GMT

Hello,

I want to write some code such that it'll update (ie insert, delete, etc)
some data to/from a mySQL database whenever a user hit an HTML form button
(ie Submit). Now what I find annoying is that this form can only, from my
understanding, execute a separate PHP file with the <form
action=removerow.php> code. Or can I call a function?

The reason being I find that the form will only pass a single variable to
this "removerow.php" whereas I have a few data that I want to pass onto a
function for execution. For example, if I want to display a table of
multiple rows of data queried from a database, with a check box next to each
row for the user to select for deleting from the database, I need to use an
array variable to store the list of rows that need to be removed and pass
this variable to "removerow.php". So I don't know how or if I can pass
other information stored in other variables as well to "removerow.php". Can
someone please clarify?

Also what I'm not sure if it is true or not. But it appears that whenever
PHP begins executing a different PHP file, all global variables that exist
from the previous PHP file are lost! Is this true? For example, all my
other variables information are lost when "removerow.php" executes.

Can I have it such that "removerow.php" don't need to be called and the PHP
script can call instead a local function to execute the job?

Thanks



Relevant Pages

  • Re: Call a local function or a separate PHP file?
    ... > some data to/from a mySQL database whenever a user hit an HTML form button ... execute a separate PHP file with the <form ... > PHP begins executing a different PHP file, ...
    (comp.lang.php)
  • Re: Cross-database execution permissions with certificates and sch
    ... activated user cannot access objects in other schemas in this database. ... injection is defended against, however, the threat exists anywhere EXECUTE ... CREATE USER dispatcher ... the certificate is a trusted authenticator because you granted AUTHENTICATE ...
    (microsoft.public.sqlserver.security)
  • Re: Execute Persmission denied on object sp_OACreate
    ... SQL Server doesn't check permissions on indirectly referenced objects as ... You can prevent ad-hoc execution of powerful master database procs while ... >I have a user who has execute permissions on a store procedure in a>database> which in turns executes 4 stored procedures in the master database. ...
    (microsoft.public.sqlserver.security)
  • Re: SQLCE performance from .NET CF v2.0
    ... Please remember when bulk inserting is being executed against SQL CE, ... > local database functionality. ... > database technology and I am considering switching to SQLCE at the same ... > execute the prepared statement again. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: CFS: some bad numbers with Java/database threading
    ... execute multiple queries on the same data, ... workload is "pathological". ... lock-less algorithms (like variations on optimistic locking) because ... if the locking is implemented using database ...
    (Linux-Kernel)