From: Richard Quadling on
On 14 May 2010 04:07, Kevin <kevin.mailinglists(a)gmail.com> wrote:
> Hello All,
>
> I am trying to figure out how to create files when a user submits a form ....
> I have seen something about '*fopen*' , is that the direction I should be
> going?
>
> Here is what I am trying to accomplish:
>
> I am creating a program to keep track of recipes for my wife. I have have
> page set up where she can put the name of the recipe, the ingredients, and
> the amounts of each ingredient.
> Then she clicks "Submit"
>
> I would like a html file with the name of the recipe to be created ie
> *cookies.html  *with a link to the cookies.html created on another page.
> *
> *I hope this makes sense,  and thank you all for your time...
>
> - - Kevin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

If you can build the HTML in memory, then you can use ...

file_put_contents('your_file.html', $YourHtml');

--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
From: "Bob McConnell" on
From: Kevin

> I am trying to figure out how to create files when a user submits a
form ...
> I have seen something about '*fopen*' , is that the direction I should

> be going?
>
> Here is what I am trying to accomplish:
>
> I am creating a program to keep track of recipes for my wife. I have
> have page set up where she can put the name of the recipe, the
> ingredients, and the amounts of each ingredient.
> Then she clicks "Submit"
>
> I would like a html file with the name of the recipe to be created ie
> *cookies.html *with a link to the cookies.html created on another
page.

There are already a number of free applications for this. I have
reviewed over a dozen of them in the past year. Drupal has a recipe
module, Gourmet for Gnome users, Krecipes for KDE users. ReciPants in
Perl, Qookbook, to name a few off the top of my head. Some of them will
link into the USDA Nutrition Database as well. You may not need to
reinvent this particular wheel.

Bob McConnell
From: tedd on
At 11:07 PM -0400 5/13/10, Kevin wrote:
>Hello All,
>
>I am trying to figure out how to create files when a user submits a form ...
>I have seen something about '*fopen*' , is that the direction I
>should be going?
>
>Here is what I am trying to accomplish:
>
>I am creating a program to keep track of recipes for my wife. I have
>have page set up where she can put the name of the recipe, the
>ingredients, and the amounts of each ingredient.
>Then she clicks "Submit"
>
>I would like a html file with the name of the recipe to be created
>ie *cookies.html *with a link to the cookies.html created on
>another page.
>*
>*I hope this makes sense, and thank you all for your time...
>
>- - Kevin

Kevin:

Your wife is trying to make cookies? :-)

Sorry, I couldn't resist.

I recommend the same thing that Ash recommended, namely creating a
database where your wife can enter the ingredients via a form and
have those recorded in a database -- a database where one can pull
the data and show the recipes in any manner you want.

Don't look to saving these data as files, or as cookies, but rather
as data in a database.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From: Kevin on
Paul M Foster wrote:
> On Thu, May 13, 2010 at 11:53:54PM -0400, Kevin wrote:
>
> <snip>
>
>
>> /On a side note:
>> I am having some issues with connecting to a SQLite database right now
>> ... I'm getting the following error "Fatal Error: 'sqlite_open' is an
>> unknown function"
>> But I'm putting that on the side right now.
>>
>
> I think the docs are still screwed up. Try sqlite3_open() instead and
> see if that works. Also, check phpinfo() to see if the SQLite/SQLite3
> modules are loaded.
>
> Paul
>
>
Thanks Paul,
I tried with sqlite3_open() and it gave the same error.
From: Lester Caine on
Kevin wrote:
>>> I am having some issues with connecting to a SQLite database right now
>>> ... I'm getting the following error "Fatal Error: 'sqlite_open' is an
>>> unknown function"
>>> But I'm putting that on the side right now.
>>
>> I think the docs are still screwed up. Try sqlite3_open() instead and
>> see if that works. Also, check phpinfo() to see if the SQLite/SQLite3
>> modules are loaded.
>>
> I tried with sqlite3_open() and it gave the same error.

THEN ... 'check phpinfo()'
Obviously sqlite extension is not actually loaded.
You don't aey which OS ... On windows there are a list of extensions in the
php.ini file, just 'uncomment' the one(s) you need ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php