You are here: Re: Newbie « PHP Programming Language « IT news, forums, messages
Re: Newbie

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация