LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-23-2009, 04:42 PM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
What can we do with an Webhosting SQL?


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.
 
Old 03-23-2009, 04:45 PM   #2
cowlol
LQ Newbie
 
Registered: Feb 2009
Posts: 21

Rep: Reputation: 17
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.
 
Old 03-23-2009, 04:49 PM   #3
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by cowlol View Post
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
 
Old 03-23-2009, 04:53 PM   #4
cowlol
LQ Newbie
 
Registered: Feb 2009
Posts: 21

Rep: Reputation: 17
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.
 
Old 03-23-2009, 04:59 PM   #5
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by cowlol View Post
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 ...

thanks for your information:!!!!!!!!!!!!!!!!
 
Old 03-23-2009, 05:01 PM   #6
cowlol
LQ Newbie
 
Registered: Feb 2009
Posts: 21

Rep: Reputation: 17
http://www.hotscripts.com/

Im not sure if thats what your looking for, but its a great start.
 
Old 03-23-2009, 05:06 PM   #7
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by cowlol View Post
http://www.hotscripts.com/

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 ...
 
Old 04-10-2009, 01:20 PM   #8
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by frenchn00b View Post
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>
 
Old 04-10-2009, 10:16 PM   #9
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Code:
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?

progressing on good way?
 
Old 04-10-2009, 10:50 PM   #10
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
it seems that i have to create a CSV file and ask it ... but how ?

Code:
  <?php
  $abfrage = "SELECT url, urlname FROM links";
  $ergebnis = mysql_query($abfrage);
  while($row = mysql_fetch_object($ergebnis))
    {
    echo $row->url;
    }
  ?>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL noob question: can SQL effectively handle a 2D matrix? JoeyAdams Programming 2 03-17-2008 01:10 AM
LXer: Sql - stored procedures, views, and dynamic sql generation LXer Syndicated Linux News 0 08-17-2006 06:33 AM
SQL: old sql dump not loading into new db BrianK Linux - Software 1 07-25-2006 11:55 PM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 05:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration