Professional Web Applications Themes

PHP and MYSQL - PHP Development

ok i know some basic php I have done a bit of C++ and it seems very similar, basically what i want is, someone or somewhere on the net that will give me a very clear guide to the ways which i can take the contents of a form and then add those contents into a database (mysql) also how to construct the database (i have phpmyadmin) i really only want 4 fields in the database they are listed below... Number Name Email Address Location and i just want to create a form interface that will add the contents of ...

  1. #1

    Default PHP and MYSQL

    ok i know some basic php

    I have done a bit of C++ and it seems very similar, basically what i want
    is, someone or somewhere on the net that will give me a very clear guide to
    the ways which i can take the contents of a form and then add those contents
    into a database (mysql)

    also how to construct the database (i have phpmyadmin) i really only want 4
    fields in the database they are listed below...

    Number
    Name
    Email Address
    Location

    and i just want to create a form interface that will add the contents of the
    form into the database, for example

    Name
    Email Address
    Location

    I want the number to be incremented automatically in the database, so for
    example say John Smith was to enter his information

    John Smith
    com
    England

    his number (John Smith) would be 0001

    then if Joe bloggs was to enter his details

    Joe Bloggs
    com
    USA

    joe bloggs number would be 0002

    I want to then display these entries on a page, displaying them like this

    0001 John Smith com England
    0002 Joe Bloggs com USA

    I would really prefer only displaying about 250 entries per page, so say
    there was 500 entries in the database, then I would prefer a button at the
    bottom of the first page of 250 names etc that gives the user the option to
    go to page 2, or links along the top

    << 1 | 2 | 3 | 4 >>

    if you know what i mean.

    does this system sound hard to create? I am a bit of a novice with PHP and
    would appreciate any help i can get at all, I know the basics of programming
    so I should be fine grasping any new concepts, its just getting the stuff
    from the form into the database then from the database onto a page/pages

    I must emphasize the need for splitting the list up into pages, I am
    expecting at least 4000 entries, and having this amount on one page would be
    crazy!

    Thanks In Advance


    --

    Christo


    Christo Guest

  2. #2

    Default Re: PHP and MYSQL

    Christo wrote: 

    How familiar are you with SQL in general?

    If you know 'some basic php', as you say, then getting the data from a form
    should be no problem. You will need to be able to create SQL queries to put
    the data into the database. I believe MySQL has a tutorial on their website,
    or check out w3schools.com

    Once you have some grasp of that, then refer to the PHP manual on MySQL
    functions at http://us3.php.net/manual/en/ref.mysql.php

    Of particular note will be mysql_connect, mysql_select_db, and mysql_query.

    The x number of entries per page is relatively easy, especially if you use
    LIMIT in your SQL query - but concentrate on getting the input & output
    first, then work on the formatting.

    --
    Tony Garcia
    http://www.dslextreme.com/~tony23/


    Tony Guest

  3. #3

    Default Re: PHP and MYSQL

    "Tony" <com.spam> wrote in message
    news:supernews.com... 
    >
    > How familiar are you with SQL in general?
    >
    > If you know 'some basic php', as you say, then getting the data from a
    > form should be no problem. You will need to be able to create SQL queries
    > to put the data into the database. I believe MySQL has a tutorial on their
    > website, or check out w3schools.com
    >
    > Once you have some grasp of that, then refer to the PHP manual on MySQL
    > functions at http://us3.php.net/manual/en/ref.mysql.php
    >
    > Of particular note will be mysql_connect, mysql_select_db, and
    > mysql_query.
    >
    > The x number of entries per page is relatively easy, especially if you use
    > LIMIT in your SQL query - but concentrate on getting the input & output
    > first, then work on the formatting.
    >
    > --
    > Tony Garcia
    > http://www.dslextreme.com/~tony23/
    >
    >[/ref]

    Thanks, it looks like I am going to have to get to know SQL before i begin
    this, I will have a read on the web and perhaps pop down to the library, see
    if they have any books on it.

    Thanks for the advice, I know where to look now, cheers.

    Christo


    Christo Guest

  4. #4

    Default Re: PHP and MYSQL

    > Thanks, it looks like I am going to have to get to know SQL before i begin 

    w3schools.com also has a good tutorial on SQL. I highly recommend them.
    Dan Guest

  5. #5

    Default Re: PHP and MYSQL

    > I want the number to be incremented automatically in the database, so for 

    This requirement is simple - define the field as "AUTOINCREMENT".
     

    This can be handled using MySQL's "LIMIT" clause.
     

    No, it actually sounds pretty easy. I'm a newcomer to PHP myself (I'm
    making the transition to PHP after programming Perl for several years)
    but fairly experienced with MySQL. Your description of this project
    sounds pretty straightforwardd.
    Dan Guest

  6. #6

    Default Re: PHP and MYSQL

    The book below tells you all you need to know.

    http://www.amazon.co.uk/exec/obidos/ASIN/0596000413

    It covers PHP and SQL in enough depth for what you need, and more.

    Regards

    Ian

    In message <d8c4jp$rti$dmz.ncs.ea.ibs-infra.bt.com>, Christo
    <?.com.invalid> writes 
    Snip sketch of simple database app.

    --
    Ian - posting to a Newsgroup. Please remove everything to reply.
    Ian Guest

  7. #7

    Default Re: PHP and MYSQL

    Christo -

    I started from scratch at the begining of this week...

    I used the text-book called

    'PHP and MySQL Web Development'
    ISBN : 0-672-32525-X

    Amazon :
    'http://www.amazon.com/exec/obidos/ASIN/067232525X/qid%3D1118791498/sr%3D11-
    1/ref%3Dsr%5F11%5F1/002-0345351-0864000'

    (watch the wrap round

    there is a tutorial in chapter 24 that gives you the code you need to do
    exaclty want you want.

    I knew nothing about php, mysql but am quite a decent coder in HTML. i;m
    taking my next steps and the people on these forums are more than generous
    with thier time.

    Have fun...



    Domestos Guest

Similar Threads

  1. Replies: 2
    Last Post: February 14th, 10:54 AM
  2. Replies: 1
    Last Post: January 23rd, 12:06 PM
  3. Replies: 0
    Last Post: January 29th, 02:03 PM
  4. Replies: 0
    Last Post: January 24th, 10:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139