|
Posted by Gordon Burditt on 11/01/05 23:54
>I apologise for asking such a basic question, I'm a newbie. I've been
>programming cobol for a few years, and now I'm teaching myself php.
>
>I'm trying to code an order form, where values are populated into an
>HTML table from a MySql database.
>Each row in the table has a "buy" button, and the user can fill in a
>quantity button to indicate how many items he/she wants to buy.
>
>On pressing the button, I want to call a php function.
You don't. You submit a GET or POST request. It's up to you to
arrange that the code looks at the variables sent with the GET or
POST request and figures out that it needs to call the function.
>The php function
>when called would need to insert an order to the database.
>Sounds simple, but I don't know how to get the HTML/PHP to call a PHP
>function to do the insert.
You submit a GET or POST request. There is no onclick(): that's
JavaScript, which is (a) Turned Off (tm), and (b) unable to call a
PHP function without submitting a GET or POST request even if it's
not Turned Off (tm).
Gordon L. Burditt
Navigation:
[Reply to this message]
|