Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

HTML and MySQL databases

  • 10-12-2007 06:40PM
    #1
    Closed Accounts Posts: 3,119 ✭✭✭


    Greetings.
    I'm trying to get information from a web page to a database :mad:. The idea is that a user enters the information in the web page and when they submit the information its stored on to a database, which is programmed using MySQL and is running off server2Go. Any ideas of tags i could use to do this or coding id need in the database?
    If its piss easy to do, tell me how THEN scorn my ignorance! ;) Any help is appreciated. Cheers!


Comments

  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt


    http://www.w3schools.com/php/php_ref_array.asp

    +

    http://ie.php.net/manual/en/ref.mysql.php

    You've a bit of reading to do

    look at the "PHP Database" bit on the left of the w3schools page


  • Closed Accounts Posts: 3,119 ✭✭✭Wagon


    Didn't think to look at w3schools :o Cheers man!


  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt


    no problem ... its always in the last place you look :D


  • Closed Accounts Posts: 238 ✭✭coadyj


    perl
    php
    servlet

    import java.sql.*;

    public class Oracle {
    public static void main(String[] args) {
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:oracle", "sysman", "password");
    Statement stmt = conn.createStatement();
    ResultSet r = stmt.executeQuery ("SELECT * FROM client");
    while (r.next())
    System.out.println(r.getString(1) + " " + r.getString(2));
    r.close();
    stmt.close();
    conn.close();
    } catch (Exception e) {
    System.out.println("ERROR : " + e);
    e.printStackTrace(System.out);
    }
    }
    }


  • Registered Users, Registered Users 2 Posts: 260 ✭✭pdebarra


    Coadyj, that was not terribly helpful. Indentation would make that code readable, as would fixing the smilies. If you want to post code, better to do so within [ CODE ][ /CODE ] tags:
    System.out.println(r.getString(1) + " " + r.getString(2));
    

    In any case, you have not given the OP any indication of what he should do with this code, nor even told him what language it is.

    A singularly useless post.

    OP, my recommendation would be the same as Forbairt's: PHP is ideally suited to taking info from web pages (HTML forms) and stick it into a MySQL database.


  • Advertisement
Advertisement