Call a local function or a separate PHP file?
From: Titus Cheung (titus_at_ieee.org)
Date: 12/12/03
- Next message: Stephane: "Upload *huge* files, is it wise with PHP ?"
- Previous message: Titus Cheung: "mySQL connection limit"
- Next in thread: Robert Downes: "Re: Call a local function or a separate PHP file?"
- Reply: Robert Downes: "Re: Call a local function or a separate PHP file?"
- Reply: Tony Marston: "Re: Call a local function or a separate PHP file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Stephane: "Upload *huge* files, is it wise with PHP ?"
- Previous message: Titus Cheung: "mySQL connection limit"
- Next in thread: Robert Downes: "Re: Call a local function or a separate PHP file?"
- Reply: Robert Downes: "Re: Call a local function or a separate PHP file?"
- Reply: Tony Marston: "Re: Call a local function or a separate PHP file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|