ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How people could enter whatever text into a such box http://kmuto.jp/debian/hcl/, and it would be stored on the ftp ?
I use something, ftp webprovider, like free.fr
I found that we can do it in JAVA maybe that it is creating a TXT file in my ftp
here I found the begining of hte code:
when the person click on the knob how to make it save it into the ftp site ?? any code ?
Code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -
function MsgBox (textstring) {
alert (textstring) }
// - End of JavaScript - -->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT NAME="text1" TYPE=Text>
<INPUT NAME="submit" TYPE=Button VALUE="Show Me" onClick="MsgBox(form.text1.value)">
</FORM>
</BODY>
</HTML>
thx
regards
Last edited by frenchn00b; 04-10-2009 at 01:20 PM.
You can do whatever since you dont use SQL as a frontend, you tell the php/ajax/ruby/html page to access a database stored in the mysql server for a query of some sort. Can realy have whatever database you want. But dont realy understand your question.
You can do whatever since you dont use SQL as a frontend, you tell the php/ajax/ruby/html page to access a database stored in the mysql server for a query of some sort. Can realy have whatever database you want. But dont realy understand your question.
so people could enter whatever text into a such box http://kmuto.jp/debian/hcl/, and it would be stored on the ftp ?
I use something, ftp webprovider, like free.fr
I guess on that site thay have database and when the webpage ask for a query (the text put the in box) it does a search trough the database and see if it finds the terms the webpage is asking for and im pretty positive the sql database cant be stored on a ftp server.
I guess on that site thay have database and when the webpage ask for a query (the text put the in box) it does a search trough the database and see if it finds the terms the webpage is asking for and im pretty positive the sql database cant be stored on a ftp server.
Is there some sort of basic sql code to do so ??
very very extremely basic, so that we could start with ...
Im not sure if thats what your looking for, but its a great start.
those have sql free webhosting.http://www.free-webhosts.com/free-mysql-database.php
I should look into PHP, I just activated my SQL services, but still dont know much how I gonna make this... box to enter text, and been displayed on anohther webpages ...
so people could enter whatever text into a such box http://kmuto.jp/debian/hcl/, and it would be stored on the ftp ?
I use something, ftp webprovider, like free.fr
I found that we can do it in JAVA maybe that it is creating a TXT file in my ftp
here I found the begining of hte code:
when the person click on the knob how to make it save it into the ftp site ?? any code ?
Code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -
function MsgBox (textstring) {
alert (textstring) }
// - End of JavaScript - -->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT NAME="text1" TYPE=Text>
<INPUT NAME="submit" TYPE=Button VALUE="Show Me" onClick="MsgBox(form.text1.value)">
</FORM>
</BODY>
</HTML>
Zugriff auf die Datenbank mit PHP
Um mit PHP auf eine Datenbank zuzugreifen, benötigen Sie folgende Angaben, die Sie in der Regel von Ihrem Webspace-Anbieter bekommen.
Server z.B. localhost
Benutzername z.B. Benutzer
Passwort z.B. Password
Datenbankname z.B. Databases
Am besten speichern Sie diese Daten in eine Datei, z.B. zugriff.php in ein durch .htaccess geschütztes Unterverzeichniss, und binden diese über ein include in Ihren PHP-Dateien ein, da dieser Code-Schnipsel evtl. mehrmals in diversen PHP-Dateien benötigen.
<?php
define("MYSQL_HOST", "localhost");
define("MYSQL_USER", "benutzer");
define("MYSQL_PASS", "passwort");
define("MYSQL_DATABASE", "Gastbuch");
?>
Um Kontakt mit der Datenbank aufzunehmen, benutzen Sie die Funktion mysql_connect(), die eine Variable eines Zeigers der Datenbank zurückgibt, die später für den Zugriff benötigt wird. Daher speichern Sie diese am besten in der Variablen $dz für Datenbankzeiger.
Sobald die verbindung zum Server steht, benutzen Sie die Funktion mysql_select_db(), um die Datenbank zu öffnen. Ist eine Funktion nicht erfolgreich, kann das Script mit OR die('Fehlertext') abgebrochen werden. Fehlt diese Funktion, werden folgende Anweisungen ausgeführt.
Zum schluss wird wird die Datenbank mit mysql_close() geschlossen. Das ganze sieht dann so aus:
<?php
include 'inc/zugriff.php';
$dz = @mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS)
OR die('Verbindung fehlgeschlagen');
mysql_select_db(MYSQL_DATABASES)
OR die('Konnte Datenbank nicht benutzen');
?>
... hier folgt weiterer Code ...
<?php
@mysql_close($dz);
?>
so I found that I should use PHP + SQL, to make the text box update my database in my ftp site, no?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.