Sven Rautenberg: Wie halte ich Daten, die aus einem form kommen in einer PHP???

Beitrag lesen

Moin!

this bullshit-file (connect.php) does not  s t o r e  the data i put in with the html-form.

Because you did not program any code which stores the data.

i understood your hint called "BE-hält", but i could'nt make a code, creating four files *.txt to store the mysql-db data.

Not? Too bad. You are using a database, which is considered a more sophisticated way of storing data, which, basically, is supposed only to be done after enough knowledge about file access methodes is aquired.

Go for it! Aquire more knowledge about using files as a data storing method. The PHP manual provides you with a vast array of examples, user contributions and function descriptions. I recommend you start right here: http://www.php.net/fopen

Remember: You have to implement PHP code which generates a text file, which contains valid PHP code, which defines variables containing the submitted form values.

You can then include this textfile within any script and after inclusion use the defined variables in your connection function.

the commmand 'include()' is a problem too, because the main-data (i called it connect.php, ist not able to read the content of the 4 *.txt (password, user, hostname, databasename).

You don't have "4 *.txt". The only thing you have is volatile data stored in 4 variables. Those are deleted after the script has finished. You either store them somewhere (using the database would be a silly idea, as you'd have no method to access them again), or lose them.

So i expect you to support me, by giving some good (working) codes! :-)

So you "expect me to" do things? How unpolite of you!

You may "kindly ask" me if I "might be able to" help you by providing some help - as I did. Everything else is beyond your means.

- Sven Rautenberg

--
Die SelfHTML-Developer sagen Dankeschön für aktuell 21205,05 Euro Spendengelder!